UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - AllMoDs

Code Snippet
Plaintext
SetPlayerIgnoreRadiusDamage( true );

having this on will ignore all RadiusDamage
other than using this you would have to do a damage override script
to ignore any self damage from the Wunderwaffe or add somthing in
Code Snippet
Plaintext
player_damage_override( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, modelIndex, psOffsetTime )

in _zombiemode.gsc to not affect you from the Wunderwaffe and if it ShellShocks you use this
Code Snippet
Plaintext
self StopShellShock();
in player_damage_override have it check if the damage is coming from the wonderwaffle and stop it there
6 years ago
in zombiemode.gsc take out the
Code Snippet
Plaintext
self FreezeControls( true );
or make it false

Code Snippet
Plaintext
player_fake_death()
{
level notify ("fake_death");
self notify ("fake_death");

//self TakeAllWeapons();
self AllowStand( false );
self AllowCrouch( false );
self AllowProne( true );

self.ignoreme = true;
self EnableInvulnerability();

wait( 1 );
self FreezeControls( true );
}


might be one in _laststand.gsc
where it gives you the revive trigger I made changes to mine so I'm not too sure about that
taking the freeze control out of everywhere that refers to you being down will make it so you can move
when you are down

6 years ago
if your on windows 7 or better
right-click the codwaw.exe go to compatibility and set it to Windows XP Service Pack 2 or 3
this may help i had same prob this was my fix
the cause of my problem may have been different
6 years ago
do you have maya to make the anims
in zombiemode.gsc look for this
[noae]
Code Snippet
Plaintext
init_standard_zombie_anims
[/noae]

if you look in this setup you will see how to add the anims
default zom anims start with    "level.scr_anim["zombie"]"
anims  i added    "level.scr_anim["zomboss1"]"

[noae]
Code Snippet
Plaintext
init_standard_zombie_anims()
{
// deaths
level.scr_anim["zombie"]["death1"] = %ai_zombie_death_v1;
level.scr_anim["zombie"]["death2"] = %ai_zombie_death_v2;
level.scr_anim["zombie"]["death3"] = %ai_zombie_crawl_death_v1;
level.scr_anim["zombie"]["death4"] = %ai_zombie_crawl_death_v2;


level.scr_anim["zomboss1"]["death1"] = %hamerwalk;
level.scr_anim["zomboss1"]["death2"] = %hamerwalk;
level.scr_anim["zomboss1"]["death3"] = %hamerwalk;
level.scr_anim["zomboss1"]["death4"] = %hamerwalk;

level.scr_anim["genu"]["death1"] = %hamerwalk;
level.scr_anim["genu"]["death2"] = %hamerwalk;
level.scr_anim["genu"]["death3"] = %hamerwalk;
level.scr_anim["genu"]["death4"] = %hamerwalk;
// run cycles
level.scr_anim["zomboss1"]["walk1"] = %hamerwalk;
level.scr_anim["zomboss1"]["walk2"] = %hamerwalk;
level.scr_anim["zomboss1"]["walk3"] = %hamerwalk;
level.scr_anim["zomboss1"]["walk4"] = %hamerwalk;

level.scr_anim["genu"]["walk1"] = %hamerwalk;
level.scr_anim["genu"]["walk2"] = %hamerwalk;
level.scr_anim["genu"]["walk3"] = %hamerwalk;
level.scr_anim["genu"]["walk4"] = %hamerwalk;

level.scr_anim["zomboss1"]["run1"] = %hamerwalk;
level.scr_anim["zomboss1"]["run2"] = %hamerwalk;
level.scr_anim["zomboss1"]["run3"] = %hamerwalk;
level.scr_anim["zomboss1"]["run4"] = %hamerwalk;
level.scr_anim["zomboss1"]["run5"] = %hamerwalk;
level.scr_anim["zomboss1"]["run6"] = %hamerwalk;

level.scr_anim["genu"]["run1"] = %hamerwalk;
level.scr_anim["genu"]["run2"] = %hamerwalk;
level.scr_anim["genu"]["run3"] = %hamerwalk;
level.scr_anim["genu"]["run4"] = %hamerwalk;
level.scr_anim["genu"]["run5"] = %hamerwalk;
level.scr_anim["genu"]["run6"] = %hamerwalk;

level.scr_anim["genu"]["sprint1"] = %hamerwalk;
level.scr_anim["genu"]["sprint2"] = %hamerwalk;
level.scr_anim["genu"]["sprint3"] = %hamerwalk;
level.scr_anim["genu"]["sprint4"] = %hamerwalk;



level.scr_anim["zombie"]["walk1"] = %ai_zombie_walk_v1;
level.scr_anim["zombie"]["walk2"] = %ai_zombie_walk_v2;
level.scr_anim["zombie"]["walk3"] = %ai_zombie_walk_v3;
level.scr_anim["zombie"]["walk4"] = %ai_zombie_walk_v4;

level.scr_anim["zombie"]["run1"] = %ai_zombie_walk_fast_v1;
level.scr_anim["zombie"]["run2"] = %ai_zombie_walk_fast_v2;
level.scr_anim["zombie"]["run3"] = %ai_zombie_walk_fast_v3;
level.scr_anim["zombie"]["run4"] = %ai_zombie_run_v2;
level.scr_anim["zombie"]["run5"] = %ai_zombie_run_v4;
level.scr_anim["zombie"]["run6"] = %ai_zombie_run_v3;
//level.scr_anim["zombie"]["run4"] = %ai_zombie_run_v1;
//level.scr_anim["zombie"]["run6"] = %ai_zombie_run_v4;

level.scr_anim["zombie"]["sprint1"] = %ai_zombie_sprint_v1;
level.scr_anim["zombie"]["sprint2"] = %ai_zombie_sprint_v2;
level.scr_anim["zombie"]["sprint3"] = %ai_zombie_sprint_v1;
level.scr_anim["zombie"]["sprint4"] = %ai_zombie_sprint_v2;
//level.scr_anim["zombie"]["sprint3"] = %ai_zombie_sprint_v3;
//level.scr_anim["zombie"]["sprint3"] = %ai_zombie_sprint_v4;
//level.scr_anim["zombie"]["sprint4"] = %ai_zombie_sprint_v5;

// run cycles in prone
level.scr_anim["zombie"]["crawl1"] = %ai_zombie_crawl;
level.scr_anim["zombie"]["crawl2"] = %ai_zombie_crawl_v1;
level.scr_anim["zombie"]["crawl3"] = %ai_zombie_crawl_v2;
level.scr_anim["zombie"]["crawl4"] = %ai_zombie_crawl_v3;
level.scr_anim["zombie"]["crawl5"] = %ai_zombie_crawl_v4;
level.scr_anim["zombie"]["crawl6"] = %ai_zombie_crawl_v5;
level.scr_anim["zombie"]["crawl_hand_1"] = %ai_zombie_walk_on_hands_a;
level.scr_anim["zombie"]["crawl_hand_2"] = %ai_zombie_walk_on_hands_b;




level.scr_anim["zombie"]["crawl_sprint1"] = %ai_zombie_crawl_sprint;
level.scr_anim["zombie"]["crawl_sprint2"] = %ai_zombie_crawl_sprint_1;
level.scr_anim["zombie"]["crawl_sprint3"] = %ai_zombie_crawl_sprint_2;

if( !isDefined( level._zombie_melee ) )
{
level._zombie_melee = [];
}
if( !isDefined( level._zombie_walk_melee ) )
{
level._zombie_walk_melee = [];
}
if( !isDefined( level._zombie_run_melee ) )
{
level._zombie_run_melee = [];
}
level._zombie_melee["genu"] = [];
level._zombie_walk_melee["genu"] = [];
level._zombie_run_melee["genu"] = [];

level._zombie_melee["zomboss1"] = [];
level._zombie_walk_melee["zomboss1"] = [];
level._zombie_run_melee["zomboss1"] = [];

level._zombie_melee["zombie"] = [];
level._zombie_walk_melee["zombie"] = [];
level._zombie_run_melee["zombie"] = [];

level._zombie_melee["genu"][0] = %hamerwalk;
level._zombie_melee["genu"][1] = %hamerwalk;
level._zombie_melee["genu"][2] = %hamerwalk;
level._zombie_melee["genu"][3] = %hamerwalk;
level._zombie_melee["genu"][4] = %hamerwalk;
level._zombie_melee["genu"][5] = %hamerwalk;
level._zombie_melee["genu"][6] = %hamerwalk;

level._zombie_melee["zomboss1"][0] = %hamerwalk;
level._zombie_melee["zomboss1"][1] = %hamerwalk;
level._zombie_melee["zomboss1"][2] = %hamerwalk;
level._zombie_melee["zomboss1"][3] = %hamerwalk;
level._zombie_melee["zomboss1"][4] = %hamerwalk;
level._zombie_melee["zomboss1"][5] = %hamerwalk;
level._zombie_melee["zomboss1"][6] = %hamerwalk;

level._zombie_melee["zombie"][0] = %ai_zombie_attack_forward_v1;
level._zombie_melee["zombie"][1] = %ai_zombie_attack_forward_v2;
level._zombie_melee["zombie"][2] = %ai_zombie_attack_v1;
level._zombie_melee["zombie"][3] = %ai_zombie_attack_v2;
level._zombie_melee["zombie"][4] = %ai_zombie_attack_v1;
level._zombie_melee["zombie"][5] = %ai_zombie_attack_v4;
level._zombie_melee["zombie"][6] = %ai_zombie_attack_v6;
level._zombie_run_melee["zombie"][0] = %ai_zombie_run_attack_v1;
level._zombie_run_melee["zombie"][1] = %ai_zombie_run_attack_v2;
level._zombie_run_melee["zombie"][2] = %ai_zombie_run_attack_v3;
level.scr_anim["zombie"]["walk5"] = %ai_zombie_walk_v6;
level.scr_anim["zombie"]["walk6"] = %ai_zombie_walk_v7;
level.scr_anim["zombie"]["walk7"] = %ai_zombie_walk_v8;
level.scr_anim["zombie"]["walk8"] = %ai_zombie_walk_v9;

if( isDefined( level.zombie_anim_override ) )
{
[[ level.zombie_anim_override ]]();
}

level._zombie_walk_melee["genu"][0] = %hamerwalk;
level._zombie_walk_melee["genu"][1] = %hamerwalk;
level._zombie_walk_melee["genu"][2] = %hamerwalk;
level._zombie_walk_melee["genu"][3] = %hamerwalk;


level._zombie_walk_melee["zomboss1"][0] = %hamerwalk;
level._zombie_walk_melee["zomboss1"][1] = %hamerwalk;
level._zombie_walk_melee["zomboss1"][2] = %hamerwalk;
level._zombie_walk_melee["zomboss1"][3] = %hamerwalk;


level._zombie_walk_melee["zombie"][0] = %ai_zombie_walk_attack_v1;
level._zombie_walk_melee["zombie"][1] = %ai_zombie_walk_attack_v2;
level._zombie_walk_melee["zombie"][2] = %ai_zombie_walk_attack_v3;
level._zombie_walk_melee["zombie"][3] = %ai_zombie_walk_attack_v4;

// melee in crawl
if( !isDefined( level._zombie_melee_crawl ) )
{
level._zombie_melee_crawl = [];
}
level._zombie_melee_crawl["zombie"] = [];
level._zombie_melee_crawl["zombie"][0] = %ai_zombie_attack_crawl;
level._zombie_melee_crawl["zombie"][1] = %ai_zombie_attack_crawl_lunge;

if( !isDefined( level._zombie_stumpy_melee ) )
{
level._zombie_stumpy_melee = [];
}
level._zombie_stumpy_melee["zombie"] = [];
level._zombie_stumpy_melee["zombie"][0] = %ai_zombie_walk_on_hands_shot_a;
level._zombie_stumpy_melee["zombie"][1] = %ai_zombie_walk_on_hands_shot_b;
//level._zombie_melee_crawl["zombie"][2] = %ai_zombie_crawl_attack_A;

// tesla deaths
if( !isDefined( level._zombie_tesla_death ) )
{
level._zombie_tesla_death = [];
}
level._zombie_tesla_death["zombie"] = [];
level._zombie_tesla_death["zombie"][0] = %ai_zombie_tesla_death_a;
level._zombie_tesla_death["zombie"][1] = %ai_zombie_tesla_death_b;
level._zombie_tesla_death["zombie"][2] = %ai_zombie_tesla_death_c;
level._zombie_tesla_death["zombie"][3] = %ai_zombie_tesla_death_d;
level._zombie_tesla_death["zombie"][4] = %ai_zombie_tesla_death_e;

if( !isDefined( level._zombie_tesla_crawl_death ) )
{
level._zombie_tesla_crawl_death = [];
}
level._zombie_tesla_crawl_death["zombie"] = [];
level._zombie_tesla_crawl_death["zombie"][0] = %ai_zombie_tesla_crawl_death_a;
level._zombie_tesla_crawl_death["zombie"][1] = %ai_zombie_tesla_crawl_death_b;

// deaths
if( !isDefined( level._zombie_deaths ) )
{
level._zombie_deaths = [];
}
level._zombie_deaths["zombie"] = [];
level._zombie_deaths["zombie"][0] = %ch_dazed_a_death;
level._zombie_deaths["zombie"][1] = %ch_dazed_b_death;
level._zombie_deaths["zombie"][2] = %ch_dazed_c_death;
level._zombie_deaths["zombie"][3] = %ch_dazed_d_death;

level._zombie_deaths["genu"] = [];
level._zombie_deaths["genu"][0] = %hamerwalk;
level._zombie_deaths["genu"][1] = %hamerwalk;
level._zombie_deaths["genu"][2] = %hamerwalk;
level._zombie_deaths["genu"][3] = %hamerwalk;

level._zombie_deaths["zomboss1"] = [];
level._zombie_deaths["zomboss1"][0] = %hamerwalk;
level._zombie_deaths["zomboss1"][1] = %hamerwalk;
level._zombie_deaths["zomboss1"][2] = %hamerwalk;
level._zombie_deaths["zomboss1"][3] = %hamerwalk;

/*
ground crawl
*/

if( !isDefined( level._zombie_rise_anims ) )
{
level._zombie_rise_anims = [];
}

// set up the arrays
level._zombie_rise_anims["zombie"] = [];

//level._zombie_rise_anims["zombie"][1]["walk"][0] = %ai_zombie_traverse_ground_v1_crawl;
level._zombie_rise_anims["zombie"][1]["walk"][0] = %ai_zombie_traverse_ground_v1_walk;

//level._zombie_rise_anims["zombie"][1]["run"][0] = %ai_zombie_traverse_ground_v1_crawlfast;
level._zombie_rise_anims["zombie"][1]["run"][0] = %ai_zombie_traverse_ground_v1_run;

level._zombie_rise_anims["zombie"][1]["sprint"][0] = %ai_zombie_traverse_ground_climbout_fast;

//level._zombie_rise_anims["zombie"][2]["walk"][0] = %ai_zombie_traverse_ground_v2_walk; //!broken
level._zombie_rise_anims["zombie"][2]["walk"][0] = %ai_zombie_traverse_ground_v2_walk_altA;
//level._zombie_rise_anims["zombie"][2]["walk"][2] = %ai_zombie_traverse_ground_v2_walk_altB;//!broken

// ground crawl death
if( !isDefined( level._zombie_rise_death_anims ) )
{
level._zombie_rise_death_anims = [];
}

level._zombie_rise_death_anims["zombie"] = [];

level._zombie_rise_death_anims["zombie"][1]["in"][0] = %ai_zombie_traverse_ground_v1_deathinside;
level._zombie_rise_death_anims["zombie"][1]["in"][1] = %ai_zombie_traverse_ground_v1_deathinside_alt;

level._zombie_rise_death_anims["zombie"][1]["out"][0] = %ai_zombie_traverse_ground_v1_deathoutside;
level._zombie_rise_death_anims["zombie"][1]["out"][1] = %ai_zombie_traverse_ground_v1_deathoutside_alt;

level._zombie_rise_death_anims["zombie"][2]["in"][0] = %ai_zombie_traverse_ground_v2_death_low;
level._zombie_rise_death_anims["zombie"][2]["in"][1] = %ai_zombie_traverse_ground_v2_death_low_alt;

level._zombie_rise_death_anims["zombie"][2]["out"][0] = %ai_zombie_traverse_ground_v2_death_high;
level._zombie_rise_death_anims["zombie"][2]["out"][1] = %ai_zombie_traverse_ground_v2_death_high_alt;

//taunts
if( !isDefined( level._zombie_run_taunt ) )
{
level._zombie_run_taunt = [];
}
if( !isDefined( level._zombie_board_taunt ) )
{
level._zombie_board_taunt = [];
}
level._zombie_run_taunt["zombie"] = [];
level._zombie_board_taunt["zombie"] = [];

//level._zombie_taunt["zombie"][0] = %ai_zombie_taunts_1;
//level._zombie_taunt["zombie"][1] = %ai_zombie_taunts_4;
//level._zombie_taunt["zombie"][2] = %ai_zombie_taunts_5b;
//level._zombie_taunt["zombie"][3] = %ai_zombie_taunts_5c;
//level._zombie_taunt["zombie"][4] = %ai_zombie_taunts_5d;
//level._zombie_taunt["zombie"][5] = %ai_zombie_taunts_5e;
//level._zombie_taunt["zombie"][6] = %ai_zombie_taunts_5f;
//level._zombie_taunt["zombie"][7] = %ai_zombie_taunts_7;
//level._zombie_taunt["zombie"][8] = %ai_zombie_taunts_9;
//level._zombie_taunt["zombie"][8] = %ai_zombie_taunts_11;
//level._zombie_taunt["zombie"][8] = %ai_zombie_taunts_12;

level._zombie_board_taunt["zombie"][0] = %ai_zombie_taunts_4;
level._zombie_board_taunt["zombie"][1] = %ai_zombie_taunts_7;
level._zombie_board_taunt["zombie"][2] = %ai_zombie_taunts_9;
level._zombie_board_taunt["zombie"][3] = %ai_zombie_taunts_5b;
level._zombie_board_taunt["zombie"][4] = %ai_zombie_taunts_5c;
level._zombie_board_taunt["zombie"][5] = %ai_zombie_taunts_5d;
level._zombie_board_taunt["zombie"][6] = %ai_zombie_taunts_5e;
level._zombie_board_taunt["zombie"][7] = %ai_zombie_taunts_5f;
}

