Tally
2nd June 2013, 14:25
I've been playing around with Macros all week now, converting Demon mod menus to macros. Here are a couple of "gottayas" I experienced:
1. ITEM RECTANGLES - you can no longer get away with defining just 4 parameters in an itemDef{} rectangle. It has to have 6 parameters. If you don't put 6 in, it wont parse the rest of your arguments. It will throw an error telling you it expected an integer or float but found something else - ignoring the comma which separates them. So, you need to use 2 more coordinates, and these are bitmask numbers which tell the engine where to align your rectangle.
COD2 doesn't give us access to menudefinitions.h (don't confuse this with menudef.h - it isn't the same), but as COD4 uses the same definitions, and as they gave us menudefinitons.h for COD4, here is a list of the menu bitmask definitions used by Infinity Ward:
// Edge relative placement values for rect->h_align and rect->v_align
#define HORIZONTAL_ALIGN_SUBLEFT 0 // left edge of a 4:3 screen (safe area not included)
#define HORIZONTAL_ALIGN_LEFT 1 // left viewable (safe area) edge
#define HORIZONTAL_ALIGN_CENTER 2 // center of the screen (reticle)
#define HORIZONTAL_ALIGN_RIGHT 3 // right viewable (safe area) edge
#define HORIZONTAL_ALIGN_FULLSCREEN 4 // disregards safe area
#define HORIZONTAL_ALIGN_NOSCALE 5 // uses exact parameters - neither adjusts for safe area nor scales for screen size
#define HORIZONTAL_ALIGN_TO640 6 // scales a real-screen resolution x down into the 0 - 640 range
#define HORIZONTAL_ALIGN_CENTER_SAFEAREA 7 // center of the safearea
#define HORIZONTAL_ALIGN_MAX HORIZONTAL_ALIGN_CENTER_SAFEAREA
#define HORIZONTAL_ALIGN_DEFAULT HORIZONTAL_ALIGN_SUBLEFT
#define VERTICAL_ALIGN_SUBTOP 0 // top edge of the 4:3 screen (safe area not included)
#define VERTICAL_ALIGN_TOP 1 // top viewable (safe area) edge
#define VERTICAL_ALIGN_CENTER 2 // center of the screen (reticle)
#define VERTICAL_ALIGN_BOTTOM 3 // bottom viewable (safe area) edge
#define VERTICAL_ALIGN_FULLSCREEN 4 // disregards safe area
#define VERTICAL_ALIGN_NOSCALE 5 // uses exact parameters - neither adjusts for safe area nor scales for screen size
#define VERTICAL_ALIGN_TO480 6 // scales a real-screen resolution y down into the 0 - 480 range
#define VERTICAL_ALIGN_CENTER_SAFEAREA 7 // center of the save area
#define VERTICAL_ALIGN_MAX VERTICAL_ALIGN_CENTER_SAFEAREA
#define VERTICAL_ALIGN_DEFAULT VERTICAL_ALIGN_SUBTOP
All of those work. You have to work your way through all of your itemDef{} rectangles and redefine them, as your originals wont work any longer.
2. Onfocus{} + "mouse_over" soundalias - this produces a horrible buzzing sound all over the menu. I could not get rid of it. So, I reverted to using mouseEnter{} to play "mouse_over".
3. You can only include your macros file once - otherwise it throws an error that the macros are already defined. The thing is, if you want to use the macros in another file included in your main menu file, it wont find them. And, as stated, if you try to include the macros file at the top of this include file, it will tell you the macros are already defined. So, it wont let you define them twice, but wont actually use the macro file in an include. Pretty much screwed with that one. Back to including all your items in one file.
4. A good tip when defining your rectangles is to use boarders so you can see where the actual size. Then use the Y co-ordinates to move either your text or your shader down.
So, here is an updated version of Demon mod's Assault Class menu:
{
menuDef
{
name "assault_american"
rect 0 0 640 480
focuscolor GLOBAL_FOCUSED_COLOR
style WINDOW_STYLE_EMPTY
blurWorld 5.0
onEsc
{
close assault_american;
}
onOpen
{
show greasegun_info;
show weapon_propertiestext;
show tabungas;
show tabungas_replace;
show frag;
}
onClose
{
hide greasegun_info;
hide thompson_info;
hide shotgun_info;
hide frag;
hide tabungas;
hide tabungas_replace;
}
#include "ui_mp/custom/templates.inc"
DRAWSHADER_NODVAR( "gradient", 0 0, 0 0 640 480 HORIZONTAL_ALIGN_FULLSCREEN VERTICAL_ALIGN_FULLSCREEN, 1 1 1 .9, "gradient", 1 )
#include "ui/bars.menu"
#include "ui_mp/custom/teamicon_allies.inc"
#include "ui_mp/custom/menu_wireframe.inc"
// #include "ui_mp/custom/sidearm.inc"
#include "ui_mp/custom/allied_special_grenades.inc"
DRAWTEXT_NODVAR( "title", 0 0 50 50 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_TOP, ORIGIN_TITLE, 1 1 1 1, "@Assault Class", 1, UI_FONT_NORMAL, GLOBAL_HEADER_SIZE, 0, 0, ITEM_TEXTSTYLE_SHADOWED )
//********* MENU CHOICES ****************
execKey "1" { play "mouse_click"; scriptMenuResponse "greasegun_mp"; }
execKey "2" { play "mouse_click"; scriptMenuResponse "thompson_mp"; }
execKey "3" { play "mouse_click"; scriptMenuResponse "shotgun_mp"; }
//--- GREASEGUN ----
CHOICE_BUTTON( "button_greasegun", 1, RECTANGLE, ORIGIN_CHOICE1, GLOBAL_UNFOCUSED_COLOR, "@MPUI_1_GREASEGUN", UI_FONT_NORMAL, GLOBAL_TEXT_SIZE, ITEM_TEXTSTYLE_SHADOWED, 20, "ui_allow_greasegun", "1", "greasegun_mp", thompson_info, shotgun_info, "", greasegun_info, weapon_propertiestext )
CHOICE_DIS_BUTTON( "button_greasegun_disabled", 1, RECTANGLE, ORIGIN_CHOICE1, "@MPUI_1_GREASEGUN", UI_FONT_NORMAL, GLOBAL_TEXT_SIZE, ITEM_TEXTSTYLE_SHADOWED, 20, "ui_allow_greasegun", "1", thompson_info, shotgun_info, greasegun_info, weapon_propertiestext, frag, tabungas, tabungas_replace, disabled_info )
//--- THOMPSON ----
CHOICE_BUTTON( "button_thompson", 1, RECTANGLE, ORIGIN_CHOICE2, GLOBAL_UNFOCUSED_COLOR, "@2. Thompson", UI_FONT_NORMAL, GLOBAL_TEXT_SIZE, ITEM_TEXTSTYLE_SHADOWED, 20, "ui_allow_thompson", "1", "thompson_mp", greasegun_info, shotgun_info, "", thompson_info, weapon_propertiestext )
CHOICE_DIS_BUTTON( "button_thompson_disabled", 1, RECTANGLE, ORIGIN_CHOICE2, "@2. Thompson", UI_FONT_NORMAL, GLOBAL_TEXT_SIZE, ITEM_TEXTSTYLE_SHADOWED, 20, "ui_allow_thompson", "1", thompson_info, shotgun_info, greasegun_info, weapon_propertiestext, frag, tabungas, tabungas_replace, disabled_info )
//--- SHOTGUN ----
CHOICE_BUTTON( "button_shotgun", 1, RECTANGLE, ORIGIN_CHOICE3, GLOBAL_UNFOCUSED_COLOR, "@3. M1897 Trench Gun", UI_FONT_NORMAL, GLOBAL_TEXT_SIZE, ITEM_TEXTSTYLE_SHADOWED, 20, "ui_allow_shotgun", "1", "shotgun_mp", greasegun_info, thompson_info, "", shotgun_info, weapon_propertiestext )
CHOICE_DIS_BUTTON( "button_shotgun_disabled", 1, RECTANGLE, ORIGIN_CHOICE3, "@3. M1897 Trench Gun", UI_FONT_NORMAL, GLOBAL_TEXT_SIZE, ITEM_TEXTSTYLE_SHADOWED, 20, "ui_allow_shotgun", "1", thompson_info, shotgun_info, greasegun_info, weapon_propertiestext, frag, tabungas, tabungas_replace, disabled_info )
//*************** PERK ICONS *********************
//--- TABUN GAS ---
DRAWSHADER( "tabungas_perk", ORIGN_PERK_1, PERK_SIZE HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_CENTER, .7 .7 .7 .7, "specialty_weapon_tabungas", "scr_demon_allow_tabungas", "1", 1 )
HIDESHADER( "null", ORIGN_PERK_1, PERK_SIZE HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_CENTER, .7 .7 .7 .7, "specialty_null", "scr_demon_allow_tabungas", "1", 1 )
//--- STOPPING POWER ---
DRAWSHADER( "stopping_power", ORIGN_PERK_2, PERK_SIZE HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_CENTER, .7 .7 .7 .7, "specialty_bulletdamage", "scr_demon_allow_bulletdamage", "1", 1 )
HIDESHADER( "null", ORIGN_PERK_2, PERK_SIZE HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_CENTER, .7 .7 .7 .7, "specialty_null", "scr_demon_allow_bulletdamage", "1", 1 )
//--- MARTYRDOM ---
DRAWSHADER( "martyrdom", ORIGN_PERK_3, PERK_SIZE HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_CENTER, .7 .7 .7 .7, "specialty_grenadepulldeath", "scr_demon_allow_martyrdom", "1", 1 )
HIDESHADER( "null", ORIGN_PERK_3, PERK_SIZE HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_CENTER, .7 .7 .7 .7, "specialty_null", "scr_demon_allow_martyrdom", "1", 1 )
//*************** PERK TEXT ***********************
//--- TABUN GAS ---
DRAWTEXT( "tabungas_perk", DESCRIP_SIZE HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_CENTER, PERK_DES_1, 1 1 1 1, "@Tabun Gas", "scr_demon_allow_tabungas", "1", 1, UI_FONT_NORMAL, .18, 7, 7, ITEM_TEXTSTYLE_SHADOWED )
HIDETEXT( "tabungas_perk", DESCRIP_SIZE HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_CENTER, PERK_DES_1, 1 1 1 1, "@DISABLED", "scr_demon_allow_tabungas", "1", 1, UI_FONT_NORMAL, .18, 7, 7, ITEM_TEXTSTYLE_SHADOWED )
//--- STOPPING POWER ---
DRAWTEXT( "stopping_power", DESCRIP_SIZE HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_CENTER, PERK_DES_2, 1 1 1 1, "@Stopping Power", "scr_demon_allow_bulletdamage", "1", 1, UI_FONT_NORMAL, .18, 7, 0, ITEM_TEXTSTYLE_SHADOWED )
HIDETEXT( "stopping_power", DESCRIP_SIZE HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_CENTER, PERK_DES_2, 1 1 1 1, "@DISABLED", "scr_demon_allow_bulletdamage", "1", 1, UI_FONT_NORMAL, .18, 7, 7, ITEM_TEXTSTYLE_SHADOWED )
//--- MARTYRDOM ---
DRAWTEXT( "martyrdom", DESCRIP_SIZE HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_CENTER, PERK_DES_3, 1 1 1 1, "@Martyrdom", "scr_demon_allow_martyrdom", "1", 1, UI_FONT_NORMAL, .18, 7, 7, ITEM_TEXTSTYLE_SHADOWED )
HIDETEXT( "martyrdom", DESCRIP_SIZE HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_CENTER, PERK_DES_3, 1 1 1 1, "@DISABLED", "scr_demon_allow_martyrdom", "1", 1, UI_FONT_NORMAL, .18, 7, 7, ITEM_TEXTSTYLE_SHADOWED )
//******************* WEAPON IMAGES ********************
//--- GREASEGUN ----
DRAWSHADER_NODVAR( "greasegun_info", ORIGIN_WEAPONIMAGE_1, WEAPONIMAGE_SIZE HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP, 1 1 1 1, "weapon_greasegun", 0 )
//--- THOMPSON ---
DRAWSHADER_NODVAR( "thompson_info", ORIGIN_WEAPONIMAGE_1, WEAPONIMAGE_SIZE HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP, 1 1 1 1, "weapon_thompson", 0 )
//--- SHOTGUN ----
DRAWSHADER_NODVAR( "shotgun_info", ORIGIN_WEAPONIMAGE_1, WEAPONIMAGE_SIZE HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP, 1 1 1 1, "weapon_shotgun", 0 )
//*************** WEAPON PROPERTIES ***************
DRAWTEXT_NODVAR( "weapon_propertiestext", 0 0 20 50 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, ORIGIN_WEAPONPROPERTIESTEXT_1, 1 1 1 1, "@MPUI_ACCURACY_DAMAGE_MOBILITY", 0, UI_FONT_NORMAL, GLOBAL_TEXT_SIZE, 0, 0, ITEM_TEXTSTYLE_SHADOWED )
//--- GREASEGUN ----
DRAWSHADER_NODVAR( "greasegun_info", ORIGIN_WEAPONACCURACY_1, 0 0 128 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 .125, "white", 0 )
DRAWSHADER_NODVAR( "greasegun_info", ORIGIN_WEAPONACCURACY_1, 0 0 70 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 1, "white", 0 )
DRAWSHADER_NODVAR( "greasegun_info", ORIGIN_WEAPONDAMAGE_1, 0 0 128 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 .125, "white", 0 )
DRAWSHADER_NODVAR( "greasegun_info", ORIGIN_WEAPONDAMAGE_1, 0 0 75 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 1, "white", 0 )
DRAWSHADER_NODVAR( "greasegun_info", ORIGIN_WEAPONMOBILITY_1, 0 0 128 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 .125, "white", 0 )
DRAWSHADER_NODVAR( "greasegun_info", ORIGIN_WEAPONMOBILITY_1, 0 0 96 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 1, "white", 0 )
//--- THOMPSON ---
DRAWSHADER_NODVAR( "thompson_info", ORIGIN_WEAPONACCURACY_1, 0 0 128 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 .125, "white", 0 )
DRAWSHADER_NODVAR( "thompson_info", ORIGIN_WEAPONACCURACY_1, 0 0 56 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 1, "white", 0 )
DRAWSHADER_NODVAR( "thompson_info", ORIGIN_WEAPONDAMAGE_1, 0 0 128 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 .125, "white", 0 )
DRAWSHADER_NODVAR( "thompson_info", ORIGIN_WEAPONDAMAGE_1, 0 0 83 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 1, "white", 0 )
DRAWSHADER_NODVAR( "thompson_info", ORIGIN_WEAPONMOBILITY_1, 0 0 128 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 .125, "white", 0 )
DRAWSHADER_NODVAR( "thompson_info", ORIGIN_WEAPONMOBILITY_1, 0 0 96 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 1, "white", 0 )
//---- SHOTGUN ----
DRAWSHADER_NODVAR( "shotgun_info", ORIGIN_WEAPONACCURACY_1, 0 0 128 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 .125, "white", 0 )
DRAWSHADER_NODVAR( "shotgun_info", ORIGIN_WEAPONACCURACY_1, 0 0 35 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 1, "white", 0 )
DRAWSHADER_NODVAR( "shotgun_info", ORIGIN_WEAPONDAMAGE_1, 0 0 128 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 .125, "white", 0 )
DRAWSHADER_NODVAR( "shotgun_info", ORIGIN_WEAPONDAMAGE_1, 0 0 100 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 1, "white", 0 )
DRAWSHADER_NODVAR( "shotgun_info", ORIGIN_WEAPONMOBILITY_1, 0 0 128 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 .125, "white", 0 )
DRAWSHADER_NODVAR( "shotgun_info", ORIGIN_WEAPONMOBILITY_1, 0 0 80 10 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 1 1 1 1, "white", 0 )
//******************** SIDEARM ************************
DRAWSHADER( "colt", ORIGIN_PISTOL, PISTOL_IMAGE_SIZE HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_CENTER, 1 1 1 1, "weapon_colt45", "ui_sidearm_colt", "1", 1 )
DRAWSHADER( "magnum", ORIGIN_PISTOL, 0 4 75 75 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_CENTER, 1 1 1 1, "weapon_magnum", "ui_sidearm_magnum", "1", 1 )
DRAWSHADER( "knife", ORIGIN_PISTOL, 0 0 95 95 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_CENTER, 1 1 1 1, "weapon_knife", "ui_sidearm_knife", "1", 1 )
/////////////////// EDIT BUTTON /////////////////////////////
EDIT_BUTTON( "edit_sidearm", 1, PISTOL_RECT HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_CENTER, SIDEARM_EDIT_ORG, EDIT_COLOR, .18, 15, 0, "popup_sidearm" )
//************* MISC BUTTONS *************************
//BACK BUTTON
itemDef
{
#include "ui_mp/button_back.menu"
action
{
play "mouse_click";
close medic_american;
close gunner_american;
close assault_american;
close engineer_american;
close officer_american;
close sniper_american;
open class_allies;
}
mouseEnter
{
play "mouse_over";
}
}
// MAIN MENU
itemDef
{
#include "ui_mp/button_mainmenu.menu"
action
{
play "mouse_click";
close assault_american;
open main;
}
mouseEnter
{
play "mouse_over";
}
}
}
}
And here are the Macros it uses:
#define EDIT_BUTTON( nameArg, visArg, rectArg, originArg, colorArg, scaleArg, alignYArg, alignXArg, menuArg ) \
itemDef \
{ \
name nameArg \
type ITEM_TYPE_BUTTON \
visible visArg \
rect rectArg \
origin originArg \
forecolor colorArg \
text "@[ CLICK TO EDIT ]" \
textfont UI_FONT_NORMAL \
textscale scaleArg \
textstyle ITEM_TEXTSTYLE_SHADOWED \
textaligny alignYArg \
textalignx alignXArg \
action \
{ \
play "mouse_click"; \
open menuArg; \
} \
mouseEnter \
{ \
play "mouse_over"; \
} \
}\
#define CHOICE_BUTTON( nameArg, visArg, rectArg, originArg, colorArg, textArg, fontArg, scaleArg, styleArg, alignYArg, dvarArg, valueArg, responseArg, hideArg1, hideArg2, hideArg3, showArg1, showArg2 ) \
itemDef \
{ \
name nameArg \
type ITEM_TYPE_BUTTON \
visible visArg \
rect rectArg \
origin originArg \
forecolor colorArg \
text textArg \
textfont fontArg \
textscale scaleArg \
textstyle styleArg \
textaligny alignYArg \
dvartest dvarArg \
showDvar { valueArg } \
action \
{ \
play "mouse_click"; \
scriptMenuResponse responseArg; \
} \
onFocus \
{ \
hide hideArg1; \
hide hideArg2; \
hide hideArg3; \
show showArg1; \
show showArg2; \
} \
mouseEnter \
{ \
play "mouse_over"; \
} \
}
#define CHOICE_DIS_BUTTON( nameArg, visArg, rectArg, originArg, textArg, fontArg, scaleArg, styleArg, alignYArg, dvarArg, valueArg, hideArg1, hideArg2, hideArg3, hideArg4, hideArg5, hideArg6, hideArg7, showArg ) \
itemDef \
{ \
name nameArg \
type ITEM_TYPE_BUTTON \
visible visArg \
rect rectArg \
origin originArg \
forecolor GLOBAL_DISABLED_COLOR \
text textArg \
textfont fontArg \
textscale scaleArg \
textstyle styleArg \
textaligny alignYArg \
dvartest dvarArg \
hideDvar { valueArg } \
decoration \
mouseEnter \
{ \
hide hideArg1; \
hide hideArg2; \
hide hideArg3; \
hide hideArg4; \
hide hideArg5; \
hide hideArg6; \
hide hideArg7; \
hide hideArg8; \
show showArg; \
} \
mouseExit \
{ \
hide showArg; \
show hideArg5; \
show hideArg6; \
show hideArg7; \
} \
}
#define DRAWSHADER( nameArg, originArg, rectArg, colorArg, shaderArg, dvarArg, valueArg, visArg ) \
itemDef \
{ \
name nameArg \
style WINDOW_STYLE_SHADER \
visible visArg \
rect rectArg \
origin originArg \
forecolor colorArg \
background shaderArg \
dvartest dvarArg \
showDvar { valueArg } \
}
#define HIDESHADER( nameArg, originArg, rectArg, colorArg, shaderArg, dvarArg, valueArg, visArg ) \
itemDef \
{ \
name nameArg \
style WINDOW_STYLE_SHADER \
visible visArg \
rect rectArg \
origin originArg \
forecolor colorArg \
background shaderArg \
dvartest dvarArg \
hideDvar { valueArg } \
}
#define DRAWSHADER_NODVAR( nameArg, originArg, rectArg, colorArg, shaderArg, visArg ) \
itemDef \
{ \
name nameArg \
style WINDOW_STYLE_SHADER \
visible visArg \
rect rectArg \
origin originArg \
forecolor colorArg \
background shaderArg \
}
#define DRAWTEXT( nameArg, rectArg, originArg, colorArg, textArg, dvarArg, valueArg, visArg, fontArg, scaleArg, alignYArg, alignXArg, fontStyleArg ) \
itemDef \
{ \
name nameArg \
type ITEM_TYPE_TEXT \
visible visArg \
rect rectArg \
origin originArg \
forecolor colorArg \
text textArg \
textfont fontArg \
textscale scaleArg \
textstyle fontStyleArg \
textaligny alignYArg \
textalignx alignXArg \
dvartest dvarArg \
showDvar { valueArg } \
}
#define HIDETEXT( nameArg, rectArg, originArg, colorArg, textArg, dvarArg, valueArg, visArg, fontArg, scaleArg, alignYArg, alignXArg, fontStyleArg ) \
itemDef \
{ \
name nameArg \
type ITEM_TYPE_TEXT \
visible visArg \
rect rectArg \
origin originArg \
forecolor colorArg \
text textArg \
textfont fontArg \
textscale scaleArg \
textstyle fontStyleArg \
textaligny alignYArg \
textalignx alignXArg \
dvartest dvarArg \
hideDvar { valueArg } \
}
#define DRAWTEXT_NODVAR( nameArg, rectArg, originArg, colorArg, textArg, visArg, fontArg, scaleArg, alignYArg, alignXArg, fontStyleArg ) \
itemDef \
{ \
name nameArg \
type ITEM_TYPE_TEXT \
visible visArg \
rect rectArg \
origin originArg \
forecolor colorArg \
text textArg \
textfont fontArg \
textscale scaleArg \
textstyle fontStyleArg \
textaligny alignYArg \
textalignx alignXArg \
}
Which produces the rather beautiful (if I don't say so myself) Assault Class menu:
http://imageshack.us/a/img827/1926/assaultclass.png
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.