#include "ui/menudef.h" #include "ui_mp/common_macro.inc" #define CHOICE_GROUP "serverinfo" #include "ui_mp/menustyle.inc" #include "ui/choices_setup_common.menu" #include "ui_mp/popupstyle.inc" #include "ui/choices_setup_popmenu.menu" #define SIDE_MARGIN 20 #define INFO_BOX_WIDTH 390 #define INFO_BOX_HEIGHT 280 #define INFO_BOX_SIZE INFO_BOX_WIDTH INFO_BOX_HEIGHT #undef CHOICE_SIZE_X #define CHOICE_SIZE_X (INFO_BOX_WIDTH+(SIDE_MARGIN*2)) #undef CHOICE_POPUP_TITLE_HEIGHT #define CHOICE_POPUP_TITLE_HEIGHT (INFO_BOX_HEIGHT+SIDE_MARGIN+24) //#define CHOICE_X_START 0 #define CHOICE_Y_START 285 { menuDef { name serverinfo_popmenu visible 1 fullscreen 0 rect (0-(CHOICE_POPUP_WIDTH/2)) 70 CHOICE_POPUP_WIDTH CHOICE_POPUP_HEIGHT( 2 ) HORIZONTAL_ALIGN_CENTER 0 border 1 backcolor 0 0 0 0 bordersize CHOICE_POPUP_BORDER_WIDTH bordercolor CHOICE_POPUP_BORDER_COLOR focusColor COLOR_FOCUSED style WINDOW_STYLE_FILLED popup onOpen { uiScript ServerStatus; setLocalVarBool ui_centerPopup 1; } onClose { setLocalVarBool ui_centerPopup 0; } onESC { setLocalVarBool ui_centerPopup 0; close self; } execKeyInt 171 { play "mouse_click"; uiScript ServerStatus; } itemDef { style WINDOW_STYLE_SHADER rect 0 0 (CHOICE_POPUP_WIDTH-(CHOICE_POPUP_BORDER_WIDTH*2)) (CHOICE_POPUP_HEIGHT( 2 )-(CHOICE_POPUP_BORDER_WIDTH*2)) background "white" forecolor 0.2 0.2 0.22 0.85 visible 1 decoration } #undef CHOICE_X_START #define CHOICE_X_START 0 #undef CHOICE_HORIZONTAL_ALIGN #define CHOICE_HORIZONTAL_ALIGN HORIZONTAL_ALIGN_CENTER #undef CHOICE_VERTICAL_ALIGN #define CHOICE_VERTICAL_ALIGN VERTICAL_ALIGN_TOP itemDef { name siServerName rect 15 -12 380 24 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP border 1 forecolor 1 1 1 1 textfont 9 textscale 0.5 decoration exp text dvarstring("uiSi_ServerName") visible 1 } itemDef { name infoBackground rect 15 0 220 110 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP style WINDOW_STYLE_FILLED border 1 borderSize .5 borderColor 1 1 1 0.4 backcolor 0 0 0 0.4 decoration visible 1 } itemDef { rect 20 15 380 24 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP border 1 forecolor 1 1 1 1 type 1 textfont 1 textscale 0.3 decoration text "@MPUI_MAX_CLIENTS" visible 1 } itemDef { rect 155 15 380 24 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP border 1 forecolor 1 1 1 1 type 1 textfont 1 textscale 0.3 decoration exp text dvarstring("uiSi_MaxClients") visible 1 } itemDef { rect 20 30 380 24 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP border 1 forecolor 1 1 1 1 type 1 textfont 1 textscale 0.3 decoration text "@MPUI_IS_PRIVATE" visible 1 } itemDef { rect 155 30 380 24 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP border 1 forecolor 1 1 1 1 type 1 textfont 1 textscale 0.3 decoration exp text dvarstring("uiSi_isPrivate") visible 1 } itemDef { rect 20 45 380 24 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP border 1 forecolor 1 1 1 1 type 1 textfont 1 textscale 0.3 decoration text "@MPUI_VERSION" visible 1 } itemDef { rect 155 45 380 24 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP border 1 forecolor 1 1 1 1 type 1 textfont 1 textscale 0.3 decoration exp text dvarstring("uiSi_Version") visible 1 } itemDef { rect 20 60 380 24 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP border 1 forecolor 1 1 1 1 type 1 textfont 1 textscale 0.3 decoration text "@MPUI_RULES_HARDCORE" visible 1 } itemDef { rect 155 60 380 24 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP border 1 forecolor 1 1 1 1 type 1 textfont 1 textscale 0.3 decoration exp text dvarstring("uiSi_Hardcore") visible 1 } itemDef { rect 20 75 380 24 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP border 1 forecolor 1 1 1 1 type 1 textfont 1 textscale 0.3 decoration text "@MPUI_RULES_KILLCAM" visible 1 } itemDef { rect 155 75 380 24 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP border 1 forecolor 1 1 1 1 type 1 textfont 1 textscale 0.3 decoration exp text dvarstring("uiSi_KillCam") visible 1 } itemDef { rect 20 90 380 24 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP border 1 forecolor 1 1 1 1 type 1 textfont 1 textscale 0.3 decoration text "@MPUI_RULES_FRIENDLY_FIRE" visible 1 } itemDef { rect 155 90 380 24 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP border 1 forecolor 1 1 1 1 type 1 textfont 1 textscale 0.3 decoration exp text dvarstring("uiSi_ffType") visible 1 } itemDef { rect 20 105 380 24 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP border 1 forecolor 1 1 1 1 type 1 textfont 1 textscale 0.3 decoration text "@MPUI_MOD" visible 1 } itemDef { rect 45 105 380 24 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP border 1 forecolor 1 1 1 1 type 1 textfont 1 textscale 0.3 decoration exp text dvarstring("uiSi_ModName") visible 1 } itemDef { name mappreview rect 245 0 176 100 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP style WINDOW_STYLE_SHADER exp material("preview_" + dvarString("uiSi_MapName")); visible 1 } itemDef { name mapNameBar rect 245 0 176 14 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP style WINDOW_STYLE_FILLED backcolor 0 0 0 0.4 decoration visible 1 } itemDef { name mapNameText rect 245 13 176 14 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP exp text(dvarString(uiSi_MapNameLoc)); textfont 1 textalignx 4 textscale 0.3 decoration visible 1 } itemDef { name gameTypeBar rect 245 86 176 14 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP style WINDOW_STYLE_FILLED backcolor 0 0 0 0.4 decoration visible 1 } itemDef { name gameTypeText rect 245 100 176 14 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP exp text(dvarString(uiSi_GameType)); textfont 1 textalignx 4 textscale 0.3 decoration visible 1 } itemDef { name playerinfo rect 15 150 405 160 type ITEM_TYPE_LISTBOX style WINDOW_STYLE_FILLED elementwidth 120 elementheight 16 textfont UI_FONT_NORMAL textscale .25 backcolor 0 0 0 1 border 1 bordersize 1 bordercolor .5 .5 .5 1 elementtype LISTBOX_TEXT feeder FEEDER_SERVERSTATUS notselectable visible 1 // numcols xpos xwidth textlen columns 4 2 50 2 60 40 16 245 40 10 365 40 4 } CHOICE_BUTTON( 1, "@MENU_CLOSE", close self; ) CHOICE_BUTTON( 2, "@PLATFORM_REFRESH", uiScript ServerStatus; ) } }