[/noae]

dont use this set up your own your default zom anims might not be the same

and you need to call this on your zombie with custom anims

[noae]
Code Snippet
Plaintext
self maps\_zombiemode_spawner:zombie_spawn_init("zomboss1");
self maps\_zombiemode_spawner_boss::zombie_think();
self maps\_zombiemode_spawner_boss::zombie_setup_attack_properties();
self maps\_zombiemode_spawner_boss::find_flesh();
[/noae]

where it says "zomboss1" is the anima set that will play on that zombie after spawn

and when you make the walk and run anime in maya if that is how your doing it on frame 0 save frame
go to the last frame in the anime move modal forward on x axes save frame this will make the zombie walk or run how fast they move depends on how fare forward you moved the modal on the x axis  need more help pm me
6 years ago
Epic Vegeta Super Saiyan blue transformation
6 years ago
are you running t4m if so its 1022 if you look at  cg_drawfps2 if its on shows limit in top right hand corner
7 years ago
i just downloaded the latest demo(its the first time i download this map) and the game crashes when i launch the mod , any help on that? i really want to try this map it looks really cool .
ps i downloaded TM4 and i got the same issue so it wasnt a t4m error.
pss im running the steam version but with an uncut patch to play zombies because i live in germany.

sorry wish i could help have no clue how to help if you have t4m have you tried lanfix wawexe
7 years ago
looks bad ass good work
7 years ago
 Advance character select & more
7 years ago
it took me awhile but I finally figured out how to Precache your own  named menus
and buy  name I mean the menu file itself and the menu name  so that means you
can make as many in-game menu files as you want and not have to use Activision created menus

step 1

back up this file

Spoiler: click to open...
raw/ui/ingame.txt
this file is what loads all in game menus

