iw3sp-mod/iw3sp_mod_ff_src/raw/ui/reset_all_menu.menu
2024-03-12 22:41:56 +03:00

81 lines
2.2 KiB
Plaintext

#include "ui/menudef.h"
#include "ui_mp/common_macro.inc"
#define CHOICE_X_START 0
#define CHOICE_Y_START 150
#define CHOICE_GROUP "reset_all_menu"
#include "ui_mp/menustyle.inc"
#include "ui/choices_setup_common.menu"
#include "ui_mp/popupstyle.inc"
#include "ui/choices_setup_popmenu.menu"
#undef CHOICE_SIZE_X
#define CHOICE_SIZE_X 340
#undef CHOICE_HORIZONTAL_ALIGN
#define CHOICE_HORIZONTAL_ALIGN HORIZONTAL_ALIGN_CENTER
#undef CHOICE_VERTICAL_ALIGN
#define CHOICE_VERTICAL_ALIGN VERTICAL_ALIGN_CENTER
#define RESET_ALL_LOGIC \
setdvar profile_unlock_all 0; exec "resetstats"; close self; open levels; open popmenu_sp_progress_reset;
// Reseting the original button on own without changes in original file.
#undef CHOICE_SCRIPTS_ALL
#define CHOICE_SCRIPTS_ALL( itemIndex, actionArg, onFocusArg, leaveFocusArg ) \
onFocus \
{ \
play CHOICE_FOCUS_SOUND; \
setLocalVarInt ui_highlight itemIndex; \
setLocalVarString ui_choicegroup CHOICE_GROUP; \
onFocusArg \
} \
leaveFocus \
{ \
setLocalVarInt ui_highlight 0; \
leaveFocusArg \
} \
action \
{ \
play "mouse_click"; \
actionArg; \
}
#undef CHOICE_POPMENU_SUBTITLE_VIS
#define CHOICE_POPMENU_SUBTITLE_VIS( textArg, visArg ) \
itemDef \
{ \
type ITEM_TYPE_BUTTON \
rect CHOICE_POPUP_BORDER_X (CHOICE_POPUP_BORDER_Y + CHOICE_POPUP_TITLE_HEIGHT) (CHOICE_POPUP_WIDTH - (CHOICE_POPUP_BORDER_Y*2)) CHOICE_POPUP_SUBTITLE_HEIGHT CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
exp text(textArg); \
textfont UI_FONT_NORMAL \
textscale CHOICE_POPUP_SUBTITLE_TEXTSIZE \
textAlign ITEM_ALIGN_TOP_CENTER \
textstyle CHOICE_TEXTSTYLE \
forecolor CHOICE_TEXTCOLOR \
visible visArg \
decoration \
autowrapped \
}
{
menuDef
{
CENTER_POPUP_SETUP( reset_all_menu, 5, ;, 1 )
CHOICE_POPMENU_SUBTITLE( "@IW3SP_MOD_LOC_MENU_ARE_YOU_SURE_RESET" )
CHOICE_BUTTON( 4, "@MENU_YES", RESET_ALL_LOGIC; play "mission_reset_cheat"; )
CHOICE_BUTTON( 5, "@MENU_NO", close self )
}
menuDef
{
CENTER_POPUP_SETUP( popmenu_sp_progress_reset, 5, ;, 1 )
CHOICE_POPMENU_SUBTITLE( "@IW3SP_MOD_LOC_MENU_STATSHASBEENRESET" )
CHOICE_BUTTON( 5, "@MENU_OK", close self )
}
}