1
0
mirror of https://github.com/XLabsProject/iw4x-rawfiles.git synced 2023-08-02 15:02:11 +02:00
This commit is contained in:
Diavolo 2022-07-16 22:31:38 +02:00
parent 81dbd9d659
commit 3ccd0987ee
No known key found for this signature in database
GPG Key ID: FA77F074E98D98A5
2 changed files with 87 additions and 4 deletions

View File

@ -161,11 +161,23 @@ menuDef
}
}
MENU_CHOICE_HORIZONTAL_LINE(3)
itemDef
{
BUTTON_BASE(3, "button_3", "@MPUI_CLAN_TAG_CAPS", 0)
BUTTON_ACTION(open "popup_customclan";)
onFocus
{
play CHOICE_FOCUS_SOUND;
setItemColor self backColor 0 0 0 1;
setLocalVarString "ui_hint_text" ("@MPUI_DESC_CLANTAG");
}
}
MENU_CHOICE_HORIZONTAL_LINE(4)
itemDef
{
BUTTON_BASE(3, "button_3", "@MPUI_RESET_STATS_CAPS", 0)
BUTTON_BASE(4, "button_4", "@MPUI_RESET_STATS_CAPS", 0)
BUTTON_ACTION(open "stats_reset";)
onFocus
{
@ -177,7 +189,7 @@ menuDef
itemDef
{
BUTTON_BASE(4, "button_4", "@MPUI_UNLOCK_STATS_CAPS", 0)
BUTTON_BASE(5, "button_5", "@MPUI_UNLOCK_STATS_CAPS", 0)
BUTTON_ACTION(open "stats_unlock";)
onFocus
{
@ -191,7 +203,7 @@ menuDef
itemDef
{
BUTTON_BASE(5, "button_5", "@MPUI_PRESTIGE_MODE_CAPS", !(getplayerdata("prestige") < int(tablelookup("mp/rankIconTable.csv", 0, "maxprestige", 1)) && getplayerdata("experience") >= int(tablelookup("mp/rankTable.csv", 0, int(tablelookup("mp/rankTable.csv", 0, "maxrank", 1)), 7))) && !(getplayerdata("prestige") == int(tablelookup("mp/rankIconTable.csv", 0, "maxprestige", 1))))
BUTTON_BASE(6, "button_6", "@MPUI_PRESTIGE_MODE_CAPS", !(getplayerdata("prestige") < int(tablelookup("mp/rankIconTable.csv", 0, "maxprestige", 1)) && getplayerdata("experience") >= int(tablelookup("mp/rankTable.csv", 0, int(tablelookup("mp/rankTable.csv", 0, "maxrank", 1)), 7))) && !(getplayerdata("prestige") == int(tablelookup("mp/rankIconTable.csv", 0, "maxprestige", 1))))
visible when (!(getplayerdata("prestige") == int(tablelookup("mp/rankIconTable.csv", 0, "maxprestige", 1))))
BUTTON_ACTION(open "prestige_reset1";)
onFocus

View File

@ -0,0 +1,71 @@
#include "ui/menudef.h"
#include "ui_mp/main.inc"
#include "ui_mp/popup.inc"
#define MENU_NAME "popup_customclan"
#define MENU_TITLE "@MPUI_CLAN_TAG"
#define POPMENU_POS_X -150
#define POPMENU_POS_Y -84
#define POPMENU_WIDTH 300
#define POPMENU_HEIGHT 84
#define POPMENU_RECT POPMENU_POS_X POPMENU_POS_Y POPMENU_WIDTH POPMENU_HEIGHT HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER
#define ITEM_NAMEENTRY \
itemDef \
{ \
name "customclanEntry" \
rect 10 32 (POPMENU_WIDTH - 20) 20 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER \
style WINDOW_STYLE_FILLED \
foreColor CHOICE_TEXTCOLOR \
backColor 0 0 0 0.3 \
type ITEM_TYPE_EDITFIELD \
textFont UI_FONT_SMALL \
textAlignX 5 \
textAlignY 18 \
textScale CHOICE_TEXTSIZE \
visible 1 \
text " " \
dvar "clanName" \
maxChars 15 \
maxPaintChars 15 \
accept \
{ \
close self; \
} \
}
#define ON_MENU_OPEN \
setLocalVarInt "ui_centerPopup" (1); \
setFocus "customclanEntry";
#define ON_MENU_CLOSE \
setLocalVarInt "ui_centerPopup" (0);
#define ON_MENU_ESC \
close self;
menuDef
{
name MENU_NAME
rect POPMENU_RECT
popup
legacySplitScreenScale
style WINDOW_STYLE_FILLED
foreColor CHOICE_TEXTCOLOR
focusColor CHOICE_TEXTCOLOR
backColor 1 1 1 1
background "white"
MENU_ON_OPEN(ON_MENU_OPEN)
MENU_ON_CLOSE(ON_MENU_CLOSE)
MENU_ON_ESC(ON_MENU_ESC)
POPUP_BACKGROUND_BASE
POPUP_TITLE2(MENU_TITLE)
ITEM_NAMEENTRY
POPUP_BUTTON_FOOTER(64, "@MENU_CLOSE", close self;)
}