step 2
replace whats in side with this
Spoiler: click to open...
{   
   loadMenu { "ui/_yourmenu.menu" } /// your .menu#1
        loadMenu { "ui/_yourmenu2.menu" } /// your .menu #2
   loadMenu { "ui/error.menu" }
   loadMenu { "ui/_allmodsingame.menu" }
   loadMenu { "ui/objective_info.menu" }
   loadMenu { "ui_mp/options.menu" }
   loadMenu { "ui/options_ingame.menu" }
   loadMenu { "ui_mp/menus/ingame_options.menu" }
   loadMenu { "ui_mp/menus/options_look_pc_ingame.menu" }
   loadMenu { "ui_mp/menus/options_move_pc_ingame.menu" }
   loadMenu { "ui_mp/menus/options_shoot_pc_ingame.menu" }
   loadMenu { "ui_mp/menus/options_misc_pc_ingame.menu" }
   loadMenu { "ui_mp/menus/options_graphics_pc_ingame.menu" }
   loadMenu { "ui_mp/menus/options_sound_pc_ingame.menu" }
   loadMenu { "ui_mp/menus/options_control_defaults_ingame.menu" }
   loadMenu { "ui_mp/menus/options_graphics_defaults_ingame.menu" }
   loadMenu { "ui_mp/menus/options_voice_ingame.menu" }
   loadMenu { "ui_mp/menus/options_multi_ingame.menu" }
   loadMenu { "ui_mp/menus/controls_multi_ingame.menu" }
   loadMenu { "ui/vid_restart_pc.menu" }
   loadMenu { "ui/snd_restart.menu" }

   loadMenu { "ui/pregame.menu" }

   loadMenu { "ui/savegame_loading.menu"}
   loadMenu { "ui/savegame_info.menu" }

   loadMenu { "ui/menus/special_features.menu" }
   loadMenu { "ui/menus/invert_axis_pc.menu" }
   loadMenu { "ui/menus/select_difficulty.menu" }
   loadMenu { "ui/difficulty.menu" }
   loadMenu { "ui/popup_leavegame.menu" }
   loadMenu { "ui/popup_ingame.menu" }
        ////loadMenu { "ui_mp/menus/options_game_pc_ingame.menu" }  ////AllMoDs 1/6/2018 referred file does
        //not   exist///////////////
       
}


you will see this
loadMenu { "ui/_yourmenu.menu" } /// your .menu   #1
loadMenu { "ui/_yourmenu2.menu" } /// your .menu #2
add as maney as needed

step 3
add this to mod csv
Spoiler: click to open...
menufile,ui/ingame.txt


note
if you are building your mod and you get a error about duplicate menu
take any
menufile,ui
menufile,ui_mp
files out of mod csv you added the error will teal you what one " they will still get added because of the ingame.txt"
depending on the menu you use the error will give you the menu name not the file name


bugs
the option that has subtitle  settings in it is not there "ingame only"
the option to bind a key for talking and text in it is not there "ingame only"

todo
I will pull the menu files that run the above things and add them in


when you name your menus names, name them the same thing as the file with out the _

so lets say my menu file is _allmodsstore.menu

menu name in file needs to look like this
Spoiler: click to open...
menuDef
{
   name "allmodsstore"



step 4 optional
make a new menu file with this name
Spoiler: click to open...
allmods_setup_common.menu

put this in it
[noae][noae][noae][noae]
Code Snippet
Plaintext
//#define ENABLE_BUTTON_BG		1	// enables button background image
#define ENABLE_SEPARATOR 1 // enables separator bars
#define ENABLE_TITLE_BG 1 // enables menu title background graphics

/*
#ifndef CHOICE_SIZE_X
#error "CHOICE_SIZE_X undefined"
#endif
#ifndef CHOICE_SIZE_Y
#error "CHOICE_SIZE_Y undefined"
#endif
*/

#ifndef CHOICE_SIZE_X
#define CHOICE_SIZE_X 150
#endif

#ifndef CHOICE_SIZE_Y
#define CHOICE_SIZE_Y 22
#endif

#ifndef CHOICE_SIDEITEM_SIZE_X
#define CHOICE_SIDEITEM_SIZE_X 64
#endif
#ifndef CHOICE_SIDEITEM_SPACING
#define CHOICE_SIDEITEM_SPACING 16
#endif

#ifndef CHOICE_GROUP
#define CHOICE_GROUP ""
#endif

#ifndef CHOICE_X_START
#define CHOICE_X_START 1 // +=right  -=left how far left and right ...
#endif

#ifndef CHOICE_X_SPACING
#define CHOICE_X_SPACING 25 //25 is min  // Allmods SPACING from left to right between buttons
#endif

#ifndef CHOICE_Y_START
#define CHOICE_Y_START -40// +=up -=down// up down all buttions
#endif

#ifndef CHOICE_Y_SPACING
#define CHOICE_Y_SPACING 20
#endif

#ifndef CHOICE_Y_COUNT
#define CHOICE_Y_COUNT 20
#endif

#ifndef CHOICE_TEXT_OFFSET_X
#define CHOICE_TEXT_OFFSET_X 22
#endif

#ifndef SECTION_TEXT_OFFSET_X
#define SECTION_TEXT_OFFSET_X 0
#endif

#ifndef CHOICE_ACCEPT_ALIGN_X
#define CHOICE_ACCEPT_ALIGN_X 6
#endif

#ifndef CHOICE_ACCEPT_ALIGN_Y
#define CHOICE_ACCEPT_ALIGN_Y 2
#endif

#ifndef NEW_X_OFFSET
#define NEW_X_OFFSET 0
#endif

#ifndef NEW_Y_OFFSET
#define NEW_Y_OFFSET 0
#endif

#ifndef TITLE_Y_OFFSET
#define TITLE_Y_OFFSET 0
#endif

#ifndef TITLE_X_OFFSET
#define TITLE_X_OFFSET 0
#endif

#ifndef CHOICE_FOCUS_SOUND
#define CHOICE_FOCUS_SOUND ""
#endif

#ifndef CHOICE_ACTION_SOUND
#define CHOICE_ACTION_SOUND "mouse_click"
#endif

#ifndef CHOICE_TEXTSIZE
#define CHOICE_TEXTSIZE TEXTSIZE_DEFAULT
#endif

#ifndef CHOICE_TEXTFONT
#define CHOICE_TEXTFONT UI_FONT_NORMAL
#endif

#ifndef CHOICE_HEADERCOLOR
#define CHOICE_HEADERCOLOR 0 0 0 0
#endif

#ifndef CHOICE_TEXTCOLOR
#define CHOICE_TEXTCOLOR 0 0 0 0//1 1 1 1
#endif

#ifndef CHOICE_TEXTCOLOR_CAPT
#define CHOICE_TEXTCOLOR_CAPT CHOICE_TEXTCOLOR
#endif

#ifndef CHOICE_TEXTSTYLE
#define CHOICE_TEXTSTYLE 0
#endif

#ifndef CHOICE_TEXTALIGN
#define CHOICE_TEXTALIGN ITEM_ALIGN_MIDDLE_LEFT
#endif

#ifndef ALT_HINT_X_OFFSET
#define ALT_HINT_X_OFFSET -16
#endif

#ifndef SECTION_X_OFFSET
#define SECTION_X_OFFSET 0
#endif

#ifndef SECTION_Y_OFFSET
#define SECTION_Y_OFFSET 0
#endif

#ifndef CHOICE_TEXTCOLOR_DISABLED
#define CHOICE_TEXTCOLOR_DISABLED 0 0 0 0
#endif

#ifndef CHOICE_TEXTCOLOR_SELECTABLE
#define CHOICE_TEXTCOLOR_SELECTABLE 0 0 0 0
#endif

#ifndef CHOICE_SEP_WIDTH
#define CHOICE_SEP_WIDTH 130
#endif

#ifndef CHOICE_SEP_OFFSET_X
#define CHOICE_SEP_OFFSET_X 0
#endif

#ifndef CHOICE_SEP_OFFSET_Y
#define CHOICE_SEP_OFFSET_Y 0
#endif

#ifndef CHOICE_DVAR_WIDTH_OFFSET
#define CHOICE_DVAR_WIDTH_OFFSET 120
#endif

#ifndef CHOICE_DVAR_TEXTALIGN
#define CHOICE_DVAR_TEXTALIGN ITEM_ALIGN_MIDDLE_LEFT //ITEM_ALIGN_MIDDLE_RIGHT
#endif

#ifndef CHOICE_DVAR_OFFSET_X
#define CHOICE_DVAR_OFFSET_X (0 - CHOICE_TEXT_OFFSET_X)
#endif

#ifndef CHOICE_SEP_BACKGROUND
#define CHOICE_SEP_BACKGROUND "menu_button_backing"
#endif

#ifndef HIGHLIGHT_SHADER_ART
#define HIGHLIGHT_SHADER_ART "button_highlight_end"
#endif

#ifndef ALTERNATE_HINT_SHADER
#define ALTERNATE_HINT_SHADER "alternate_hint"
#endif

#ifndef ALTERNATE_HINT_COLOR
#define ALTERNATE_HINT_COLOR 0 0 0 0 //0.55 0.95 0.55 0.9//0 1 0 0.35//0.75 .75 0.8 1
#endif

#ifndef HIGHLIGHT_COLOR
#define HIGHLIGHT_COLOR 0 0 0 0
#endif

#ifndef HIGHLIGHT_BORDER_COLOR
#define HIGHLIGHT_BORDER_COLOR 0 0 0 0
#endif

#ifndef CHOICE_HORIZONTAL_ALIGN
#define CHOICE_HORIZONTAL_ALIGN HORIZONTAL_ALIGN_DEFAULT
#endif

#ifndef CHOICE_VERTICAL_ALIGN
#define CHOICE_VERTICAL_ALIGN VERTICAL_ALIGN_DEFAULT
#endif

#ifndef HIGHLIGHT_BORDER
#define HIGHLIGHT_BORDER WINDOW_BORDER_RAISED
#endif

#ifndef HIGHLIGHT_SHADER
#define HIGHLIGHT_SHADER "menu_button_backing_highlight"
#endif

#ifndef A_BUTTON_SIZE
#define A_BUTTON_SIZE 0.4//0.33
#endif

#ifndef A_BUTTON_OFFSET_X
#define A_BUTTON_OFFSET_X 0//(0-4)
#endif

#ifndef A_BUTTON_FONT
#define A_BUTTON_FONT UI_FONT_NORMAL
#endif

#ifndef A_BUTTON_OFFSET_Y
#define A_BUTTON_OFFSET_Y 0
#endif


#ifdef PS3
#define A_BUTTON_BG_COLOR 0 0 0 0
#else
#define A_BUTTON_BG_COLOR 0 0 0 0
#endif

#define A_BUTTON_TEXTSTYLE ITEM_TEXTSTYLE_NORMAL

#ifndef A_BUTTON_COLOR
#define A_BUTTON_COLOR 0 0 0 0
#endif

#ifndef BUTTON_BG_COLOR
#define BUTTON_BG_COLOR .0 .0 .0 .0//0 0 0 0.5
#endif

// ------------ splitscreen ----------------


// -----------------------------------------

#if !defined( CHOICE_SEP_1 ) || !defined( CHOICE_SEP_SPACING )
#define CHOICE_SEP_TOTAL_SPACING( itemIndex ) 0
#elif !defined( CHOICE_SEP_2 )
#define CHOICE_SEP_TOTAL_SPACING( itemIndex ) ((itemIndex <= CHOICE_SEP_1) ? 0 : CHOICE_SEP_SPACING )
#elif !defined( CHOICE_SEP_3 )
#define CHOICE_SEP_TOTAL_SPACING( itemIndex ) ((itemIndex <= CHOICE_SEP_1) ? 0 : ( (itemIndex <= CHOICE_SEP_2) ? CHOICE_SEP_SPACING : CHOICE_SEP_SPACING * 2 ) )
#else
#define CHOICE_SEP_TOTAL_SPACING( itemIndex ) ((itemIndex <= CHOICE_SEP_1) ? 0 : ( (itemIndex <= CHOICE_SEP_2) ? CHOICE_SEP_SPACING : ( (itemIndex <= CHOICE_SEP_3) ? CHOICE_SEP_SPACING * 2 : CHOICE_SEP_SPACING * 3) ) )
#endif

#define CHOICE_ROW( itemIndex ) ((itemIndex - 1) % CHOICE_Y_COUNT)
#define CHOICE_COL( itemIndex ) ((itemIndex - 1 - ((itemIndex - 1) % CHOICE_Y_COUNT)) / CHOICE_Y_COUNT)


#ifdef PC
#ifndef CHOICE_Y_OFFSET
#define CHOICE_Y_OFFSET 40
#endif
#else
#define CHOICE_Y_OFFSET 0
#endif

#define CHOICE_X( itemIndex ) (CHOICE_X_START + CHOICE_X_SPACING * CHOICE_COL( itemIndex ))
#define CHOICE_Y( itemIndex ) (CHOICE_Y_START + CHOICE_Y_OFFSET + CHOICE_Y_SPACING * CHOICE_ROW( itemIndex ) + CHOICE_SEP_TOTAL_SPACING( itemIndex ))
#define CHOICE_ORIGIN( itemIndex ) CHOICE_X( itemIndex ) CHOICE_Y( itemIndex )
#define CHOICE_RECT( itemIndex ) CHOICE_ORIGIN( itemIndex ) CHOICE_SIZE_X CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN

#define FOOTNOTE_RECT( x, y ) x y 240 60 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN

// ======================================================================================================================================
// ======================================================================================================================================
// ======================================================================================================================================

#define CHOICE_HIGHLIGHT( itemIndex, vis ) \
CHOICE_HIGHLIGHT_CUSTOM( itemIndex, HIGHLIGHT_COLOR, HIGHLIGHT_BORDER_COLOR, vis )

#define UI_EDGE( porigin, palign, poffset_x, poffset_y, pcolor ) \
UI_EDGE_RAW( porigin, palign, 5, 20, poffset_x, poffset_y, pcolor )

#define UI_EDGE_REVERSE( porigin, palign, poffset_x, poffset_y, pcolor ) \
UI_EDGE_RAW( porigin, palign, -5, 20, poffset_x, poffset_y, pcolor )

#define UI_EDGE_RAW( porigin, palign, pw, ph, poffset_x, poffset_y, pcolor ) \
itemDef \
{ \
style WINDOW_STYLE_SHADER \
rect porigin pw ph palign \
origin poffset_x poffset_y \
background HIGHLIGHT_SHADER_ART \
forecolor pcolor \
visible 1; \
decoration \
} \

#define CHOICE_BUTTON_BG( itemIndex, visArg ) \
CHOICE_BUTTON_BG_RAW( itemIndex, "menu_button_backing", BUTTON_BG_COLOR, visArg )

#define CHOICE_BUTTON_BG_RAW( itemIndex, bgimage, foreColorArg, visArg ) \
itemDef \
{ \
style WINDOW_STYLE_SHADER \
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X-(CHOICE_SIZE_Y/4)) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
exp material( bgimage ); \
forecolor foreColorArg \
visible visArg; \
decoration \
}

