Ok, so I've got this problem. I tried this case:
PHP Code:
#ifndef DRAW_WEAPON_ITEM
#define DRAW_WEAPON_ITEM(_key, _name) \
itemDef \
{ \
name "button_" ## _name \
visible 1 \
rect 0 0 128 24 HORIZONTAL_ALIGN_DEFAULT VERTICAL_ALIGN_DEFAULT \
origin _key \
forecolor GLOBAL_UNFOCUSED_COLOR \
type ITEM_TYPE_BUTTON \
text "test " ## _name \
textfont UI_FONT_NORMAL \
textscale .25 \
textstyle ITEM_TEXTSTYLE_SHADOWED \
textalignx 10 \
textaligny 20 \
}
#endif
#define DRAW_WEAPON(_key, _name) DRAW_WEAPON_ITEM(_key, _name)
DRAW_WEAPON(ORIGIN_CHOICEA, m1carbine_mp)
And the button name here was "test _name". So, my variable wasn't used. I tried this one then (with #):
PHP Code:
#ifndef DRAW_WEAPON_ITEM
#define DRAW_WEAPON_ITEM(_key, _name) \
itemDef \
{ \
name "button_" ## #_name \
visible 1 \
rect 0 0 128 24 HORIZONTAL_ALIGN_DEFAULT VERTICAL_ALIGN_DEFAULT \
origin _key \
forecolor GLOBAL_UNFOCUSED_COLOR \
type ITEM_TYPE_BUTTON \
text "test " ## #_name \
textfont UI_FONT_NORMAL \
textscale .25 \
textstyle ITEM_TEXTSTYLE_SHADOWED \
textalignx 10 \
textaligny 20 \
}
#endif
#define DRAW_WEAPON(_key, _name) DRAW_WEAPON_ITEM(_key, #_name)
DRAW_WEAPON(ORIGIN_CHOICEA, m1carbine_mp)
And here I've got this name: "test #_name". So, as I see, we can't send our variables. And that's strange, because in kung used it... By the way, with define ORIGIN_CHOICEA it works, so I'll try to use defines only.