Sign in to follow this  
Followers 0
NinjaWa

Customization buttons problems

4 posts in this topic

I don't have time to look at it now, but the error in part #2 is due to "itemID" not being used anywhere in your macro, also if you're going to use WEAPON_NINJA macro more than once in one menu, i'd suggest adding that itemID to item names, for example:

 

this:

name "button_weapons_off" \
[...]
hide "button_weapons_off" \

becomes:

name "button_weapons_off"itemID \
[...]
hide "button_weapons_off"itemID \

#edit try:

 
 
#define WEAPON_NINJA( x, y, itemID ) \
itemDef \
{ \
        rect                    x y 117 21 NINJA_ALIGN \
        name                    "button_weapons_off"itemID \
        style                   WINDOW_STYLE_SHADER \
        background              "button_weapons_off" \
        visible                 1 \
        decoration \ /*dont remember if it works with buttons or not, prob no*/
        type                    ITEM_TYPE_BUTTON \
        mouseEnter \
        { \
        play "mouse_over"; \
        show "button_weapons_on"itemID; \
        } \
        mouseExit \
        { \
        hide "button_weapons_on"itemID; \
        } \
} \
itemDef \
{ \
        name                    "button_weapons_on"itemID \
        rect                    x y 117 21 NINJA_ALIGN \
        style                   WINDOW_STYLE_SHADER \
        background              "button_weapons_on" \
        type                    ITEM_TYPE_BUTTON \
        visible         0 \
        action \
        { \
                scriptMenuResponse itemID; \
                close self; \
                open "team_select"; \
        } \
} \
itemDef \
{ \
        visible         1 \
        rect            (x-50) (y+19) 220 35 DR_BUTTON_ALIGN \
        textalignx      0 \
        textaligny      0 \
        forecolor       1 0 0 1 \
        exp                     text( tableLookup("mp/itemTable.csv", 0, itemID, 5) ) \
        textfont        UI_FONT_NORMAL \
        textalign       ITEM_ALIGN_CENTER \
        textscale       0.4 \
        decoration \
} \
0

Share this post


Link to post
Share on other sites

Thanks BraXi for your fast response, I've done that now and I get this error.

 

On "weaponsmenu.menu" I have:

WEAPON_NINJA( 50, 157, 1 )
WEAPON_NINJA( 198, 157, 2 )
WEAPON_NINJA( 348, 157, 3 )

__________

 

I've tried adding ", id ) \" to the code you've sent me and in "weaponsmenu.menu" but still the same error as on this post :dave:

0

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0