#define CHOICE_HIGHLIGHT_CUSTOM( itemIndex, foreColorArg, borderColorArg, visArg ) \
itemDef \
{ \
style WINDOW_STYLE_SHADER \
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X-(CHOICE_SIZE_Y/4)) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
background "menu_button_backing_highlight" \
forecolor 0 0 0 0 \
border HIGHLIGHT_BORDER \
bordersize 2 \
bordercolor borderColorArg \
visible when( localVarInt( ui_highlight ) == itemIndex && localVarString( ui_choicegroup ) == CHOICE_GROUP && visArg ); \
decoration \
} \
CHOICE_ACCEPT_HINT( itemIndex, visArg )

#define CHOICE_HIGHLIGHT_CUSTOM_NOICON( itemIndex, foreColorArg, borderColorArg, visArg ) \
itemDef \
{ \
style WINDOW_STYLE_SHADER \
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X-(CHOICE_SIZE_Y/4)) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
background "menu_button_backing_highlight" \
forecolor foreColorArg \
border HIGHLIGHT_BORDER \
bordersize 2 \
bordercolor borderColorArg \
visible when( localVarInt( ui_highlight ) == itemIndex && localVarString( ui_choicegroup ) == CHOICE_GROUP && visArg ); \
decoration \
} \

// used for custom highlights for itemDefs that are special and can not use itemIndex or complie with the strict alignment of this macro set
#define CHOICE_HIGHLIGHT_CUSTOM_2( px, py, pw, ph, visArg ) \
itemDef \
{ \
style WINDOW_STYLE_SHADER \
rect (px+(ph/4)) py (-(pw-(ph/4))) ph CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
background HIGHLIGHT_SHADER \
forecolor BUTTON_BG_COLOR \
visible 1 \
decoration \
} \
itemDef \
{ \
style WINDOW_STYLE_SHADER \
rect (px+(ph/4)) py (-(pw-(ph/4))) ph CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
background HIGHLIGHT_SHADER \
forecolor HIGHLIGHT_COLOR \
visible visArg \
decoration \
}

//CHOICE_TEXT_OFFSET_X

#if defined( CONSOLE ) && !defined( SPLITSCREEN )
#define CHOICE_ACCEPT_HINT( itemIndex, vis ) \
itemDef \
{ \
rect CHOICE_RECT( itemIndex ) \
origin A_BUTTON_OFFSET_X A_BUTTON_OFFSET_Y \
text "@PLATFORM_UI_SELECTBUTTON" \
textfont A_BUTTON_FONT \
textscale A_BUTTON_SIZE \
textstyle A_BUTTON_TEXTSTYLE \
textAlign CHOICE_TEXTALIGN \
textAlignX 0\
textAlignY -1\
forecolor 1 1 1 1 \
visible when( localVarInt( ui_highlight ) == itemIndex && localVarString( ui_choicegroup ) == CHOICE_GROUP && vis ); \
decoration \
}
#else // #if defined( CONSOLE ) && !defined( SPLITSCREEN )
#define CHOICE_ACCEPT_HINT( itemIndex, vis )
#endif // #else // #if defined( CONSOLE ) && !defined( SPLITSCREEN )

#ifdef CONSOLE
#define TITLE_STRIP \
/* title bar */ \
itemDef \
{ \
style WINDOW_STYLE_SHADER \
rect -5 40 640 25 HORIZONTAL_ALIGN_FULLSCREEN VERTICAL_ALIGN_FULLSCREEN \
background "menu_lobby_title_back" \
forecolor 0.2137 0.2346 0.2398 0.75 \
/*forecolor COLOR_TITLEBAR*/ \
visible 1 \
decoration \
} \
/* bottom white strip */ \
itemDef \
{ \
style WINDOW_STYLE_SHADER \
rect -107 65 854 1 HORIZONTAL_ALIGN_FULLSCREEN VERTICAL_ALIGN_FULLSCREEN \
background "menu_white_line_faded" \
forecolor 0.20 0.216 0.22 1 \
visible 1 \
decoration \
}

#define OVERLAY_TITLE_STRIP \
itemDef \
{ \
style WINDOW_STYLE_SHADER \
rect -107 66 500 27 HORIZONTAL_ALIGN_FULLSCREEN VERTICAL_ALIGN_FULLSCREEN \
background "gradient" \
forecolor COLOR_TITLEBAR \
visible 1 \
decoration \
}
#else // #ifdef CONSOLE
#define TITLE_STRIP
#define OVERLAY_TITLE_STRIP
#endif // #else // #ifdef CONSOLE

#define CHOICE_MENU_TITLE_SS( titleArg ) \
itemDef \
{ \
type ITEM_TYPE_TEXT \
rect 22 5 100 100 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_TOP \
origin ORIGIN_TITLE \
forecolor COLOR_TITLE \
exp text( titleArg ) \
textalignx -14 \
textfont UI_FONT_NORMAL \
textscale TEXTSIZE_DEFAULT \
textstyle CHOICE_TEXTSTYLE \
textalign ITEM_ALIGN_TOP_LEFT \
visible 1 \
decoration \
}

#define CHOICE_MENU_TITLE_NO_STRIP( titleArg ) \
itemDef \
{ \
type ITEM_TYPE_TEXT \
rect 22 5 100 100 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_TOP \
origin ORIGIN_TITLE \
forecolor COLOR_TITLE \
exp text( titleArg ) \
textfont UI_FONT_NORMAL \
textscale TEXTSIZE_TITLE \
textstyle CHOICE_TEXTSTYLE \
textalign ITEM_ALIGN_TOP_LEFT \
textaligny TITLE_Y_OFFSET \
textalignx TITLE_X_OFFSET \
visible 1 \
decoration \
}

#define CHOICE_MENU_TITLE( titleArg ) \
/* white bar backing */ \
TITLE_STRIP \
itemDef \
{ \
type ITEM_TYPE_TEXT \
rect 22 5 100 100 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_TOP \
origin ORIGIN_TITLE \
forecolor COLOR_TITLE \
exp text( titleArg ) \
textfont UI_FONT_OBJECTIVE \
textscale TEXTSIZE_TITLE \
textstyle CHOICE_TEXTSTYLE \
textalign ITEM_ALIGN_TOP_LEFT \
textaligny TITLE_Y_OFFSET \
textalignx TITLE_X_OFFSET \
visible 1 \
decoration \
}

#define CHOICE_MENU_TITLE_VIS( titleArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_TEXT \
rect 22 5 100 100 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_TOP \
origin ORIGIN_TITLE \
forecolor COLOR_TITLE \
text titleArg \
textfont UI_FONT_NORMAL \
textscale TEXTSIZE_TITLE \
textstyle CHOICE_TEXTSTYLE \
textalign ITEM_ALIGN_TOP_LEFT \
visible when( visArg ) \
decoration \
}

#define CHOICE_OVERLAY_TITLE( titleArg ) \
CHOICE_OVERLAY_TITLE_VIS( titleArg, 1 )

#define CHOICE_OVERLAY_TITLE_VIS( titleArg, visArg ) \
/* black bar backing */ \
/*OVERLAY_TITLE_STRIP*/ \
itemDef \
{ \
type ITEM_TYPE_TEXT \
rect 22 32 100 100 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_TOP \
origin ORIGIN_TITLE \
forecolor COLOR_TITLE \
exp text( titleArg ) \
textfont UI_FONT_NORMAL \
textscale TEXTSIZE_TITLE \
textstyle CHOICE_TEXTSTYLE \
textalign ITEM_ALIGN_TOP_LEFT \
textaligny TITLE_Y_OFFSET \
textalignx TITLE_X_OFFSET \
visible visArg \
decoration \
}

