#include "ui/menudef.h" #include "ui_mp/main.inc" #include "ui_mp/logo.inc" #define MENU_NAME "main_text" #define MENU_MUSIC "music_mainmenu_mp" #define MENU_TITLE "^1S&R Servers" #undef CHOICE_GROUP #define CHOICE_GROUP MENU_NAME #undef TEXTSIZE_TITLE #define TEXTSIZE_TITLE FONTSCALE_BIG #define ON_MENU_OPEN \ exec "selectStringTableEntryInDvar mp/didyouknow.csv 0 didyouknow"; \ execnow "set monkeytoy 0"; \ uiScript "checkFirstLaunch"; \ setLocalVarString ui_hint_text ""; #define CHECK_FOR_UPDATE_ACTION \ exec "checkforupdate"; \ open "auconfirm"; #define CREATE_GAME_ACTION \ exec "xrequirelivesignin"; \ setDvar "systemlink" 0; \ setDvar "splitscreen" 0; \ setDvar "onlinegame" 1; \ exec "exec default_xboxlive.cfg"; \ setDvar "party_maxplayers" 18; \ setDvar "xblive_privateserver" 0; \ setDvar "xblive_rankedmatch" 0; \ exec "xstartprivateparty"; \ setDvar "ui_mptype" 0; \ exec "xcheckezpatch"; \ exec "exec default_xboxlive.cfg" \ setDvar "xblive_rankedmatch" 0; \ exec "ui_enumeratesaved"; \ setDvar "xblive_privateserver" 1; \ exec "xstartprivatematch"; \ execnow "set safeArea_adjusted_vertical 0.91"; \ execnow "set safeArea_adjusted_horizontal 0.91"; \ open "menu_xboxlive_privatelobby"; #define CHOICE_Y(i) (88 + (i * 20)) #define CHOICE_ORIGIN(i) -64 CHOICE_Y(i) #define CHOICE_RECT(i) CHOICE_ORIGIN(i) 336 20 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_TOP #define HR_ORIGIN(i) 0 (CHOICE_Y(i) - 0.5) #define HR_RECT(i) HR_ORIGIN(i) 216 1 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_TOP { menuDef { name MENU_NAME fullscreen 1 rect 0 0 640 480 foreColor CHOICE_TEXTCOLOR focusColor CHOICE_TEXTCOLOR soundLoop MENU_MUSIC fadeCycle 1 fadeClamp 1 fadeAmount 0.1 MENU_ON_OPEN(ON_MENU_OPEN) MENU_ON_ESC(open "quit_popmenu";) #define BACKGROUND_IW4 #include "ui_mp/bg.inc" MENU_CHOICE_TITLE_VIS(MENU_TITLE, 78.5, 1) // general menu buttons MENU_CHOICE_HORIZONTAL_LINE_VIS(-0.5, 1) MENU_CHOICE_HORIZONTAL_LINE_VIS(1, 1) MENU_CHOICE_BUTTON_VIS(1, button_1, "^3SERVERS LIST", exec "xrequirelivesignin"; open pc_join_unranked;, "@MPUI_DESC_JOIN_GAME", 1) MENU_CHOICE_HORIZONTAL_LINE_VIS(2, 1) MENU_CHOICE_BUTTON_VIS(2, button_3, "@MENU_CREATE_A_CLASS_CAPS", open cac_popup;, "@MPUI_DESC_CREATE_A_CLASS", 1) MENU_CHOICE_BUTTON_VIS(3, button_4, "@MENU_PLAYERCARD_CAPS", open popup_callsign;, "@MPUI_DESC_PLAYERCARD", 1) MENU_CHOICE_HORIZONTAL_LINE_VIS(4, 1) MENU_CHOICE_BUTTON_VIS(4, button_4, "@MENU_BARRACKS_CAPS", open menu_online_barracks;, "@PATCH_DESC_BARRACKS", 1) MENU_CHOICE_BUTTON_VIS(5, button_6, "@MENU_THEATER_CAPS", open pc_theater_menu;, "@MPUI_DESC_THEATER", 1) MENU_CHOICE_HORIZONTAL_LINE_VIS(6, 1) MENU_CHOICE_BUTTON_VIS(6, button_6, "@MENU_MODS_CAPS", open mods_menu;, "@MPUI_DESC_MODS", 1) MENU_CHOICE_HORIZONTAL_LINE_VIS(7, 1) MENU_CHOICE_BUTTON_VIS(7, button_7, "@MENU_OPTIONS_CAPS", open pc_options_video;, "@MPUI_DESC_OPTIONS", 1) MENU_CHOICE_BUTTON_VIS(8, button_8, "CLOSE GAME", open quit_popmenu;, "@MPUI_DESC_QUIT", 1) MENU_CHOICE_HORIZONTAL_LINE_VIS(9, 1) MENU_CHOICE_BUTTON_VIS(9, button_9, "^3BECOME A VIP", open iw4x_credits;, "^3BECOME A VIP", 1) MENU_CHOICE_HORIZONTAL_LINE_VIS(10, 1) MENU_CHOICE_BUTTON_VIS(10, button_10, "GET DLC", uiScript "downloadDLC" 1, "@MPUI_DESC_STORE", 1) MENU_CHOICE_NEWICON_VIS(10, when(!dvarBool(isDlcInstalled_All))) itemDef { rect -426.667 -426.667 893.333 893.333 2 2 decoration visible 1 style 3 forecolor 0 0 0 1 background "black" textscale 0.55 exp forecolor a ( ( cos ( milliseconds( ) / 1500 ) * 3) - 2.7 ) } itemDef { rect 66 -84 150 20 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_BOTTOM foreColor CHOICE_TEXTCOLOR style WINDOW_STYLE_FILLED type ITEM_TYPE_BUTTON decoration textalign 6 textalignx -5 textaligny 2 textScale 0.4 textfont 9 visible 1 text "^1Stay updated" } itemDef { name "SnRServers.com" rect 66 -54 150 20 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_BOTTOM foreColor CHOICE_TEXTCOLOR style WINDOW_STYLE_FILLED type ITEM_TYPE_BUTTON textalign 6 textalignx -5 textaligny 2 textScale MENU_BUTTON_TEXTSIZE textfont 9 visible 1 text "SnRServers.com" onFocus { play CHOICE_FOCUS_SOUND; setItemColor self backcolor 0 0 0 0.5; setLocalVarBool ui_menuAButton 1; setLocalVarFloat ui_popupYPos 0; setLocalVarString ui_hint_text "Discord"; } leaveFocus { setItemColor self backcolor 0 0 0 0; setLocalVarBool ui_menuAButton 1; setLocalVarString ui_hint_text "@NULL_EMPTY"; } action { play CHOICE_CLICK_SOUND; execnow "openLink www.snrservers.com" } } itemDef { name "twitter" rect 66 -34 150 20 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_BOTTOM foreColor CHOICE_TEXTCOLOR style WINDOW_STYLE_FILLED type ITEM_TYPE_BUTTON textalign 6 textalignx -5 textaligny 2 textScale MENU_BUTTON_TEXTSIZE textfont 9 visible 1 text "Twitter.com/SnRServers" onFocus { play CHOICE_FOCUS_SOUND; setItemColor self backcolor 0 0 0 0.5; setLocalVarBool ui_menuAButton 1; setLocalVarFloat ui_popupYPos 0; setLocalVarString ui_hint_text "Discord"; } leaveFocus { setItemColor self backcolor 0 0 0 0; setLocalVarBool ui_menuAButton 1; setLocalVarString ui_hint_text "@NULL_EMPTY"; } action { play CHOICE_CLICK_SOUND; execnow "openLink www.twitter.com/SnRServers" } } itemDef { name "discord" rect 66 -14 150 20 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_BOTTOM foreColor CHOICE_TEXTCOLOR style WINDOW_STYLE_FILLED type ITEM_TYPE_BUTTON textalign 6 textalignx -5 textaligny 2 textScale MENU_BUTTON_TEXTSIZE textfont 9 visible 1 text "Discord.io/SnRServers" onFocus { play CHOICE_FOCUS_SOUND; setItemColor self backcolor 0 0 0 0.5; setLocalVarBool ui_menuAButton 1; setLocalVarFloat ui_popupYPos 0; setLocalVarString ui_hint_text "Discord"; } leaveFocus { setItemColor self backcolor 0 0 0 0; setLocalVarBool ui_menuAButton 1; setLocalVarString ui_hint_text "@NULL_EMPTY"; } action { play CHOICE_CLICK_SOUND; execnow "openLink www.discord.gg/DX6d38H" } } itemDef { rect -20 0 300 20 1 1 decoration foreColor 1 1 1 0.7 type 1 textAlign 0 textAlignY 0 textScale 0.20 exp text ( "^36.2^7 | Developed by ^3Shockeh^7 & ^3Raez^7 \nThanks to @zeetiq and @alstr_ for the custom weapons" ) visible 1 } itemDef { rect 0 0 208 70 3 1 style 3 border 0 ownerdraw 0 ownerdrawFlag 0 borderSize 0 foreColor 0 0 0 0.25 backColor 0 0 0 0 borderColor 0 0 0 0 outlineColor 0 0 0 0 background white decoration type 0 align 0 textAlign 0 textAlignX 0 textAlignY 0 textScale 0.55 textStyle 0 textFont 0 feeder 0 visible when ( (dvarString("cac") == "0" || dvarString("cac") == "") && ( getplayercardinfo( 0 , 1 , 0 ) != 0 ) ) exp rect x ( ( -208 ) ) exp rect y ( ( 18 ) ) } itemDef { rect 0 0 208 70 3 1 style 1 border 0 ownerdraw 0 ownerdrawFlag 0 borderSize 0 foreColor 1 1 1 1 backColor 1 1 1 1 borderColor 0 0 0 0 outlineColor 0 0 0 0 background cardtitle_248x48 decoration type 0 align 0 textAlign 4 textAlignX 0 textAlignY -20 textScale 0.375 textStyle 7 textFont 6 feeder 0 visible when ( (dvarString("cac") == "0" || dvarString("cac") == "") && (dvarString("store") != "yes") && ( getplayercardinfo( 0 , 1 , 0 ) != 0 ) ) exp rect x ( ( - 208 ) ) exp rect y ( ( 18 ) ) } itemDef { rect 0 0 20 20 3 1 style 3 border 0 ownerdraw 0 ownerdrawFlag 0 borderSize 0 foreColor 1 1 1 1 backColor 0 0 0 0 borderColor 0 0 0 0 outlineColor 0 0 0 0 decoration type 0 align 0 textAlign 0 textAlignX 0 textAlignY 0 textScale 0.55 textStyle 0 textFont 0 feeder 0 visible when((dvarString("cac") == "0" || dvarString("cac") == "")) exp material ( tableLookup( "mp/killstreakTable.csv", 1, (getPlayerData( "killstreaks", 0 )), 16 ) ) exp rect x ( ( - 208 ) + 8 ) //exp rect y ( ( 325 ) + 48 ) //exp rect x ( ( - 170 ) + 75 ) exp rect y ( ( 18 ) + 48 ) } itemDef { rect 0 0 20 20 3 1 style 3 border 0 ownerdraw 0 ownerdrawFlag 0 borderSize 0 foreColor 1 1 1 1 backColor 0 0 0 0 borderColor 0 0 0 0 outlineColor 0 0 0 0 decoration type 0 align 0 textAlign 0 textAlignX 0 textAlignY 0 textScale 0.55 textStyle 0 textFont 0 feeder 0 visible when((dvarString("cac") == "0" || dvarString("cac") == "")) exp material ( tableLookup( "mp/killstreakTable.csv", 1, (getPlayerData( "killstreaks", 1 )), 16 ) ) exp rect x ( ( - 208 ) + 29 ) //exp rect y ( ( 325 ) + 48 ) //exp rect x ( ( - 170 ) + 96 ) exp rect y ( ( 18 ) + 48 ) } itemDef { rect 0 0 20 20 3 1 style 3 border 0 ownerdraw 0 ownerdrawFlag 0 borderSize 0 foreColor 1 1 1 1 backColor 0 0 0 0 borderColor 0 0 0 0 outlineColor 0 0 0 0 decoration type 0 align 0 textAlign 0 textAlignX 0 textAlignY 0 textScale 0.55 textStyle 0 textFont 0 feeder 0 visible when((dvarString("cac") == "0" || dvarString("cac") == "")) exp material ( tableLookup( "mp/killstreakTable.csv", 1, (getPlayerData( "killstreaks", 2 )), 16 ) ) exp rect x ( ( - 208 ) + 50 ) //exp rect y ( ( 325 ) + 48 ) //exp rect x ( ( - 170 ) + 117 ) exp rect y ( ( 18 ) + 48 ) } itemDef { rect 0 0 160 32 3 1 style 1 border 0 ownerdraw 0 ownerdrawFlag 0 borderSize 0 foreColor 1 1 1 1 backColor 1 1 1 1 borderColor 0 0 0 0 outlineColor 0 0 0 0 //decoration type 1 align 0 textAlign 9 textAlignX 0 textAlignY 0 textScale 0.375 textStyle 8 textFont 3 feeder 0 exp text ( "@" + tablelookupbyrow( "mp/cardTitleTable.csv" , getplayercardinfo( 1 , 1 , 0 ) , 1 ) ) exp material ( tablelookupbyrow( "mp/cardTitleTable.csv" , getplayercardinfo( 1 , 1 , 0 ) , 2 ) ) visible when ( (dvarString("cac") == "0" || dvarString("cac") == "") && ( getplayercardinfo( 0 , 1 , 0 ) != 0 ) ) exp rect x ( - 208 ) exp rect y ( 18 - 2 ) exp forecolor r ( tablelookupbyrow( "mp/cardTitleTable.csv" , getplayercardinfo( 1 , 1 , 0 ) , 3 ) ) exp forecolor g ( tablelookupbyrow( "mp/cardTitleTable.csv" , getplayercardinfo( 1 , 1 , 0 ) , 4 ) ) exp forecolor b ( tablelookupbyrow( "mp/cardTitleTable.csv" , getplayercardinfo( 1 , 1 , 0 ) , 5 ) ) onFocus { play "mouse_over"; if(isitemunlocked( "playercard_title" )) { setLocalVarString ui_hint_text "@MPUI_DESC_PLAYERCARD_TITLE"; } else { setLocalVarString ui_hint_text "@PERKS_UNLOCKED_BY_CHALLENGE"; } setLocalVarBool ui_menuAButton 1; } leaveFocus { setLocalVarString ui_hint_text "@NULL_EMPTY"; setLocalVarBool ui_menuAButton 1; } action { play "mouse_click"; if(isitemunlocked( "playercard_title" )) { open "menu_playercard_title_popup"; setPlayerData ( "featureNew" , "playercard_title" , "false"); } } } itemDef { rect 0 0 160 18 3 1 style 0 border 0 ownerdraw 0 ownerdrawFlag 0 borderSize 0 foreColor 1 1 1 1 backColor 0 0 0 0 borderColor 0 0 0 0 outlineColor 0 0 0 0 //decoration type 1 align 0 textAlign 4 textAlignX 8 textAlignY 0 textScale 0.3333 textStyle 8 textFont 10 feeder 0 exp text ( getplayercardinfo( 8 , 1 , 0 ) ) visible when ( (dvarString("cac") == "0" || dvarString("cac") == "") && ( getplayercardinfo( 0 , 1 , 0 ) != 0 ) ) exp rect x ( - 208 ) exp rect y ( ( 18 ) + 30 ) onFocus { play "mouse_over"; setItemColor self "backcolor" 0 0 0 0; setItemColor self "backcolor" 0 0 0 1; setLocalVarString ui_hint_text "@MPUI_DESC_CHANGE_NAME"; setLocalVarBool ui_menuAButton 1; } leaveFocus { setItemColor self "backcolor" 0 0 0 "0.0"; setLocalVarString ui_hint_text "@NULL_EMPTY"; setLocalVarBool ui_menuAButton 1; } action { play "mouse_click"; open "popup_playername"; } } itemDef { rect 0 0 48 48 3 1 style 3 border 0 ownerdraw 0 ownerdrawFlag 0 borderSize 0 foreColor 1 1 1 1 backColor 0 0 0 0 borderColor 0 0 0 0 outlineColor 0 0 0 0 //decoration type 1 align 0 textAlign 0 textAlignX 0 textAlignY 0 textScale 0.55 textStyle 0 textFont 0 feeder 0 exp material ( tablelookupbyrow( "mp/cardIconTable.csv" , getplayercardinfo( 2 , 1 , 0 ) , 1 ) ) visible when ( (dvarString("cac") == "0" || dvarString("cac") == "") && ( getplayercardinfo( 0 , 1 , 0 ) != 0 ) ) exp rect x ( ( - 208 ) + 160 ) exp rect y ( ( 18 ) ) onFocus { play "mouse_over"; if(isitemunlocked( "playercard_icon" )) { setLocalVarString ui_hint_text "@MPUI_DESC_PLAYERCARD_ICON"; } else { setLocalVarString ui_hint_text "@PERKS_UNLOCKED_BY_CHALLENGE"; } setLocalVarBool ui_menuAButton 1; } leaveFocus { setLocalVarString ui_hint_text "@NULL_EMPTY"; setLocalVarBool ui_menuAButton 1; } action { play "mouse_click"; if(isitemunlocked( "playercard_icon" )) { open "menu_playercard_icon_popup"; setPlayerData ( "featureNew" , "playercard_icon" , "false"); } } } itemDef { rect 0 0 208 20 3 1 style 1 border 0 ownerdraw 0 ownerdrawFlag 0 borderSize 0 foreColor 1 1 1 1 backColor 0 0 0 0 borderColor 0 0 0 0 outlineColor 0 0 0 0 decoration type 0 align 0 textAlign 8 textAlignX 8 textAlignY 0 textScale 0.375 textStyle 7 textFont 3 feeder 0 exp text ( "[" + getplayercardinfo( 9 , 1 , 0 ) + "]" ) visible when ( (dvarString("cac") == "0" || dvarString("cac") == "") && ( getplayercardinfo( 0 , 1 , 0 ) != 0 ) && getplayercardinfo( 9 , 1 , 0 ) != "" ) exp rect x ( ( - 208 ) ) exp rect y ( ( 18 ) + 48 ) } itemDef { rect 0 0 20 20 3 1 style 1 border 0 ownerdraw 0 ownerdrawFlag 0 borderSize 0 foreColor 1 1 1 1 backColor 1 1 1 1 borderColor 0 0 0 0 outlineColor 0 0 0 0 decoration type 0 align 0 textAlign 0 textAlignX 0 textAlignY 0 textScale 0.55 textStyle 0 textFont 0 feeder 0 exp material ( tablelookup( "mp/rankIconTable.csv" , 0 , getplayercardinfo( 4 , 1 , 0 ) , ( getplayercardinfo( 5 , 1 , 0 ) + 1 ) ) ) visible when ( (dvarString("cac") == "0" || dvarString("cac") == "") && ( getplayercardinfo( 0 , 1 , 0 ) != 0 ) && ( getplayercardinfo( 4 , 1 , 0 ) >= 0 ) ) exp rect x ( ( - 208 ) + 164 ) exp rect y ( ( 18 ) + 48 ) } itemDef { rect 0 0 20 20 3 1 style 0 border 0 ownerdraw 0 ownerdrawFlag 0 borderSize 0 foreColor 1 1 1 1 backColor 0 0 0 0 borderColor 0 0 0 0 outlineColor 0 0 0 0 decoration type 0 align 0 textAlign 9 textAlignX 20 textAlignY 0 textScale 0.375 textStyle 7 textFont 3 feeder 0 exp text ( tablelookup( "mp/rankTable.csv" , 0 , getplayercardinfo( 4 , 1 , 0 ) , 14 ) ) visible when ((dvarString("cac") == "0" || dvarString("cac") == "") && ( getplayercardinfo( 0 , 1 , 0 ) != 0 ) && ( getplayercardinfo( 4 , 1 , 0 ) >= 0 ) ) exp rect x ( ( - 208 ) + 164 ) exp rect y ( ( 18 ) + 48 ) } } }