377 lines
No EOL
7.9 KiB
Text
377 lines
No EOL
7.9 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 "favorite"
|
|
|
|
#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 400
|
|
|
|
#define SIDE_MARGIN 40
|
|
|
|
{
|
|
menuDef
|
|
{
|
|
CENTER_POPUP_SETUP_ONOPEN( createfavorite_popmenu, 5, ;, setfocus fav_ip;, 1 )
|
|
//CENTER_POPUP_SETUP( createfavorite_popmenu, 6, ;, 1 )
|
|
CHOICE_POPMENU_TITLE( "@MENU_NEW_FAVORITE" )
|
|
/*itemDef {
|
|
name fav_name
|
|
TYPE 4
|
|
text "@MENU_NAME1"
|
|
dvar "ui_favoriteName"
|
|
rect CHOICE_ORIGIN( 3 ) (CHOICE_SIZE_X-(SIDE_MARGIN*2)) 18
|
|
origin SIDE_MARGIN -8
|
|
textaligny -2
|
|
maxchars 15
|
|
maxpaintchars 15
|
|
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
|
|
//accept { close self; }
|
|
}*/
|
|
itemDef {
|
|
name fav_ip
|
|
TYPE 4
|
|
text "@MENU_IP_ADDRESS"
|
|
dvar "ui_favoriteAddress"
|
|
rect CHOICE_ORIGIN( 3 ) (CHOICE_SIZE_X-(SIDE_MARGIN*2)) 18
|
|
origin SIDE_MARGIN -8
|
|
textaligny -2
|
|
maxchars 22
|
|
maxpaintchars 22
|
|
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
|
|
accept { close self; uiScript CreateFavorite; close createfavorite_popmenu; open fav_message_popmenu; }
|
|
}
|
|
CHOICE_BUTTON( 4, "@MENU_OK", close self; uiScript CreateFavorite; close createfavorite_popmenu; open fav_message_popmenu; )
|
|
CHOICE_BUTTON( 5, "@MENU_CANCEL", close self; )
|
|
}
|
|
|
|
#undef CHOICE_SIZE_X
|
|
#define CHOICE_SIZE_X 320
|
|
|
|
menuDef
|
|
{
|
|
CENTER_POPUP_SETUP( fav_message_popmenu, 3, ;, 1 )
|
|
CHOICE_POPMENU_SUBTITLE( dvarString(ui_favorite_message) )
|
|
|
|
CHOICE_BUTTON( 3, "@MENU_OK", close self; )
|
|
}
|
|
|
|
menuDef
|
|
{
|
|
CENTER_POPUP_SETUP( del_fav_popmenu, 4, ;, 1 )
|
|
CHOICE_POPMENU_TITLE( "@MENU_DEL_SEL_FAVORITE" )
|
|
|
|
CHOICE_BUTTON( 3, "@MENU_OK", close self; uiScript DeleteFavorite; uiScript UpdateFilter; close del_fav_popmenu; )
|
|
CHOICE_BUTTON( 4, "@MENU_CANCEL", close self; )
|
|
}
|
|
|
|
/*
|
|
menuDef
|
|
{
|
|
name fav_message_popmenu
|
|
visible 0
|
|
fullscreen 0
|
|
rect 200 220 250 80
|
|
focusColor COLOR_FOCUSED
|
|
backcolor .1 .15 .1 1
|
|
border 1
|
|
bordercolor .5 .5 .5 .5
|
|
style WINDOW_STYLE_FILLED
|
|
popup
|
|
onESC {
|
|
close fav_message_popmenu;
|
|
}
|
|
|
|
itemDef {
|
|
name fav_msg
|
|
dvar "ui_favorite_message"
|
|
style 0
|
|
textscale .24
|
|
textstyle 3
|
|
rect 0 0 240 60
|
|
textalign ITEM_ALIGN_CENTER
|
|
textalignx 5
|
|
textaligny 20
|
|
decoration
|
|
forecolor 1 1 1 1
|
|
visible 1
|
|
}
|
|
itemDef {
|
|
name fav_msg_ok
|
|
text "@MENU_OK"
|
|
type 1
|
|
textfont UI_FONT_NORMAL
|
|
textscale .25
|
|
textstyle ITEM_TEXTSTYLE_SHADOWED
|
|
style WINDOW_STYLE_FILLED
|
|
rect 100 35 45 24
|
|
textalign ITEM_ALIGN_CENTER
|
|
textalignx -1
|
|
textaligny 16
|
|
forecolor .9 .9 .95 1
|
|
visible 1
|
|
action {
|
|
play "mouse_click";
|
|
close fav_message_popmenu;
|
|
}
|
|
mouseEnter { play "mouse_over" }
|
|
}
|
|
}*/
|
|
/*
|
|
menuDef {
|
|
name del_fav_popmenu
|
|
visible 0
|
|
fullscreen 0
|
|
rect 200 220 250 80
|
|
focusColor COLOR_FOCUSED
|
|
|
|
backcolor .1 .15 .1 1
|
|
border 1
|
|
bordercolor .5 .5 .5 .5
|
|
style WINDOW_STYLE_FILLED
|
|
popup
|
|
onESC {
|
|
close del_fav_popmenu;
|
|
}
|
|
// onOpen { open save_load_menu; }
|
|
|
|
itemDef {
|
|
name confirm
|
|
text "@MENU_DEL_SEL_FAVORITE"
|
|
style 0
|
|
textscale .24
|
|
textstyle 3
|
|
rect 0 0 240 60
|
|
textalign ITEM_ALIGN_CENTER
|
|
textalignx 5
|
|
textaligny 20
|
|
decoration
|
|
forecolor 1 1 1 1
|
|
visible 1
|
|
}
|
|
|
|
itemDef {
|
|
name overwrite_yes
|
|
text "@MENU_YES"
|
|
type 1
|
|
textfont UI_FONT_NORMAL
|
|
textscale .25
|
|
textstyle ITEM_TEXTSTYLE_SHADOWED
|
|
style WINDOW_STYLE_FILLED
|
|
rect 65 35 45 24
|
|
textalign ITEM_ALIGN_CENTER
|
|
textalignx -1
|
|
textaligny 16
|
|
forecolor .9 .9 .95 1
|
|
visible 1
|
|
action {
|
|
play "mouse_click";
|
|
uiScript DeleteFavorite ;
|
|
uiScript UpdateFilter
|
|
close del_fav_popmenu;
|
|
}
|
|
mouseEnter { play "mouse_over"; }
|
|
}
|
|
|
|
itemDef {
|
|
name overwrite_no
|
|
text "@MENU_NO"
|
|
type 1
|
|
textfont UI_FONT_NORMAL
|
|
textscale .25
|
|
textstyle ITEM_TEXTSTYLE_SHADOWED
|
|
style WINDOW_STYLE_FILLED
|
|
rect 144 35 45 24
|
|
textalign ITEM_ALIGN_CENTER
|
|
textalignx -1
|
|
textaligny 16
|
|
forecolor .9 .9 .95 1
|
|
visible 1
|
|
action {
|
|
play "mouse_click";
|
|
close del_fav_popmenu;
|
|
}
|
|
mouseEnter { play "mouse_over"; }
|
|
}
|
|
}*/
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
{
|
|
// CREATE FAVORITE POPUP MENU \\
|
|
menuDef
|
|
{
|
|
name "createfavorite_popmenu"
|
|
visible 0
|
|
fullscreen 0
|
|
rect 120 190 404 235
|
|
focusColor COLOR_FOCUSED
|
|
style 1
|
|
border 1
|
|
popup
|
|
onESC { close createfavorite_popmenu }
|
|
|
|
itemDef
|
|
{
|
|
name window
|
|
group grpControlbutton
|
|
rect 0 40 404 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 400 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
|
|
}
|
|
|
|
itemDef
|
|
{
|
|
name window_title
|
|
text "@MENU_NEW_FAVORITE"
|
|
style 0
|
|
decoration
|
|
textscale .3
|
|
rect 85 44 110 20
|
|
textalign ITEM_ALIGN_CENTER
|
|
textalignx 62
|
|
textaligny 14
|
|
forecolor 1 1 1 1
|
|
visible 1
|
|
}
|
|
|
|
// ENTER NAME AND ADDRESS //
|
|
itemDef
|
|
{
|
|
name nameEntry
|
|
group grpControls
|
|
TYPE 4
|
|
text "@MENU_NAME1"
|
|
dvar "ui_favoriteName"
|
|
rect 30 75 344 12
|
|
maxchars 30
|
|
textalign ITEM_ALIGN_RIGHT
|
|
textalignx -255
|
|
textaligny 11
|
|
textfont UI_FONT_NORMAL
|
|
textscale .25
|
|
forecolor .9 .9 .9 1
|
|
style WINDOW_STYLE_FILLED
|
|
backcolor 0 0 0 0
|
|
visible 1
|
|
mouseenter { show keyBindStatus; play "mouse_over" }
|
|
mouseexit { hide keyBindStatus }
|
|
}
|
|
|
|
itemDef
|
|
{
|
|
name nameEntry
|
|
group grpControls
|
|
TYPE 4
|
|
text "@MENU_IP_ADDRESS"
|
|
dvar "ui_favoriteAddress"
|
|
rect 30 90 344 12
|
|
textalign ITEM_ALIGN_RIGHT
|
|
textalignx -255
|
|
textaligny 11
|
|
maxchars 30
|
|
textfont UI_FONT_NORMAL
|
|
textscale .25
|
|
forecolor .9 .9 .9 1
|
|
style WINDOW_STYLE_FILLED
|
|
backcolor 0 0 0 0
|
|
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 95 150 100 15
|
|
textalign ITEM_ALIGN_CENTER
|
|
textaligny 11
|
|
forecolor .9 .9 .95 1
|
|
visible 1
|
|
action
|
|
{
|
|
play "mouse_click" ;
|
|
uiScript CreateFavorite ;
|
|
close createfavorite_popmenu ;
|
|
open fav_message_popmenu
|
|
}
|
|
mouseEnter { play "mouse_over"; }
|
|
}
|
|
itemDef
|
|
{
|
|
name cancel
|
|
text "@MENU_CANCEL"
|
|
type ITEM_TYPE_BUTTON
|
|
textfont UI_FONT_NORMAL
|
|
textscale 0.25
|
|
textstyle ITEM_TEXTSTYLE_SHADOWED
|
|
style WINDOW_STYLE_FILLED
|
|
rect 210 150 100 15
|
|
textalign ITEM_ALIGN_CENTER
|
|
textaligny 11
|
|
forecolor .9 .9 .95 1
|
|
visible 1
|
|
action
|
|
{
|
|
play "mouse_click" ;
|
|
// uiScript CreateFavorite ;
|
|
close createfavorite_popmenu
|
|
}
|
|
mouseEnter { play "mouse_over"; }
|
|
}
|
|
}
|
|
}
|
|
*/ |