#define CHOICE_OVERLAY_SUB_TITLE( titleArg ) \
CHOICE_OVERLAY_SUB_TITLE_VIS( titleArg, 1 )

#ifdef PC
#define CHOICE_OVERLAY_SUB_TITLE_VIS( titleArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_TEXT \
rect 22 58 300 100 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_TOP \
origin ORIGIN_TITLE \
forecolor COLOR_TITLE \
exp text( titleArg ) \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
textalign ITEM_ALIGN_TOP_LEFT \
textaligny TITLE_Y_OFFSET \
textalignx TITLE_X_OFFSET \
visible visArg \
autowrapped\
decoration \
}
#else
#define CHOICE_OVERLAY_SUB_TITLE_VIS( titleArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_TEXT \
rect 22 58 100 100 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_TOP \
origin ORIGIN_TITLE \
forecolor COLOR_TITLE \
exp text( titleArg ) \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
textalign ITEM_ALIGN_TOP_LEFT \
textaligny TITLE_Y_OFFSET \
textalignx TITLE_X_OFFSET \
visible visArg \
decoration \
}
#endif

#define CHOICE_SECTION_TITLE( itemIndex, titleArg ) \
CHOICE_SECTION_TITLE_VIS( itemIndex, titleArg, 1 )

#define CHOICE_SECTION_TITLE_VIS( itemIndex, titleArg, visArg ) \
itemDef \
{ \
style WINDOW_STYLE_SHADER \
rect (SECTION_X_OFFSET+0) (SECTION_Y_OFFSET+3) 245 1 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
origin CHOICE_ORIGIN( itemIndex ) \
background "menu_white_line_faded" \
forecolor 0 0 0 0 \
visible visArg \
decoration \
} \
itemDef \
{ \
style WINDOW_STYLE_SHADER \
rect (SECTION_X_OFFSET+0) (SECTION_Y_OFFSET+4) 245 17 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
origin CHOICE_ORIGIN( itemIndex ) \
background "menu_black_line" \
forecolor 0 0 0 0 \
visible visArg \
decoration \
} \
itemDef \
{ \
style WINDOW_STYLE_SHADER \
rect (SECTION_X_OFFSET+0) (SECTION_Y_OFFSET+21) 245 1 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
origin CHOICE_ORIGIN( itemIndex ) \
background "menu_white_line_faded" \
forecolor 0 0 0 0 \
visible visArg \
decoration \
} \
itemDef \
{ \
type ITEM_TYPE_TEXT \
rect (SECTION_X_OFFSET+0) (SECTION_Y_OFFSET-1) 245 24 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
origin CHOICE_ORIGIN( itemIndex ) \
forecolor 0 0 0 0 \
exp text( titleArg );\
textstyle ITEM_TEXTSTYLE_SHADOWED \
textfont UI_FONT_OBJECTIVE \
textscale TEXTSIZE_DEFAULT \
textstyle CHOICE_TEXTSTYLE \
textAlign ITEM_ALIGN_MIDDLE_CENTER \
textAlignX SECTION_TEXT_OFFSET_X \
visible visArg \
decoration \
}


#define CHOICE_SEPARATOR( afterItemIndex ) \
CHOICE_SEPARATOR_VIS( afterItemIndex, when( ENABLE_SEPARATOR ) )

#define CHOICE_SEPARATOR_VIS( afterItemIndex, visArg ) \
itemDef \
{ \
style WINDOW_STYLE_SHADER \
rect (CHOICE_SEP_OFFSET_X) (CHOICE_Y_SPACING + CHOICE_SEP_SPACING / 2 + CHOICE_SEP_OFFSET_Y ) CHOICE_SEP_WIDTH 1 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
origin CHOICE_ORIGIN( afterItemIndex ) \
background CHOICE_SEP_BACKGROUND \
forecolor 0 0 0 0 \
visible visArg \
decoration \
}

#define CHOICE_BUTTON( itemIndex, textArg, actionArg ) \
CHOICE_BUTTON_VIS( itemIndex, textArg, actionArg, 1 )

#define CHOICE_BUTTON_NOHI( itemIndex, textArg, actionArg ) \
CHOICE_BUTTON_VIS_NOHI( itemIndex, textArg, actionArg, 1 )

#define CHOICE_BUTTON_VIS( itemIndex, textArg, actionArg, visArg ) \
CHOICE_BUTTON_BG( itemIndex, visArg ) \
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
CHOICE_BUTTON_VIS_NOHI( itemIndex, textArg, actionArg, visArg )

#define CHOICE_BUTTON_VIS_ADV( itemIndex, textArg, actionArg, visArg, vis ) \
CHOICE_BUTTON_BG( itemIndex, visArg ) \
CHOICE_HIGHLIGHT( itemIndex, vis ) \
CHOICE_BUTTON_VIS_NOHI( itemIndex, textArg, actionArg, visArg )

#define CHOICE_BUTTON_VIS_NOHI( itemIndex, textArg, actionArg, visArg ) \
CHOICE_BUTTON_FOCUS_VIS_NOHI( itemIndex, textArg, actionArg, ;, ;, visArg )

#define CHOICE_BUTTON_FOCUS( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg ) \
CHOICE_BUTTON_FOCUS_VIS( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, 1 )

#define CHOICE_BUTTON_FOCUS_NOHI( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg ) \
CHOICE_BUTTON_FOCUS_VIS_NOHI( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, 1 )

#define CHOICE_BUTTON_FOCUS_VIS( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg ) \
CHOICE_BUTTON_BG( itemIndex, visArg ) \
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
CHOICE_BUTTON_FOCUS_VIS_NOHI( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg )

#define CHOICE_BUTTON_FOCUS_VIS_NOICON( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg ) \
CHOICE_BUTTON_BG( itemIndex, visArg ) \
CHOICE_HIGHLIGHT_CUSTOM_NOICON( itemIndex, HIGHLIGHT_COLOR, HIGHLIGHT_BORDER_COLOR, 1 ) \
CHOICE_BUTTON_FOCUS_VIS_NOHI_NOICON( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg )

#define CHOICE_BUTTON_FOCUS_VIS_NOHI_NOICON( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg ) \
CHOICE_BUTTON_FOCUS_VIS_NOHI( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg )

#define CHOICE_BUTTON_FOCUS_VIS_ADV( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg, vis ) \
CHOICE_BUTTON_BG( itemIndex, visArg ) \
CHOICE_HIGHLIGHT( itemIndex, vis ) \
CHOICE_BUTTON_FOCUS_VIS_NOHI( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg )

#define CHOICE_BUTTON_FOCUS_VIS_NOHI( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg ) \
CHOICE_BUTTON_FOCUS_VIS_NOHI_EX( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg, ; )

#define CHOICE_BUTTON_EX( itemIndex, textArg, actionArg, extraArgs ) \
CHOICE_BUTTON_BG( itemIndex, 1 ) \
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
CHOICE_BUTTON_FOCUS_VIS_NOHI_EX( itemIndex, textArg, actionArg, ;, ;, 1, extraArgs )

#define CHOICE_BUTTON_NOHI_EX( itemIndex, textArg, actionArg, extraArgs ) \
CHOICE_BUTTON_FOCUS_VIS_NOHI_EX( itemIndex, textArg, actionArg, ;, ;, 1, extraArgs )

#define CHOICE_BUTTON_EX_ADV( itemIndex, textArg, actionArg, extraArgs, visArg ) \
CHOICE_BUTTON_BG( itemIndex, 1 ) \
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
CHOICE_BUTTON_FOCUS_VIS_NOHI_EX( itemIndex, textArg, actionArg, ;, ;, visArg, extraArgs )

#define CHOICE_BUTTON_FOCUS_VIS_EX( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg, extraArgs ) \
CHOICE_BUTTON_BG( itemIndex, visArg ) \
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
CHOICE_BUTTON_FOCUS_VIS_NOHI_EX( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg, extraArgs )

#define CHOICE_BUTTON_FOCUS_VIS_EX_ADV( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg, extraArgs, vis ) \
CHOICE_BUTTON_BG( itemIndex, visArg ) \
CHOICE_HIGHLIGHT( itemIndex, vis ) \
CHOICE_BUTTON_FOCUS_VIS_NOHI_EX( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg, extraArgs )

#define CHOICE_BUTTON_FOCUS_VIS_NOHI_EX( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg, extraArgs ) \
itemDef \
{ \
type ITEM_TYPE_BUTTON \
rect CHOICE_RECT( itemIndex ) \
exp text( textArg ); \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
textAlign CHOICE_TEXTALIGN \
textAlignX CHOICE_TEXT_OFFSET_X \
forecolor CHOICE_TEXTCOLOR \
visible visArg \
extraArgs \
CHOICE_SCRIPTS_ALL( itemIndex, actionArg, onFocusArg, leaveFocusArg ) \
} \

#define CHOICE_BUTTON_COLOR_VIS( itemIndex, textArg, colorArg, visArg ) \
CHOICE_BUTTON_BG( itemIndex, visArg ) \
CHOICE_BUTTON_FOCUS_COLOR_VIS_NOHI_EX( itemIndex, textArg, ;, ;, ;, colorArg, visArg, ; ) \

#define CHOICE_BUTTON_FOCUS_COLOR_VIS_NOHI_EX( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, colorArg, visArg, extraArgs ) \
itemDef \
{ \
type ITEM_TYPE_BUTTON \
rect CHOICE_RECT( itemIndex ) \
exp text( textArg ); \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
textAlign CHOICE_TEXTALIGN \
textAlignX CHOICE_TEXT_OFFSET_X \
forecolor colorArg \
visible visArg \
extraArgs \
CHOICE_SCRIPTS_ALL( itemIndex, actionArg, onFocusArg, leaveFocusArg ) \
} \

#define CHOICE_DBUTTON_VIS( itemIndex, textArg, visArg ) \
CHOICE_BUTTON_BG( itemIndex, visArg ) \
itemDef \
{ \
type ITEM_TYPE_TEXT \
rect CHOICE_RECT( itemIndex ) \
exp text( textArg ); \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
textAlign CHOICE_TEXTALIGN \
textAlignX CHOICE_TEXT_OFFSET_X \
forecolor CHOICE_TEXTCOLOR_DISABLED \
visible visArg \
decoration \
} \

