![]() |
|
[Tutorial] Menu modding reference - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: [Tutorial] Menu modding reference (/Thread-Tutorial-Menu-modding-reference.html) |
Menu modding reference - Pozzuh - 08-14-2011 This post will contain definitions for Menufile elements. i will keep filling this as im going. leaving a example here on top: Code: #include "ui/menudef.h"
{
menuDef
{
name "selection_menu"
visible 0
fullscreen 0
rect 0 0 640 480
border 0
onOpen
{
}
onESC
{
close selection_menu;
}
itemDef
{
style WINDOW_STYLE_FILLED
rect 160 80 512 512
backcolor 0.5 0.5 0.5 0.5
visible 1
}
itemDef
{
rect 0 0 100 20
visible 1
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_FILLED
origin 100 100
backcolor 1 0 0 .5
action
{
play "mouse_click";
scriptMenuResponse "cats";
close selection_menu;
}
onFocus
{
play "mouse_over";
}
}
}
}Please provide useful information as a respose. Also give feedback if any of the information is wrong. name Quote:The name of the menu or element. rect Quote:Creates a rect which can be filled with new elements, rect probably stands for "rectangle" style Quote:Defines the style of the menu-item within a rect. type (very unfinished) Quote:Sets the type of the element. origin Quote:Defines where the element originates from. visible Quote:Defines wether the element should be visible or not. forecolor Quote:Defines the foregroundcolor of a rect, provided the rect is of the type WINDOW_STYLE_FILLED backcolor Quote:Defines the background color of a rect, provided the rect is of the type WINDOW_STYLE_FILLED background Quote:Sets a background for a rect provided the rect is of the type WINDOW_STYLE_SHADER border Quote:Defines wether a rect should have a border or not. text Quote:Sets a text for a ITEM_TYPE_TEXT element. textscale Quote:Sets the textscale for a ITEM_TYPE_TEXT element. textfont (very unfinished) Quote:Sets the font for a ITEM_TYPE_TEXT element. textaligny Quote:Offset for the text on the y-axis. Tutorial by fixz - www.modbyte.se Tutorial has been taken offline, i've no idea why but I saved a copy. Good luck
RE: Menu modding reference - Nekochan - 08-14-2011 Very usefull! Thanks
RE: Menu modding reference - SrK - 08-14-2011 Very nice ![]() Thank you. RE: Menu modding reference - Hixos - 08-14-2011 nice, thank you! |