104 lines
5.1 KiB
Text
104 lines
5.1 KiB
Text
#include "ui/menudef.h"
|
|
#include "ui_mp/common_macro.inc"
|
|
|
|
#define CHOICE_SIZE_X 150
|
|
#define CHOICE_SIZE_Y 22
|
|
|
|
#define CHOICE_X_START 0
|
|
#define CHOICE_Y_START 34
|
|
|
|
#define CHOICE_SEP_OFFSET_Y -2
|
|
|
|
#define CHOICE_GROUP "map_selection"
|
|
|
|
#include "ui_mp/menustyle.inc"
|
|
#include "ui/choices_setup_common.menu"
|
|
|
|
#undef A_BUTTON_SIZE
|
|
#define A_BUTTON_SIZE 0.3
|
|
|
|
#undef A_BUTTON_OFFSET_X
|
|
#define A_BUTTON_OFFSET_X -2
|
|
// ------------------- end preprocessing definitions ----------------------
|
|
{
|
|
menuDef
|
|
{
|
|
name settings_map_dlc
|
|
fullscreen 1
|
|
rect 0 0 640 480
|
|
focuscolor COLOR_FOCUSED
|
|
style WINDOW_STYLE_FILLED
|
|
border 0
|
|
soundloop "music_mainmenu"
|
|
onOpen
|
|
{
|
|
focusFirst;
|
|
setfocusbydvar "ui_mapname";
|
|
}
|
|
onEsc
|
|
{
|
|
close self;
|
|
}
|
|
onClose
|
|
{
|
|
execNow "xupdatepartystate";
|
|
}
|
|
|
|
#define PREPROC_TEXT_DRAW_ALIGNED_EXP_VIS( prect, porigin, ptext, psize, palignx, paligny, palign, pcolor, visArg ) \
|
|
itemDef { \
|
|
rect prect \
|
|
origin porigin \
|
|
textalignx palignx textaligny paligny \
|
|
textstyle ITEM_TEXTSTYLE_SHADOWED \
|
|
textalign palign \
|
|
textscale psize \
|
|
forecolor pcolor \
|
|
exp text( ptext ); \
|
|
visible visArg \
|
|
decoration \
|
|
autowrapped }
|
|
|
|
#define LOCAL_DLCMAP_ACTION( p_mapname, p_mapname_text ) \
|
|
play "mouse_click"; \
|
|
setdvar ui_mapname p_mapname; \
|
|
setdvar ui_mapname_text p_mapname_text; \
|
|
close settings_map; \
|
|
close settings_map_splitscreen; \
|
|
close self;
|
|
|
|
|
|
#define LOCAL_DLCMAP_SELECTION( itemNum, p_mapname_text, p_mapname, visArg )\
|
|
CHOICE_BUTTON_FOCUS_VIS_EX( itemNum, p_mapname_text, LOCAL_DLCMAP_ACTION( p_mapname, p_mapname_text ), LOCAL_MAP_SHOW( p_mapname, p_mapname_text ), ;, visArg, dvartest "ui_mapname" focusdvar { p_mapname } ) \
|
|
PREPROC_TEXT_DRAW_ALIGNED_EXP_VIS( GAMEINFO_ORIGIN (GAMEINFO_WIDTH-20) 16 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 4 18, "@"+tablelookup(MAP_TABLE,0,p_mapname,3), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, COLOR_TITLE name "name_"p_mapname group "map_name_group", visArg )\
|
|
PREPROC_TEXT_DRAW_ALIGNED_EXP_VIS( GAMEINFO_ORIGIN (GAMEINFO_WIDTH-8) GAMEINFO_HEIGHT2 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 4 (GAMEINFO_HEIGHT+20), "@"+tablelookup(MAP_TABLE,0,p_mapname,6), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, CHOICE_TEXTCOLOR name "desc_"p_mapname group "map_desc_group" autowrapped, visArg )\
|
|
PREPROC_SHADER_DRAW_ALIGNED_VIS( GAMEINFO_ORIGIN GAMEINFO_WIDTH2 (GAMEINFO_HEIGHT-26) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0 20, tablelookup(MAP_TABLE,0,p_mapname,4), 1 1 1 1, 0, 0, 0 0 0 0 name "image_"p_mapname group "map_image_group", visArg )
|
|
|
|
#define LOCAL_NODLCMAP_SELECTION( itemNum, p_mapname_text, p_mapname, visArg )\
|
|
CHOICE_BUTTON_FOCUS_VIS_EX( itemNum, p_mapname_text, exec xshowmarketplace;, LOCAL_MAP_SHOW( p_mapname, p_mapname_text ), ;, visArg, dvartest "ui_mapname" focusdvar { p_mapname } ) \
|
|
PREPROC_TEXT_DRAW_ALIGNED_EXP_VIS( GAMEINFO_ORIGIN (GAMEINFO_WIDTH-20) 16 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 4 18, "@"+tablelookup(MAP_TABLE,0,p_mapname,3), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, COLOR_TITLE name "name_"p_mapname group "map_name_group", visArg )\
|
|
PREPROC_TEXT_DRAW_ALIGNED_EXP_VIS( GAMEINFO_ORIGIN (GAMEINFO_WIDTH-8) GAMEINFO_HEIGHT2 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 4 (GAMEINFO_HEIGHT+20), "@"+tablelookup(MAP_TABLE,0,p_mapname,6), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, CHOICE_TEXTCOLOR name "desc_"p_mapname group "map_desc_group" autowrapped, visArg )\
|
|
PREPROC_SHADER_DRAW_ALIGNED_VIS( GAMEINFO_ORIGIN GAMEINFO_WIDTH2 (GAMEINFO_HEIGHT-26) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0 20, tablelookup(MAP_TABLE,0,p_mapname,4), 1 1 1 1, 0, 0, 0 0 0 0 name "image_"p_mapname group "map_image_group", visArg )
|
|
|
|
// ------------------ statics ------------------------
|
|
#include "ui/blurredbg.inc"
|
|
|
|
CHOICE_MENU_TITLE( "@MENU_CHOOSE_MAP_CAP" )
|
|
|
|
#define MAP_LIST\
|
|
LOCAL_DLCMAP_SELECTION( 1, "@MPUI_BROADCAST", "mp_broadcast", when( dvarBool( mappack1 ) ) )\
|
|
LOCAL_NODLCMAP_SELECTION( 1, "@MPUI_BROADCAST", "mp_broadcast_locked", when( !dvarBool( mappack1 ) ) )\
|
|
LOCAL_DLCMAP_SELECTION( 2, "@MPUI_CARENTAN", "mp_carentan", when( dvarBool( mappack1 ) ) )\
|
|
LOCAL_NODLCMAP_SELECTION( 2, "@MPUI_CARENTAN", "mp_creek_locked", when( !dvarBool( mappack1 ) ) )\
|
|
LOCAL_DLCMAP_SELECTION( 3, "@MPUI_KILLHOUSE", "mp_killhouse", when( dvarBool( mappack1 ) ) )\
|
|
LOCAL_NODLCMAP_SELECTION( 3, "@MPUI_KILLHOUSE", "mp_creek_locked", when( !dvarBool( mappack1 ) ) )\
|
|
LOCAL_DLCMAP_SELECTION( 4, "@MPUI_CREEK", "mp_creek", when( dvarBool( mappack1 ) && dvarInt( splitscreen ) == 0 ) )\
|
|
LOCAL_NODLCMAP_SELECTION( 4, "@MPUI_CREEK", "mp_creek_locked", when( !dvarBool( mappack1 ) && dvarInt( splitscreen ) == 0 ) ) \
|
|
LOCAL_DLCMAP_SELECTION( 4, "@MPUI_CREEK_SS", "mp_creek_ss", when( dvarBool( mappack1 ) && dvarInt( splitscreen ) ) )\
|
|
LOCAL_NODLCMAP_SELECTION( 4, "@MPUI_CREEK_SS", "mp_creek_ss_locked", when( !dvarBool( mappack1 ) && dvarInt( splitscreen ) ) )
|
|
|
|
#define MAP_TABLE "mp/mapsTable.csv"
|
|
|
|
#include "ui_mp/map_info.inc"
|
|
}
|
|
}
|
|
|