#define CHOICE_DBUTTON_NO_BG_VIS( itemIndex, textArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_TEXT \
rect CHOICE_RECT( itemIndex ) \
exp text( textArg ); \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
textAlign CHOICE_TEXTALIGN \
textAlignX CHOICE_TEXT_OFFSET_X \
forecolor CHOICE_TEXTCOLOR_DISABLED \
visible visArg \
decoration \
} \

#define STATUS_AREA( textArg, xArg, yArg, visArg ) \
itemDef { \
name description_status \
type ITEM_TYPE_TEXT \
rect 10 0 210 36 CHOICE_HORIZONTAL_ALIGN VERTICAL_ALIGN_TOP \
origin xArg yArg \
text textArg \
textfont CHOICE_TEXTFONT \
textscale TEXTSIZE_SMALL \
textaligny 16 \
forecolor COLOR_DESC_TEXT \
visible visArg \
autowrapped \
decoration \
}

#define CHOICE_DVARENUMLIST( itemIndex, textArg, dvarArg, dvarListArg, actionArg ) \
CHOICE_DVARLIST_VIS( itemIndex, textArg, dvarArg, ITEM_TYPE_DVARENUM, dvarEnumList dvarListArg, actionArg, 1 )

#define CHOICE_DVARENUMLIST_VIS( itemIndex, textArg, dvarArg, dvarListArg, actionArg, visArg ) \
CHOICE_DVARLIST_VIS( itemIndex, textArg, dvarArg, ITEM_TYPE_DVARENUM, dvarEnumList dvarListArg, actionArg, visArg )

#define CHOICE_DVARSTRINGLIST( itemIndex, textArg, dvarArg, strListArg, actionArg ) \
CHOICE_DVARLIST_VIS( itemIndex, textArg, dvarArg, ITEM_TYPE_MULTI, dvarStrList strListArg, actionArg, 1 )

#define CHOICE_DVARSTRINGLIST_VIS( itemIndex, textArg, dvarArg, strListArg, actionArg, visArg ) \
CHOICE_DVARLIST_VIS( itemIndex, textArg, dvarArg, ITEM_TYPE_MULTI, dvarStrList strListArg, actionArg, visArg )

#define CHOICE_DVARFLOATLIST( itemIndex, textArg, dvarArg, strListArg, actionArg ) \
CHOICE_DVARLIST_VIS( itemIndex, textArg, dvarArg, ITEM_TYPE_MULTI, dvarFloatList strListArg, actionArg, 1 )

#define CHOICE_DVARFLOATLIST_VIS( itemIndex, textArg, dvarArg, strListArg, actionArg, visArg ) \
CHOICE_DVARLIST_VIS( itemIndex, textArg, dvarArg, ITEM_TYPE_MULTI, dvarFloatList strListArg, actionArg, visArg )

#define CHOICE_DVARFLOATLIST_FOCUS_VIS( itemIndex, textArg, dvarArg, strListArg, actionArg, onFocusArg, leaveFocusArg, visArg ) \
CHOICE_DVARLIST_FOCUS_VIS( itemIndex, textArg, dvarArg, ITEM_TYPE_MULTI, dvarFloatList strListArg, actionArg, onFocusArg, leaveFocusArg, visArg )

#define CHOICE_DVARLIST_VIS( itemIndex, textArg, dvarArg, listTypeArg, listArg, actionArg, visArg ) \
CHOICE_DVARLIST_FOCUS_VIS( itemIndex, textArg, dvarArg, listTypeArg, listArg, actionArg, ;, ;, visArg )

#define CHOICE_DVARLIST_FOCUS_VIS( itemIndex, textArg, dvarArg, listTypeArg, listArg, actionArg, onFocusArg, leaveFocusArg, visArg ) \
CHOICE_CAPTION_VIS( itemIndex, textArg, visArg ) \
itemDef \
{ \
type listTypeArg \
dvar dvarArg \
listArg \
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+CHOICE_DVAR_WIDTH_OFFSET) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
textalign CHOICE_DVAR_TEXTALIGN \
textalignx CHOICE_DVAR_OFFSET_X \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle ITEM_TEXTSTYLE_SHADOWED \
style WINDOW_STYLE_FILLED \
forecolor CHOICE_TEXTCOLOR \
visible visArg ; \
CHOICE_SCRIPTS_ALL( itemIndex, actionArg, onFocusArg, leaveFocusArg ) \
}

#define CHOICE_DDVAR_VIS( itemIndex, textArg, dvarArg, visArg ) \
CHOICE_BUTTON_BG_RAW( itemIndex, "menu_button_backing", BUTTON_BG_COLOR, visArg ) \
itemDef \
{ \
type ITEM_TYPE_TEXT \
exp text( textArg ); \
rect CHOICE_RECT( itemIndex ) \
textAlign CHOICE_TEXTALIGN \
textAlignX CHOICE_TEXT_OFFSET_X \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
forecolor CHOICE_TEXTCOLOR_DISABLED \
visible visArg \
decoration \
} \
itemDef \
{ \
type ITEM_TYPE_TEXT \
dvar dvarArg \
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+CHOICE_DVAR_WIDTH_OFFSET) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
textAlign CHOICE_DVAR_TEXTALIGN \
textAlignX CHOICE_DVAR_OFFSET_X \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
forecolor CHOICE_TEXTCOLOR_DISABLED \
visible visArg \
decoration \
}

#define CHOICE_DDVARALTTEXT_VIS( itemIndex, textArg, textArg1, visArg ) \
CHOICE_BUTTON_BG_RAW( itemIndex, "menu_button_backing", BUTTON_BG_COLOR, visArg ) \
itemDef \
{ \
type ITEM_TYPE_TEXT \
exp text( textArg ); \
rect CHOICE_RECT( itemIndex ) \
textAlign CHOICE_TEXTALIGN \
textAlignX CHOICE_TEXT_OFFSET_X \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
forecolor CHOICE_TEXTCOLOR_DISABLED \
visible visArg \
decoration \
} \
itemDef \
{ \
type ITEM_TYPE_TEXT \
exp text( textArg1 ) \
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+CHOICE_DVAR_WIDTH_OFFSET) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
textAlign CHOICE_DVAR_TEXTALIGN \
textAlignX CHOICE_DVAR_OFFSET_X \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
forecolor CHOICE_TEXTCOLOR_DISABLED \
visible visArg \
decoration \
}

#define CHOICE_STATUS_COLOR_VIS( itemIndex, textArg, colorArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_TEXT \
rect CHOICE_RECT( itemIndex ) \
exp text( textArg ); \
textalign ITEM_ALIGN_MIDDLE_RIGHT \
textalignx (0 - CHOICE_TEXT_OFFSET_X) \
textscale CHOICE_TEXTSIZE \
style WINDOW_STYLE_FILLED \
forecolor colorArg \
visible visArg ; \
decoration \
}

#define CHOICE_NEWICON_VIS( itemIndex, imageArg, visArg ) \
itemDef \
{ \
style WINDOW_STYLE_SHADER \
rect (CHOICE_X( itemIndex ) + CHOICE_SIZE_X + NEW_X_OFFSET ) (CHOICE_Y( itemIndex )+2+NEW_Y_OFFSET) (CHOICE_SIZE_Y*2) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
exp material( imageArg ) \
visible visArg ; \
decoration \
}

#define CHOICE_COLLECTIBLEICON_VIS( itemIndex, imageArg, visArg ) \
itemDef \
{ \
style WINDOW_STYLE_SHADER \
rect (CHOICE_X( itemIndex ) - CHOICE_SIZE_Y ) CHOICE_Y( itemIndex ) CHOICE_SIZE_Y CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
exp material( imageArg ) \
visible visArg ; \
decoration \
}

#define CHOICE_LOCKEDICON_VIS( itemIndex, imageArg, visArg ) \
itemDef \
{ \
style WINDOW_STYLE_SHADER \
rect (CHOICE_X( itemIndex ) + CHOICE_SIZE_X + NEW_X_OFFSET ) (CHOICE_Y( itemIndex )+2+NEW_Y_OFFSET) 12 12 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
exp material( imageArg ) \
visible visArg ; \
decoration \
}

#define CHOICE_LEFTITEM_VIS( itemIndex, textArg, colorArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_TEXT \
rect (CHOICE_X( itemIndex ) - CHOICE_SIDEITEM_SIZE_X - CHOICE_SIDEITEM_SPACING) CHOICE_Y( itemIndex ) CHOICE_SIDEITEM_SIZE_X CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
exp text( textArg ); \
textalign ITEM_ALIGN_MIDDLE_LEFT \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle ITEM_TEXTSTYLE_SHADOWED \
style WINDOW_STYLE_FILLED \
forecolor colorArg \
visible visArg ; \
decoration \
}

#define CHOICE_DLEFTBUTTON_VIS( itemIndex, textArg, visArg ) \
CHOICE_BUTTON_BG( itemIndex, visArg ) \
itemDef \
{ \
type ITEM_TYPE_TEXT \
rect (CHOICE_X( itemIndex ) - CHOICE_SIDEITEM_SIZE_X - CHOICE_SIDEITEM_SPACING) CHOICE_Y( itemIndex ) CHOICE_SIDEITEM_SIZE_X CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
exp text( textArg ); \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle ITEM_TEXTSTYLE_SHADOWED \
style WINDOW_STYLE_FILLED \
textAlign ITEM_ALIGN_MIDDLE_LEFT \
forecolor CHOICE_TEXTCOLOR_DISABLED \
visible visArg \
decoration \
} \

#define CHOICE_LEFTITEM2_VIS( itemIndex, textArg, colorArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_TEXT \
rect (CHOICE_X( itemIndex ) - CHOICE_SIDEITEM_SIZE_X - CHOICE_SIDEITEM_SPACING - 45) CHOICE_Y( itemIndex ) CHOICE_SIDEITEM_SIZE_X CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
exp text( textArg ); \
textalign ITEM_ALIGN_MIDDLE_LEFT \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle ITEM_TEXTSTYLE_SHADOWED \
style WINDOW_STYLE_FILLED \
forecolor colorArg \
visible visArg ; \
decoration \
}

#define CHOICE_RIGHTITEM_VIS( itemIndex, textArg, colorArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_TEXT \
rect (CHOICE_X( itemIndex ) + CHOICE_SIDEITEM_SIZE_X + CHOICE_SIDEITEM_SPACING) CHOICE_Y( itemIndex ) CHOICE_SIDEITEM_SIZE_X CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
exp text( textArg ); \
textalign ITEM_ALIGN_MIDDLE_RIGHT \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle ITEM_TEXTSTYLE_SHADOWED \
style WINDOW_STYLE_FILLED \
forecolor colorArg \
visible visArg ; \
decoration \
}

