164 lines
3.4 KiB
Text
164 lines
3.4 KiB
Text
|
#include "ui/menudef.h"
|
||
|
#include "ui_mp/common_macro.inc"
|
||
|
|
||
|
#define CHOICE_X_START 0
|
||
|
#define CHOICE_Y_START 150
|
||
|
|
||
|
#define CHOICE_GROUP "password"
|
||
|
#define CHOICE_SEP_1 3
|
||
|
#define CHOICE_SEP_2 5
|
||
|
|
||
|
#include "ui_mp/menustyle.inc"
|
||
|
#include "ui/choices_setup_common.menu"
|
||
|
|
||
|
#include "ui_mp/popupstyle.inc"
|
||
|
#include "ui/choices_setup_popmenu.menu"
|
||
|
|
||
|
#undef CHOICE_HORIZONTAL_ALIGN
|
||
|
#define CHOICE_HORIZONTAL_ALIGN HORIZONTAL_ALIGN_CENTER
|
||
|
#undef CHOICE_VERTICAL_ALIGN
|
||
|
#define CHOICE_VERTICAL_ALIGN VERTICAL_ALIGN_CENTER
|
||
|
|
||
|
#undef CHOICE_SIZE_X
|
||
|
#define CHOICE_SIZE_X 270
|
||
|
|
||
|
#define SIDE_MARGIN 40
|
||
|
|
||
|
{
|
||
|
menuDef
|
||
|
{
|
||
|
CENTER_POPUP_SETUP_ONOPEN( password_popmenu, 5, ;, setfocus passwordEntry;, 1 )
|
||
|
//CENTER_POPUP_SETUP( password_popmenu, 5, ;, 1 )
|
||
|
CHOICE_POPMENU_TITLE( "@MENU_PASSWORD" )
|
||
|
itemDef {
|
||
|
name passwordEntry
|
||
|
group grpControls
|
||
|
TYPE 4
|
||
|
text " "
|
||
|
dvar "password"
|
||
|
rect CHOICE_ORIGIN( 3 ) (CHOICE_SIZE_X-(SIDE_MARGIN*2)) 18
|
||
|
origin SIDE_MARGIN -8
|
||
|
textaligny -2
|
||
|
maxchars 12
|
||
|
maxpaintchars 12
|
||
|
textalign ITEM_ALIGN_MIDDLE_LEFT
|
||
|
textfont UI_FONT_NORMAL
|
||
|
textscale TEXTSIZE_SMALL
|
||
|
forecolor .9 .9 .9 1
|
||
|
style WINDOW_STYLE_FILLED
|
||
|
backcolor 0 0 0 .3
|
||
|
visible 1
|
||
|
mouseenter { show keyBindStatus; play "mouse_over"; }
|
||
|
mouseexit { hide keyBindStatus; setfocus ok_button; }
|
||
|
accept { close self; }
|
||
|
}
|
||
|
CHOICE_BUTTON_EX( 4, "@MENU_OK", close self;, name ok_button mouseenter { setfocus ok_button; } )
|
||
|
CHOICE_BUTTON( 5, "@MENU_RESET", close self; setdvar password ""; )
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
{
|
||
|
// PASSWORD POPUP MENU \\
|
||
|
|
||
|
menuDef {
|
||
|
name "password_popmenu"
|
||
|
visible 0
|
||
|
fullscreen 0
|
||
|
rect 204 190 235 235
|
||
|
focusColor COLOR_FOCUSED
|
||
|
style 1
|
||
|
border 1
|
||
|
popup
|
||
|
onESC { close password_popmenu }
|
||
|
|
||
|
itemDef
|
||
|
{
|
||
|
name window
|
||
|
group grpControlbutton
|
||
|
rect 0 40 235 135
|
||
|
style WINDOW_STYLE_FILLED
|
||
|
border 1
|
||
|
bordercolor .5 .5 .5 .5
|
||
|
forecolor 1 1 1 1
|
||
|
backcolor .1 .1 .1 1
|
||
|
visible 1
|
||
|
decoration
|
||
|
}
|
||
|
|
||
|
itemDef
|
||
|
{
|
||
|
name window2
|
||
|
group grpControlbutton
|
||
|
rect 2 42 231 20
|
||
|
style WINDOW_STYLE_FILLED
|
||
|
border 1
|
||
|
bordercolor .1 .1 .1 .2
|
||
|
forecolor 1 1 1 1
|
||
|
backcolor .3 0.5 0.2 0.5
|
||
|
visible 1
|
||
|
decoration
|
||
|
}
|
||
|
|
||
|
// PASSWORD //
|
||
|
itemDef {
|
||
|
name window_title
|
||
|
text "@MENU_PASSWORD"
|
||
|
style 0
|
||
|
decoration
|
||
|
textscale .3
|
||
|
rect 1 44 110 20
|
||
|
textalign ITEM_ALIGN_CENTER
|
||
|
textalignx 62
|
||
|
textaligny 16
|
||
|
forecolor 1 1 1 1
|
||
|
visible 1
|
||
|
}
|
||
|
|
||
|
itemDef {
|
||
|
name passwordEntry
|
||
|
group grpControls
|
||
|
TYPE 4
|
||
|
text " "
|
||
|
dvar "password"
|
||
|
rect 30 75 179 12
|
||
|
maxchars 12
|
||
|
maxpaintchars 12
|
||
|
textalign ITEM_ALIGN_RIGHT
|
||
|
textalignx -179
|
||
|
textaligny 10
|
||
|
textfont UI_FONT_NORMAL
|
||
|
textscale .25
|
||
|
forecolor .9 .9 .9 1
|
||
|
style WINDOW_STYLE_FILLED
|
||
|
backcolor 1 1 1 .3
|
||
|
visible 1
|
||
|
mouseenter { show keyBindStatus; play "mouse_over"; }
|
||
|
mouseexit { hide keyBindStatus }
|
||
|
}
|
||
|
|
||
|
|
||
|
itemDef {
|
||
|
name yes
|
||
|
text "@MENU_OK"
|
||
|
type ITEM_TYPE_BUTTON
|
||
|
textfont UI_FONT_NORMAL
|
||
|
textscale 0.25
|
||
|
textstyle ITEM_TEXTSTYLE_SHADOWED
|
||
|
style WINDOW_STYLE_FILLED
|
||
|
rect 70 150 100 15
|
||
|
textalign ITEM_ALIGN_CENTER
|
||
|
textaligny 11
|
||
|
forecolor .9 .9 .95 1
|
||
|
visible 1
|
||
|
|
||
|
action {
|
||
|
play "mouse_click"
|
||
|
close password_popmenu
|
||
|
}
|
||
|
|
||
|
mouseEnter { play "mouse_over"; }
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
*/
|