Originally Posted by
Tally
You wont be able to show the result of a dvar if you use the action{} element in an itemDef{}. Also, you aren't defining the font and fontstyle and size. It wont show unless you do that.
Code:
itemDef
{
name rcon_button
type ITEM_TYPE_BUTTON
dvar "rcon_rsp_player0"
rect 0 0 SLOT_SIZE
origin ORIGIN_SLOT
textstyle OPTIONS_ITEM_TEXT_STYLE
textalign OPTIONS_ITEM_ALIGN
textalignx SLOT_ALIGNX
textaligny SLOT_ALIGNY
textscale SLOT_TXTSCALE
style WINDOW_STYLE_FILLED
backcolor OPTIONS_CONTROL_BACKCOLOR
forecolor OPTIONS_CONTROL_FORECOLOR
visible 1
dvartest "rcon_rsp_result"
showDvar { "1" }
action
{
play "mouse_click";
scriptMenuResponse "rcon_cmd_player0";
}
mouseEnter
{
play "mouse_over";
}
}
Using a dvar as text, checking dvar to show at all, and with an action... shows perfectly fine.