#define CHOICE_DVAREDIT_NUMERIC( itemIndex, textArg, dvarArg, max_chars, actionArg ) \
CHOICE_DVAREDIT_NUMERIC_VIS( itemIndex, textArg, dvarArg, max_chars, actionArg, 1 )

#define CHOICE_DVAREDIT_NUMERIC_VIS( itemIndex, textArg, dvarArg, max_chars, actionArg, visArg ) \
CHOICE_CAPTION_VIS( itemIndex, textArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_NUMERICFIELD \
text " " \
dvar dvarArg \
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+CHOICE_DVAR_WIDTH_OFFSET) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
textalign ITEM_ALIGN_MIDDLE_LEFT \
textalignx (CHOICE_SIZE_X+8) /*(-(CHOICE_TEXT_OFFSET_X))*/ \
textscale CHOICE_TEXTSIZE \
textstyle ITEM_TEXTSTYLE_SHADOWED \
style WINDOW_STYLE_FILLED \
forecolor CHOICE_TEXTCOLOR \
visible visArg \
maxChars max_chars \
CHOICE_SCRIPTS_ACTION( itemIndex, actionArg ) \
}


#define CHOICE_DVAREDIT( itemIndex, textArg, dvarArg, actionArg ) \
CHOICE_DVAREDIT_VIS( itemIndex, textArg, dvarArg, 31, 18, actionArg, 1 )

#define CHOICE_DVAREDIT_VIS( itemIndex, textArg, dvarArg, max_chars, max_paintchars, actionArg, visArg ) \
CHOICE_CAPTION_VIS( itemIndex, textArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_EDITFIELD \
text " " \
dvar dvarArg \
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+CHOICE_DVAR_WIDTH_OFFSET) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
textalign ITEM_ALIGN_MIDDLE_LEFT \
textalignx (CHOICE_SIZE_X+8) /*(-(CHOICE_TEXT_OFFSET_X))*/ \
textscale CHOICE_TEXTSIZE \
textstyle ITEM_TEXTSTYLE_SHADOWED \
style WINDOW_STYLE_FILLED \
forecolor CHOICE_TEXTCOLOR \
visible visArg \
maxChars max_chars \
maxpaintchars max_paintchars \
CHOICE_SCRIPTS_ACTION( itemIndex, actionArg ) \
}

#define CHOICE_DVARSLIDER( itemIndex, textArg, dvarArg, defaultArg, minArg, maxArg, actionArg ) \
CHOICE_DVARSLIDER_VIS( itemIndex, textArg, dvarArg, defaultArg, minArg, maxArg, actionArg, 1 )

#define CHOICE_DVARSLIDER_VIS( itemIndex, textArg, dvarArg, defaultArg, minArg, maxArg, actionArg, visArg ) \
CHOICE_DVARSLIDER_VIS_EX( itemIndex, textArg, dvarArg, defaultArg, minArg, maxArg, actionArg, ;, 1 )

#define CHOICE_DVARSLIDER_VIS_EX( itemIndex, textArg, dvarArg, defaultArg, minArg, maxArg, actionArg, extraArg, visArg ) \
CHOICE_CAPTION( itemIndex, textArg ) \
itemDef \
{ \
type ITEM_TYPE_SLIDER \
dvarfloat dvarArg defaultArg minArg maxArg \
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+CHOICE_DVAR_WIDTH_OFFSET) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
textalign ITEM_ALIGN_MIDDLE_LEFT \
textalignx (CHOICE_SIZE_X+20) /*(-(CHOICE_TEXT_OFFSET_X))*/ \
textscale CHOICE_TEXTSIZE \
textstyle ITEM_TEXTSTYLE_SHADOWED \
style WINDOW_STYLE_FILLED \
forecolor CHOICE_TEXTCOLOR \
visible visArg \
extraArg \
CHOICE_SCRIPTS_ACTION( itemIndex, actionArg ) \
}


#define CHOICE_DVARYESNO( itemIndex, textArg, dvarArg, actionArg ) \
CHOICE_DVARYESNO_VIS( itemIndex, textArg, dvarArg, actionArg, 1 )

#define CHOICE_DVARYESNO_VIS( itemIndex, textArg, dvarArg, actionArg, visArg ) \
CHOICE_CAPTION_VIS( itemIndex, textArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_YESNO \
dvar dvarArg \
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+CHOICE_DVAR_WIDTH_OFFSET) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
textalign ITEM_ALIGN_MIDDLE_LEFT \
textalignx (CHOICE_SIZE_X+20)/*(-(CHOICE_TEXT_OFFSET_X))*/ \
textscale CHOICE_TEXTSIZE \
textstyle ITEM_TEXTSTYLE_SHADOWED \
style WINDOW_STYLE_FILLED \
forecolor CHOICE_TEXTCOLOR \
visible visArg \
CHOICE_SCRIPTS_ACTION( itemIndex, actionArg ) \
}

#define CHOICE_BIND( itemIndex, textArg, cmdArg, actionArg ) \
CHOICE_BIND_VIS( itemIndex, textArg, cmdArg, actionArg, 1, 1 )

#define CHOICE_BIND_VIS( itemIndex, textArg, cmdArg, actionArg, visArg, vis ) \
CHOICE_CAPTION_VIS( itemIndex, textArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_BIND \
dvar cmdArg \
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+120) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
textalign ITEM_ALIGN_MIDDLE_LEFT \
textalignx (CHOICE_SIZE_X+20)/*(-(CHOICE_TEXT_OFFSET_X))*/ \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
style WINDOW_STYLE_FILLED \
forecolor CHOICE_TEXTCOLOR \
visible visArg \
CHOICE_SCRIPTS_ALL( itemIndex, actionArg, show keyBindStatus, hide keyBindStatus ) \
}

#define CHOICE_BIND2( itemIndex, textArg, cmdArg, actionArg ) \
CHOICE_BIND2_VIS( itemIndex, textArg, cmdArg, actionArg, 1 )

#define CHOICE_BIND2_VIS( itemIndex, textArg, cmdArg, actionArg, visArg ) \
CHOICE_CAPTION_VIS( itemIndex, textArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_BIND2 \
dvar cmdArg \
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+120) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
textalign ITEM_ALIGN_MIDDLE_LEFT \
textalignx (CHOICE_SIZE_X+20)/*(-(CHOICE_TEXT_OFFSET_X))*/ \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
style WINDOW_STYLE_FILLED \
forecolor CHOICE_TEXTCOLOR \
visible visArg \
CHOICE_SCRIPTS_ALL( itemIndex, actionArg, show keyBindStatus, hide keyBindStatus ) \
}

#define CHOICE_BIND3( itemIndex, textArg, cmdArg, actionArg ) \
CHOICE_BIND3_VIS( itemIndex, textArg, cmdArg, actionArg, 1, 1 )

#define CHOICE_BIND3_VIS( itemIndex, textArg, cmdArg, actionArg, visArg, vis ) \
CHOICE_CAPTION_VIS22( itemIndex, textArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_BIND \
dvar cmdArg \
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+120) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
textalign ITEM_ALIGN_MIDDLE_LEFT \
textalignx (CHOICE_SIZE_X+20)/*(-(CHOICE_TEXT_OFFSET_X))*/ \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
style WINDOW_STYLE_FILLED \
forecolor CHOICE_TEXTCOLOR \
visible when(dvarInt("sub_menu") == 2 ); \ \
CHOICE_SCRIPTS_ALL( itemIndex, actionArg, show keyBindStatus, hide keyBindStatus ) \
}
#define CHOICE_CAPTION_VIS22( itemIndex, textArg, visArg ) \
CHOICE_CAPTION22_COLOR_VIS( itemIndex, textArg, CHOICE_TEXTCOLOR_CAPT, visArg )

#define CHOICE_CAPTION22_COLOR_VIS( itemIndex, textArg, colorArg, visArg ) \
CHOICE_BUTTON_BG( itemIndex, visArg ) \
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
itemDef \
{ \
type ITEM_TYPE_BUTTON \
rect CHOICE_RECT( itemIndex ) \
exp text( textArg ); \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
textAlign CHOICE_TEXTALIGN \
textAlignX CHOICE_TEXT_OFFSET_X \
forecolor colorArg \
visible when(dvarInt("sub_menu") == 2 ); \
decoration \
}
#define CHOICE_BIND4( itemIndex, textArg, cmdArg, actionArg ) \
CHOICE_BIND4_VIS( itemIndex, textArg, cmdArg, actionArg, 1, 1 )

#define CHOICE_BIND4_VIS( itemIndex, textArg, cmdArg, actionArg, visArg, vis ) \
CHOICE_CAPTION_VIS44( itemIndex, textArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_BIND \
dvar cmdArg \
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+120) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
textalign ITEM_ALIGN_MIDDLE_LEFT \
textalignx (CHOICE_SIZE_X+20)/*(-(CHOICE_TEXT_OFFSET_X))*/ \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
style WINDOW_STYLE_FILLED \
forecolor CHOICE_TEXTCOLOR \
visible when(dvarInt("sub_menu") == 1 ); \ \
CHOICE_SCRIPTS_ALL( itemIndex, actionArg, show keyBindStatus, hide keyBindStatus ) \
}
#define CHOICE_CAPTION_VIS44( itemIndex, textArg, visArg ) \
CHOICE_CAPTION44_COLOR_VIS( itemIndex, textArg, CHOICE_TEXTCOLOR_CAPT, visArg )

#define CHOICE_CAPTION44_COLOR_VIS( itemIndex, textArg, colorArg, visArg ) \
CHOICE_BUTTON_BG( itemIndex, visArg ) \
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
itemDef \
{ \
type ITEM_TYPE_BUTTON \
rect CHOICE_RECT( itemIndex ) \
exp text( textArg ); \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
textAlign CHOICE_TEXTALIGN \
textAlignX CHOICE_TEXT_OFFSET_X \
forecolor colorArg \
visible when(dvarInt("sub_menu") == 1 ); \
decoration \
}

#define CHOICE_CAPTION( itemIndex, textArg ) \
CHOICE_CAPTION_VIS( itemIndex, textArg, 1 )

#define CHOICE_CAPTION_COLOR( itemIndex, textArg, colorArg ) \
CHOICE_CAPTION_COLOR_VIS( itemIndex, textArg, colorArg, 1 )

#define CHOICE_CAPTION_VIS( itemIndex, textArg, visArg ) \
CHOICE_CAPTION_COLOR_VIS( itemIndex, textArg, CHOICE_TEXTCOLOR_CAPT, visArg )

#define CHOICE_CAPTION_COLOR_VIS( itemIndex, textArg, colorArg, visArg ) \
CHOICE_BUTTON_BG( itemIndex, visArg ) \
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
itemDef \
{ \
type ITEM_TYPE_BUTTON \
rect CHOICE_RECT( itemIndex ) \
exp text( textArg ); \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
textAlign CHOICE_TEXTALIGN \
textAlignX CHOICE_TEXT_OFFSET_X \
forecolor colorArg \
visible visArg \
decoration \
}

