208 lines
9.4 KiB
Text
208 lines
9.4 KiB
Text
#include "ui/menudef.h"
|
|
#include "ui_mp/common_macro.inc"
|
|
|
|
#ifdef CONSOLE
|
|
#undef ORIGIN_TITLE
|
|
#define ORIGIN_TITLE 0 0
|
|
#endif
|
|
|
|
#define CHOICE_X_START 0//22
|
|
#define CHOICE_Y_START 65
|
|
|
|
#ifdef CONSOLE
|
|
#undef CHOICE_X_START
|
|
#define CHOICE_X_START 0
|
|
|
|
#undef CHOICE_Y_START
|
|
#define CHOICE_Y_START 65
|
|
#else
|
|
#undef CHOICE_X_START
|
|
#define CHOICE_X_START 30
|
|
|
|
#undef CHOICE_Y_START
|
|
#define CHOICE_Y_START 65
|
|
#endif
|
|
|
|
#define CHOICE_SEP_OFFSET_Y -2
|
|
#define CHOICE_SEP_1 5
|
|
|
|
#include "ui_mp/menustyle.inc"
|
|
#include "ui/choices_setup_common.menu"
|
|
|
|
#define ORIGIN_STATUS 390 64
|
|
#define MENU_FONT_COLOR2 1 1 1 0.5
|
|
#define LOCKED_BORDER_COLOR 1 1 1 0.5
|
|
#define LOCAL_UNLOCK_COLOR 0.31 0.31 0.33 0.55
|
|
#define ORIGIN_DESCRIPTION (CHOICE_X_START + 15) 320
|
|
|
|
#define LOCKED_IMAGE_X 110
|
|
#define LOCKED_IMAGE_Y 0
|
|
|
|
#define LOCKED_TITLE_X 20
|
|
#define LOCKED_TITLE_Y (LOCKED_IMAGE_Y + 100)
|
|
|
|
#define LOCKED_DESC_X (LOCKED_TITLE_X)
|
|
#define LOCKED_DESC_Y (LOCKED_TITLE_Y + 20)
|
|
|
|
#define LOCKED_WIDTH 270
|
|
#define LOCKED_ALIGN HORIZONTAL_ALIGN_RIGHT VERTICAL_ALIGN_TOP
|
|
|
|
#undef NEW_X_OFFSET
|
|
#define NEW_X_OFFSET (-CHOICE_SIZE_Y)
|
|
|
|
#ifdef PC
|
|
#define ORIGIN_LOCKED ((-(LOCKED_WIDTH - RIGHTITEM_OFFSET))-80) 38
|
|
#else
|
|
#define ORIGIN_LOCKED ((-(LOCKED_WIDTH - RIGHTITEM_OFFSET))-10) 38
|
|
#endif
|
|
|
|
#include "ui_mp/stats_info.inc"
|
|
#include "ui_mp/overlaybg.inc"
|
|
|
|
{
|
|
// CREATE A CLASS MAIN
|
|
menuDef
|
|
{
|
|
name cac_main
|
|
rect 0 0 640 470 HORIZONTAL_ALIGN_FULLSCREEN VERTICAL_ALIGN_FULLSCREEN
|
|
focuscolor COLOR_FOCUSED
|
|
#ifdef PC_INGAME
|
|
style WINDOW_STYLE_EMPTY
|
|
#else
|
|
style WINDOW_STYLE_FILLED
|
|
blurWorld 7.0
|
|
#endif
|
|
soundloop "music_mainmenu"
|
|
onOpen
|
|
{
|
|
#ifdef PC_INGAME
|
|
//hidemenu "endofgame";
|
|
#endif
|
|
setdvar invite_visible "0";
|
|
setLocalVarBool ui_inOverlay "1";
|
|
//setLocalVarBool ui_hideBack 1;
|
|
}
|
|
onClose
|
|
{
|
|
#ifdef PC_INGAME
|
|
//showmenu "endofgame";
|
|
setLocalVarBool ui_inOverlay "0";
|
|
#endif
|
|
//setLocalVarBool ui_hideBack 0;
|
|
}
|
|
onEsc
|
|
{
|
|
execnow "uploadstats";
|
|
setdvar invite_visible "1";
|
|
close self;
|
|
}
|
|
|
|
// background from overlaybg.inc
|
|
#ifdef PC
|
|
BACKGROUND_BLACK_LETTERBOX_BLURWORLD_VIS( 1.0, 0 )
|
|
#endif
|
|
OVERLAY_BACKGROUND
|
|
|
|
#define STAT_CAC_PRIMARY_GRENADE stat( dvarInt( ui_custom_class_highlighted ) + 200 )
|
|
#define STAT_CAC_PRIMARY stat( dvarInt( ui_custom_class_highlighted ) + 201 )
|
|
#define STAT_CAC_PRIMARY_ATTACHMENT stat( dvarInt( ui_custom_class_highlighted ) + 202 )
|
|
#define STAT_CAC_SECONDARY stat( dvarInt( ui_custom_class_highlighted ) + 203 )
|
|
#define STAT_CAC_SECONDARY_ATTACHMENT stat( dvarInt( ui_custom_class_highlighted ) + 204 )
|
|
#define STAT_CAC_SPECIALTY_EQUIPMENT stat( dvarInt( ui_custom_class_highlighted ) + 205 )
|
|
#define STAT_CAC_SPECIALTY_WEAPON stat( dvarInt( ui_custom_class_highlighted ) + 206 )
|
|
#define STAT_CAC_SPECIALTY_ABILITY stat( dvarInt( ui_custom_class_highlighted ) + 207 )
|
|
#define STAT_CAC_SPECIAL_GRENADE stat( dvarInt( ui_custom_class_highlighted ) + 208 )
|
|
#define STAT_CAC_CAMO stat( dvarInt( ui_custom_class_highlighted ) + 209 )
|
|
#define STAT_CAC_SPECIALTY_VEHICLE stat( dvarInt( ui_custom_class_highlighted ) + 305 )
|
|
|
|
#include "ui_mp/cac_loadout.inc"
|
|
#include "ui/safearea.menu"
|
|
|
|
// ------------------ statics ------------------------
|
|
CHOICE_OVERLAY_TITLE( "@MPUI_CREATE_A_CLASS_CAP" )
|
|
#ifndef PC
|
|
// RENAME BUTTON =============================================================
|
|
itemDef
|
|
{
|
|
rect 90 -4 0 0 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_BOTTOM
|
|
origin 0 0
|
|
text "@PLATFORM_RENAME"
|
|
textfont CHOICE_TEXTFONT
|
|
textscale TEXTSIZE_SMALL
|
|
textalign ITEM_ALIGN_BOTTOM_LEFT
|
|
execkeyint BUTTON_X {CAC_SETUP_ACTION_RENAME}
|
|
visible 1
|
|
decoration
|
|
}
|
|
#endif
|
|
#include "ui_mp/navcontrols.inc"
|
|
|
|
//=========================================================
|
|
//===================== MENU SELECTION ====================
|
|
//=========================================================
|
|
#define SETUP_ACTION_CAC( stat_range_s ) \
|
|
open menu_cac_custom; \
|
|
statSetUsingTable( stat_range_s, 1 ); \
|
|
close self;
|
|
|
|
#define PRESTIGE 2326
|
|
#define WIDTH 250
|
|
//loadout display
|
|
CAC_LOADOUT_NORMAL_VIS( dvarBool( ui_show_loadout ) )
|
|
LOCKED_CLASS_VIS( when( !dvarBool( ui_show_loadout ) ) )
|
|
|
|
CHOICE_BUTTON_FOCUS_VIS( 1, dvarString( customclass1 ), SETUP_ACTION_CAC( "300" ), setdvar ui_custom_class_highlighted "0"; setdvar ui_custom_name customclass1; setdvar ui_hide_desc "0"; setdvar ui_show_loadout 1, ;, 1 )
|
|
CHOICE_NEWICON_VIS( 1, "specialty_new", when( stat(300) == 0 ) )
|
|
|
|
CHOICE_BUTTON_FOCUS_VIS( 2, dvarString( customclass2 ), SETUP_ACTION_CAC( "310" ), setdvar ui_custom_class_highlighted "10"; setdvar ui_custom_name customclass2; setdvar ui_hide_desc "0"; setdvar ui_show_loadout 1, ;, 1 )
|
|
CHOICE_NEWICON_VIS( 2, "specialty_new", when( stat(310) == 0 ) )
|
|
|
|
CHOICE_BUTTON_FOCUS_VIS( 3, dvarString( customclass3 ), SETUP_ACTION_CAC( "320" ), setdvar ui_custom_class_highlighted "20";setdvar ui_custom_name customclass3; setdvar ui_hide_desc "0"; setdvar ui_show_loadout 1, ;, 1 )
|
|
CHOICE_NEWICON_VIS( 3, "specialty_new", when( stat(320) == 0 ) )
|
|
|
|
CHOICE_BUTTON_FOCUS_VIS( 4, dvarString( customclass4 ), SETUP_ACTION_CAC( "330" ), setdvar ui_custom_class_highlighted "30"; setdvar ui_custom_name customclass4; setdvar ui_hide_desc "0"; setdvar ui_show_loadout 1, ;, 1 )
|
|
CHOICE_NEWICON_VIS( 4, "specialty_new", when( stat(330) == 0 ) )
|
|
|
|
CHOICE_BUTTON_FOCUS_VIS( 5, dvarString( customclass5 ), SETUP_ACTION_CAC( "340" ), setdvar ui_custom_class_highlighted "40"; setdvar ui_custom_name customclass5; setdvar ui_hide_desc "0"; setdvar ui_show_loadout 1, ;, 1 )
|
|
CHOICE_NEWICON_VIS( 5, "specialty_new", when( stat(340) == 0 ) )
|
|
|
|
CHOICE_SEPARATOR( CHOICE_SEP_1 )
|
|
|
|
#define SHOW_LOCKED setdvar ui_show_loadout 0;
|
|
#define SHOW_UNLOCKED setdvar ui_show_loadout 1;
|
|
|
|
#define PRESTIGE_FOCUS( pnum, class_name_dvar ) \
|
|
setdvar ui_custom_name dvarString( class_name_dvar ); \
|
|
setdvar ui_prestige_unlock_desc "@CLASS_PRESTIGE_UNLOCK_DESC"#pnum;
|
|
|
|
CHOICE_BUTTON_FOCUS_VIS( 6, dvarString( prestigeclass1 ), SETUP_ACTION_CAC( "1300" ), PRESTIGE_FOCUS( 1, prestigeclass1 ) SHOW_UNLOCKED; setdvar ui_custom_class_highlighted "1000"; setdvar ui_custom_name prestigeclass1;, ;, when( stat(PRESTIGE) > 0 ) )
|
|
CHOICE_BUTTON_FOCUS_VIS_NOHI( 6, "", ;, setdvar ui_pnum 1; PRESTIGE_FOCUS( 1, prestigeclass1 ) SHOW_LOCKED, ;, when( stat(PRESTIGE) == 0 ) )
|
|
CHOICE_DBUTTON_VIS( 6, dvarString( prestigeclass1 ), when( stat(PRESTIGE) < 1 ) )
|
|
CHOICE_NEWICON_VIS( 6, "specialty_new", when( stat(1300) == 0 && stat(PRESTIGE) > 0 ) )
|
|
CHOICE_LOCKEDICON_VIS( 6, "specialty_locked", when( stat(PRESTIGE) < 1 ) )
|
|
|
|
CHOICE_BUTTON_FOCUS_VIS( 7, dvarString( prestigeclass2 ), SETUP_ACTION_CAC( "1310" ), PRESTIGE_FOCUS( 2, prestigeclass2 ) SHOW_UNLOCKED; setdvar ui_custom_class_highlighted "1010"; setdvar ui_custom_name prestigeclass2;, ;, when( stat(PRESTIGE) > 1 ) )
|
|
CHOICE_BUTTON_FOCUS_VIS_NOHI( 7, "", ;, setdvar ui_pnum 2; PRESTIGE_FOCUS( 2, prestigeclass2 ) SHOW_LOCKED, ;, when( stat(PRESTIGE) < 2 ) )
|
|
CHOICE_DBUTTON_VIS( 7, dvarString( prestigeclass2 ), when( stat(PRESTIGE) < 2 ) )
|
|
CHOICE_NEWICON_VIS( 7, "specialty_new", when( stat(1310) == 0 && stat(PRESTIGE) > 1 ) )
|
|
CHOICE_LOCKEDICON_VIS( 7, "specialty_locked", when( stat(PRESTIGE) < 2 ) )
|
|
|
|
CHOICE_BUTTON_FOCUS_VIS( 8, dvarString( prestigeclass3 ), SETUP_ACTION_CAC( "1320" ), PRESTIGE_FOCUS( 3, prestigeclass3 ) SHOW_UNLOCKED; setdvar ui_custom_class_highlighted "1020"; setdvar ui_custom_name prestigeclass3;, ;, when( stat(PRESTIGE) > 3 ) )
|
|
CHOICE_BUTTON_FOCUS_VIS_NOHI( 8, "", ;, setdvar ui_pnum 3; PRESTIGE_FOCUS( 3, prestigeclass3 ) SHOW_LOCKED, ;, when( stat(PRESTIGE) < 4 ) )
|
|
CHOICE_DBUTTON_VIS( 8, dvarString( prestigeclass3 ), when( stat(PRESTIGE) < 4 ) )
|
|
CHOICE_NEWICON_VIS( 8, "specialty_new", when( stat(1320) == 0 && stat(PRESTIGE) > 3 ) )
|
|
CHOICE_LOCKEDICON_VIS( 8, "specialty_locked", when( stat(PRESTIGE) < 4 ) )
|
|
|
|
CHOICE_BUTTON_FOCUS_VIS( 9, dvarString( prestigeclass4 ), SETUP_ACTION_CAC( "1330" ); SETUP_ACTION_CAC( "257" ), PRESTIGE_FOCUS( 4, prestigeclass4 ) SHOW_UNLOCKED; setdvar ui_custom_class_highlighted "1030"; setdvar ui_custom_name prestigeclass4;, ;, when( stat(PRESTIGE) > 6 ) )
|
|
CHOICE_BUTTON_FOCUS_VIS_NOHI( 9, "", ;, setdvar ui_pnum 4; PRESTIGE_FOCUS( 4, prestigeclass4 ) SHOW_LOCKED, ;, when( stat(PRESTIGE) < 7 ) )
|
|
CHOICE_DBUTTON_VIS( 9, dvarString( prestigeclass4 ), when( stat(PRESTIGE) < 7 ) )
|
|
CHOICE_NEWICON_VIS( 9, "specialty_new", when( stat(1330) == 0 && stat(PRESTIGE) > 6 ) )
|
|
CHOICE_LOCKEDICON_VIS( 9, "specialty_locked", when( stat(PRESTIGE) < 7 ) )
|
|
|
|
CHOICE_BUTTON_FOCUS_VIS( 10, dvarString( prestigeclass5 ), SETUP_ACTION_CAC( "1340" ); SETUP_ACTION_CAC( "258" ), PRESTIGE_FOCUS( 5, prestigeclass5 ) SHOW_UNLOCKED; setdvar ui_custom_class_highlighted "1040"; setdvar ui_custom_name prestigeclass5;, ;, when( stat(PRESTIGE) > 9 ) )
|
|
CHOICE_BUTTON_FOCUS_VIS_NOHI( 10, "", ;, setdvar ui_pnum 5; PRESTIGE_FOCUS( 5, prestigeclass5 ) SHOW_LOCKED, ;, when( stat(PRESTIGE) < 10 ) )
|
|
CHOICE_DBUTTON_VIS( 10, dvarString( prestigeclass5 ), when( stat(PRESTIGE) < 10 ) )
|
|
CHOICE_NEWICON_VIS( 10, "specialty_new", when( stat(1340) == 0 && stat(PRESTIGE) > 9 ) )
|
|
CHOICE_LOCKEDICON_VIS( 10, "specialty_locked", when( stat(PRESTIGE) < 10 ) )
|
|
}
|
|
}
|