#define CHOICE_TEXT_VIS( itemIndex, textArg, colorArg, visArg ) \
CHOICE_BUTTON_BG( itemIndex, visArg ) \
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
itemDef \
{ \
type ITEM_TYPE_TEXT \
rect CHOICE_RECT( itemIndex ) \
exp text( textArg ); \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
textAlign CHOICE_TEXTALIGN \
textAlignX CHOICE_TEXT_OFFSET_X \
forecolor colorArg \
visible visArg \
decoration \
}

#define CHOICE_SUBTEXT_COLOR_VIS( itemIndex, textArg, colorArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_BUTTON \
rect CHOICE_RECT( itemIndex ) \
exp text( textArg ); \
textfont CHOICE_TEXTFONT \
textscale CHOICE_TEXTSIZE \
textstyle CHOICE_TEXTSTYLE \
textAlign ITEM_ALIGN_MIDDLE_LEFT \
forecolor colorArg \
visible visArg \
decoration \
}


#define CHOICE_SCRIPTS_ACTION( itemIndex, actionArg ) \
CHOICE_SCRIPTS_ALL( itemIndex, actionArg, ;, ; )



#define CHOICE_SCRIPTS_ALL( itemIndex, actionArg, onFocusArg, leaveFocusArg ) \
onFocus \
{ \
setLocalVarInt ui_highlight itemIndex; \
setLocalVarString ui_choicegroup CHOICE_GROUP; \
play CHOICE_FOCUS_SOUND setdvar vile_on_1 itemIndex; \
setdvar spin 0; \
onFocusArg \
} \
leaveFocus \
{ \
setLocalVarInt ui_highlight 0 setdvar bind_on_1 0; \
setdvar spin 0; \
leaveFocusArg \
} \
action \
{ \
play CHOICE_ACTION_SOUND ; \
actionArg; \
}


#define CHOICE_APPLY( textArg, actionArg ) \
CHOICE_APPLY_VIS( textArg, actionArg, 1 )

#define CHOICE_APPLY_VIS( textArg, actionArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_BUTTON \
rect 430 422 100 16 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
text textArg \
textfont UI_FONT_NORMAL \
textscale CHOICE_TEXTSIZE \
textstyle ITEM_TEXTSTYLE_SHADOWED \
textAlign ITEM_ALIGN_MIDDLE_CENTER \
forecolor COLOR_FOCUSED \
visible visArg ; \
action \
{ \
play "mouse_click"; \
actionArg; \
} \
}

#define CHOICE_BACK( textArg, actionArg ) \
CHOICE_BACK_VIS( textArg, actionArg, 1 )

#define CHOICE_BACK_VIS( textArg, actionArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_BUTTON \
rect 270 422 100 16 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
text textArg \
textfont UI_FONT_NORMAL \
textscale CHOICE_TEXTSIZE \
textstyle ITEM_TEXTSTYLE_SHADOWED \
textAlign ITEM_ALIGN_MIDDLE_CENTER \
forecolor COLOR_FOCUSED \
visible visArg ; \
action \
{ \
play "mouse_click"; \
actionArg; \
} \
}


#define CHOICE_FOOTNOTE( textArg, x, y ) \
CHOICE_FOOTNOTE_VIS( textArg, x, y, 1 )

#define CHOICE_FOOTNOTE_VIS( textArg, x, y, visArg ) \
itemDef \
{ \
text textArg \
rect FOOTNOTE_RECT( x, y ) \
autowrapped \
textfont CHOICE_TEXTFONT \
textscale TEXTSIZE_SMALL \
textstyle ITEM_TEXTSTYLE_SHADOWED \
textalign ITEM_ALIGN_TOP_LEFT \
visible visArg \
decoration \
}


#define CHOICE_KEYBINDHELP \
itemDef \
{ \
name keyBindStatus \
rect -190 -8 300 20 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM \
ownerdraw UI_KEYBINDSTATUS \
textstyle ITEM_TEXTSTYLE_SHADOWED \
style WINDOW_STYLE_FILLED \
backcolor 0 0 0 0 \
forecolor .9 .9 .9 1 \
border 0 \
bordercolor .5 .5 .5 .5 \
textscale TEXTSIZE_SMALL \
textalign ITEM_ALIGN_MIDDLE_LEFT \
visible 0 \
decoration \
}

#define COLUMN_TITLE_X 100
#define COLUMN_TITLE_Y (111+21)

#define LEADERBOARD_COL_TITLE( porgin, ptext, palign ) \
LEADERBOARD_COL_TITLE_VIS( porgin, ptext, palign, 1 )

#define LEADERBOARD_COL_TITLE_VIS( porgin, ptext, palign, visArg ) \
itemDef \
{ \
type ITEM_TYPE_TEXT \
origin porgin \
text ptext \
textscale TEXTSIZE_SMALL \
textfont UI_FONT_NORMAL \
textalign palign \
forecolor 1 1 1 1 \
visible visArg \
decoration \
}



[/noae][/noae][/noae][/noae]
put file in raw/ui

add this to mod csv
Spoiler: click to open...
menufile,ui/allmods_setup_common.menu



line 317 you will see this
Spoiler: click to open...
forecolor      0 0 0 0 \

that is hiding the little bar that shows up when your mouse cursor is over a menu option
change zeros to ones to make it show again

the advantages of having my setup_common
#1 you can track which menu option your mouse is over in GSC with checking this  dvar "vile_on_1"
#2 the whole entire screen is gridded out so you can add a menu button anywhere from top to bottom 20 buttons
and from left to right 500 or more give or take
#3 added to  button binds that can be hidden CHOICE_BIND3 set to show on dvar sub_menu  = 2 and CHOICE_BIND4 set to show on dvar sub_menu  = 3



just a menu with one sub menu
and itemDef I made myself
that makes it so any image you put there becomes a button regardless of shape and size
and you can have it do things when your mouse touches it leaves off of it and when you click it
like MenuResponse "??????"; to pick up in gsc see menu for use
or to make a keypad with a combination code like I did for my map

Spoiler: click to open...
//  allmods 81 total buttons  error after that
#include "ui/menudef.h"
#include "ui/allmods_setup_common.menu"
menuDef
{
   name "SAME NAME AS FILE WITH OUT _"
   fullScreen      0            
   rect         0 0 640 480   HORIZONTAL_ALIGN_FULLSCREEN VERTICAL_ALIGN_FULLSCREEN         // Size and position of the menu
   focusColor      COLOR_FOCUSED   // Menu focus color for text and items
   style         WINDOW_STYLE_SHADER
   background      "??????"
   visible when   (dvarInt("sub_menu") == 1);
   onOpen
   {
      setdvar sub_menu "1"; // CAN TAKE OUT AND SET ON CLIENT
            
   }
   onClose
   {
      setdvar sub_menu "1";
   }
   onESC
   {
      close self;
   }
   itemDef                                                      
   {                                                         
      name         "DONTMATER" 
      type         ITEM_TYPE_BUTTON
      rect         -120 -285 120 200 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
      forecolor      1 1 1 1                               //ALLMoDs\\
      style         WINDOW_STYLE_SHADER
      background      "?????"
      visible when   (dvarInt("sub_menu") == 1);
      action
      {
         //MenuResponse "????";
         setdvar sub_menu "2";
         //close self;
      }
      mouseEnter
      {
         //MenuResponse "??????";
         //setdvar ???? "?";
      }
      mouseexit      
      {
            //setdvar ???? "9";
            //MenuResponse "??????";
      }
   }
   itemDef                                                      
   {                                                         
      name         "DONTMATER"
      type         ITEM_TYPE_BUTTON
      rect         180 -285 120 200 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
      forecolor      1 1 1 1                               //ALLMoDs\\
      style         WINDOW_STYLE_SHADER
      background      ""?????""
      visible when   (dvarInt("sub_menu") == 2);
      action
      {
         //MenuResponse "????";
         setdvar sub_menu "1";
         //close self;
      }
      mouseEnter
      {
         //MenuResponse "??????";
         //setdvar ???? "?";
      }
      mouseexit      
      {
            //setdvar ???? "?";
            //MenuResponse "??????";
      }
   }
   /////////////sub menu 2 background ///////////
   itemDef                                                      
   {                                                         
      name         "sub_menu_2_background" 
      rect         -30 -170 100 100   HORIZONTAL_ALIGN_CENTER HORIZONTAL_ALIGN_CENTER   
      forecolor      1 1 1 1                              
      style         WINDOW_STYLE_SHADER
      background      "???????"
      visible when   (dvarInt("sub_menu") == 2);
                  
   }
   ///////////pick show when mouse is on CHOICE_BUTTON_VIS \\ localVarInt( ui_highlight ) ==  BUTTON # //////////////
   itemDef                                                      
   {                                                         
      name         "AllMoDs_Menu_1_pic" 
      rect         -30 -170 100 100   HORIZONTAL_ALIGN_CENTER HORIZONTAL_ALIGN_CENTER   
      forecolor      1 1 1 1                               //ALLMoDs\\
      style         WINDOW_STYLE_SHADER
      background      "?????"
      visible when   (localVarInt( ui_highlight ) == 1 && dvarInt("sub_menu") == 1);
                  
   }
   ///////////////////text///////////////////
   itemDef
   {
      name         "AllMoDs_Menu_3_text"
      rect         0 -400 0 0 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
      textscale      0.5
      textstyle      ITEM_TEXTSTYLE_SHADOWEDMORE
      textfont      UI_FONT_OBJECTIVE
      textalign      ITEM_ALIGN_CENTER
      forecolor      1 1 1 1
      exp text      ("text her or a dver")
      visible when   (dvarInt("sub_menu") == 1 );
   }
   CHOICE_BUTTON_VIS( 1, "to submenu 1", setdvar sub_menu "2", when(dvarInt("sub_menu") == 1 ); )
   CHOICE_BUTTON_VIS( 1, "back to main menu", setdvar sub_menu "1", when(dvarInt("sub_menu") == 2 ); )
   //CHOICE_BUTTON_VIS( BUTTON #, "button text can have collor", action LIKE SET DVARS OR MenuResponse "????", WHEN TO AHOW; )
}

replace all ????? with proper stuff
will add more soon


7 years ago
wow nice mod  ::)

Double Post Merge: February 24, 2018, 01:20:32 pm
btw how u install this ? :derp:
EVERY THING IS IN THE DOWNLOAD AND HOW TO INSTALL MY BAD FOR CAPS
7 years ago

more updates coming
fly en 90%  dun
7 years ago
Loading ...