diff options
author | Tim Angus <tim@ngus.net> | 2009-11-15 01:10:27 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:19 +0000 |
commit | 8f759de26ac1a17676f3937019804b3a9a972e35 (patch) | |
tree | 4182465207276ea0b51051b6e9d6ad992b07f74d /assets | |
parent | 00043d33bad26cedbfa105269ae2b1b66684b721 (diff) |
* s/ITEM_TYPE_COMBO/ITEM_TYPE_CYCLE/
* Add ITEM_TYPE_COMBOBOX -- a proper combobox widget
* Use ITEM_TYPE_COMBOBOX for video mode selection
* General refactoring of the listbox code
* Various other assorted tidy-ups
Diffstat (limited to 'assets')
-rw-r--r-- | assets/ui/ingame.menu | 2 | ||||
-rw-r--r-- | assets/ui/ingame_options.menu | 33 | ||||
-rw-r--r-- | assets/ui/joinserver.menu | 3 | ||||
-rw-r--r-- | assets/ui/menudef.h | 3 | ||||
-rw-r--r-- | assets/ui/options.menu | 64 | ||||
-rw-r--r-- | assets/ui/tremulous_humanarmoury.menu | 10 |
6 files changed, 76 insertions, 39 deletions
diff --git a/assets/ui/ingame.menu b/assets/ui/ingame.menu index d51dba55..808287ea 100644 --- a/assets/ui/ingame.menu +++ b/assets/ui/ingame.menu @@ -35,7 +35,7 @@ visible MENU_FALSE fullScreen 0 outOfBoundsClick // this closes the window if it gets a click out of the rectangle - rect 0 0 640 48 + rect 0 0 1280 56 focusColor 1 .75 0 1 disableColor .5 .5 .5 1 backColor 0 0 0 1 diff --git a/assets/ui/ingame_options.menu b/assets/ui/ingame_options.menu index 62aec9b7..ad601938 100644 --- a/assets/ui/ingame_options.menu +++ b/assets/ui/ingame_options.menu @@ -24,6 +24,8 @@ #define SCONTENT_W (W-(SIDEBUTT_W+(2*BORDER))) #define SCONTENT_OFF (0-(SCONTENT_W/2)) +#define RESCOMBO_OFF 8 + #define ELEM_H 16 menuDef @@ -1585,17 +1587,36 @@ { name ghardware group optionsGrp - type ITEM_TYPE_COMBO + type ITEM_TYPE_TEXT text "Video Mode:" - feeder FEEDER_RESOLUTIONS - rect SCONTENT_X (SCONTENT_Y+(2*ELEM_H)) SCONTENT_W ELEM_H + rect SCONTENT_X (SCONTENT_Y+(2*ELEM_H)) (SCONTENT_W/2) ELEM_H textalign ALIGN_RIGHT textvalign VALIGN_CENTER - textalignx SCONTENT_OFF textscale .25 forecolor 1 1 1 1 - visible MENU_FALSE - action + visible MENU_TRUE + } + + itemDef + { + name ghardware + group optionsGrp + rect (SCONTENT_X+(SCONTENT_W/2)+RESCOMBO_OFF) (SCONTENT_Y+(2*ELEM_H)) ((SCONTENT_W/2)-(2*RESCOMBO_OFF)) ELEM_H + type ITEM_TYPE_COMBOBOX + style WINDOW_STYLE_FILLED + elementwidth ((SCONTENT_W/2)-(2*BORDER)) + elementheight ELEM_H + dropitems 5 + textscale .25 + elementtype LISTBOX_TEXT + feeder FEEDER_RESOLUTIONS + border WINDOW_BORDER_FULL + borderColor 0.5 0.5 0.5 1 + forecolor 1 1 1 1 + backcolor 0 0 0 1 + outlinecolor 0.1 0.1 0.1 0.5 + visible MENU_TRUE + doubleclick { play "sound/misc/menu1.wav"; } diff --git a/assets/ui/joinserver.menu b/assets/ui/joinserver.menu index 29ad442a..3b86c7fd 100644 --- a/assets/ui/joinserver.menu +++ b/assets/ui/joinserver.menu @@ -206,7 +206,8 @@ rect (TOP_X+(2*TOPBUTT_W)) (TOP_Y+TOPBUTT_H) (TOPBUTT_W) (TOPBUTT_H) textalign ALIGN_LEFT textvalign VALIGN_CENTER - forecolor 1 1 1 1 + textalignx TOP_TOFF_X + forecolor 1 1 1 1 visible MENU_TRUE decoration } diff --git a/assets/ui/menudef.h b/assets/ui/menudef.h index 49792096..cd30f772 100644 --- a/assets/ui/menudef.h +++ b/assets/ui/menudef.h @@ -11,8 +11,9 @@ enum ITEM_TYPE_CHECKBOX, // check box ITEM_TYPE_EDITFIELD, // editable text, associated with a cvar ITEM_TYPE_SAYFIELD, // the chat field - ITEM_TYPE_COMBO, // drop down list + ITEM_TYPE_CYCLE, // cycling list ITEM_TYPE_LISTBOX, // scrollable list + ITEM_TYPE_COMBOBOX, // drop down scrollable list ITEM_TYPE_MODEL, // model ITEM_TYPE_OWNERDRAW, // owner draw, has an associated ownerdraw number ITEM_TYPE_NUMERICFIELD, // editable text, associated with a cvar diff --git a/assets/ui/options.menu b/assets/ui/options.menu index af602bc2..fc405a1a 100644 --- a/assets/ui/options.menu +++ b/assets/ui/options.menu @@ -3,14 +3,17 @@ { \\ FRONT END OPTIONS BOX \\ -#define X 0 -#define Y 20 -#define W 250 -#define H 280 -#define TOFF_X (0-(W/2)) -#define ELEM_H 16 -#define BUTT_W 35 -#define BUTT_H 35 +#define X 0 +#define Y 20 +#define W 250 +#define H ((10*(ELEM_H+ELEM_GAP))+120) +#define TOFF_X (0-(W/2)) +#define ELEM_H 16 +#define ELEM_GAP 4 +#define BUTT_W 35 +#define BUTT_H 35 +#define BORDER 10 +#define RESCOMBO_OFF 8 menuDef { @@ -66,7 +69,7 @@ text "Video Quality:" cvar "ui_glCustom" cvarFloatList { "High Quality" 0 "Normal" 1 "Fast" 2 "Fastest" 3 "Custom" 4 } - rect X (Y+ELEM_H) W ELEM_H + rect X (Y+(ELEM_H+ELEM_GAP)) W ELEM_H textalign ALIGN_RIGHT textalignx TOFF_X textvalign VALIGN_CENTER @@ -82,17 +85,34 @@ itemDef { - type ITEM_TYPE_COMBO + type ITEM_TYPE_TEXT text "Video Mode:" - feeder FEEDER_RESOLUTIONS - rect X (Y+(2*ELEM_H)) W ELEM_H + rect X (Y+(2*(ELEM_H+ELEM_GAP))) (W/2) ELEM_H textalign ALIGN_RIGHT - textalignx TOFF_X textvalign VALIGN_CENTER textscale .25 forecolor 1 1 1 1 visible MENU_TRUE - action + } + + itemDef + { + rect ((W/2)+RESCOMBO_OFF) (Y+(2*(ELEM_H+ELEM_GAP))) ((W/2)-(2*BORDER)) ELEM_H + type ITEM_TYPE_COMBOBOX + style WINDOW_STYLE_FILLED + elementwidth ((W/2)-(2*BORDER)) + elementheight ELEM_H + dropitems 5 + textscale .25 + elementtype LISTBOX_TEXT + feeder FEEDER_RESOLUTIONS + border WINDOW_BORDER_FULL + borderColor 0.5 0.5 0.5 1 + forecolor 1 1 1 1 + backcolor 0 0 0 1 + outlinecolor 0.1 0.1 0.1 0.5 + visible MENU_TRUE + doubleclick { play "sound/misc/menu1.wav"; } @@ -103,7 +123,7 @@ type ITEM_TYPE_SLIDER text "Video Brightness:" cvarfloat "r_gamma" 1 .5 2 - rect X (Y+(3*ELEM_H)) W ELEM_H + rect X (Y+(3*(ELEM_H+ELEM_GAP))) W ELEM_H textalign ALIGN_RIGHT textalignx TOFF_X textvalign VALIGN_CENTER @@ -119,7 +139,7 @@ type ITEM_TYPE_SLIDER text "Effects Volume:" cvarfloat "s_volume" 0.7 0 1 - rect X (Y+(4*ELEM_H)) W ELEM_H + rect X (Y+(4*(ELEM_H+ELEM_GAP))) W ELEM_H textalign ALIGN_RIGHT textalignx TOFF_X textvalign VALIGN_CENTER @@ -133,7 +153,7 @@ type ITEM_TYPE_SLIDER text "Music Volume:" cvarfloat "s_musicvolume" 0.25 0 1 - rect X (Y+(5*ELEM_H)) W ELEM_H + rect X (Y+(5*(ELEM_H+ELEM_GAP))) W ELEM_H textalign ALIGN_RIGHT textalignx TOFF_X textvalign VALIGN_CENTER @@ -147,7 +167,7 @@ type ITEM_TYPE_YESNO text "OpenAL Sound:" cvar "s_useOpenAL" - rect X (Y+(6*ELEM_H)) W ELEM_H + rect X (Y+(6*(ELEM_H+ELEM_GAP))) W ELEM_H textalign ALIGN_RIGHT textalignx TOFF_X textvalign VALIGN_CENTER @@ -167,7 +187,7 @@ type ITEM_TYPE_SLIDER text "Mouse Sensitivity:" cvarfloat "sensitivity" 5 1 30 - rect X (Y+(7*ELEM_H)) W ELEM_H + rect X (Y+(7*(ELEM_H+ELEM_GAP))) W ELEM_H textalign ALIGN_RIGHT textalignx TOFF_X textvalign VALIGN_CENTER @@ -181,7 +201,7 @@ type ITEM_TYPE_YESNO text "Invert Mouse:" cvar "ui_mousePitch" - rect X (Y+(8*ELEM_H)) W ELEM_H + rect X (Y+(8*(ELEM_H+ELEM_GAP))) W ELEM_H textalign ALIGN_RIGHT textalignx TOFF_X textvalign VALIGN_CENTER @@ -203,7 +223,7 @@ text "Network Connection:" cvar "rate" cvarFloatList { "<=28.8k" 2500 "33.6k" 3000 "56k" 4000 "ISDN" 5000 "LAN/CABLE/xDSL" 25000 } - rect X (Y+(9*ELEM_H)) W ELEM_H + rect X (Y+(9*(ELEM_H+ELEM_GAP))) W ELEM_H textalign ALIGN_RIGHT textalignx TOFF_X textvalign VALIGN_CENTER @@ -221,7 +241,7 @@ type ITEM_TYPE_YESNO text "Allow Auto Download:" cvar "cl_allowDownload" - rect X (Y+(10*ELEM_H)) W ELEM_H + rect X (Y+(10*(ELEM_H+ELEM_GAP))) W ELEM_H textalign ALIGN_RIGHT textalignx TOFF_X textvalign VALIGN_CENTER diff --git a/assets/ui/tremulous_humanarmoury.menu b/assets/ui/tremulous_humanarmoury.menu index 4234259e..2df829fe 100644 --- a/assets/ui/tremulous_humanarmoury.menu +++ b/assets/ui/tremulous_humanarmoury.menu @@ -72,12 +72,11 @@ backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 visible MENU_TRUE + resetonfeederchange doubleclick { play "sound/misc/menu1.wav"; uiScript BuyFromArmoury; - reset selllist; - reset buylist; } } @@ -98,12 +97,11 @@ backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 visible MENU_TRUE + resetonfeederchange doubleclick { play "sound/misc/menu1.wav"; uiScript SellToArmoury; - reset selllist; - reset buylist; } } @@ -145,8 +143,6 @@ { play "sound/misc/menu1.wav"; uiScript BuyFromArmoury; - reset selllist; - reset buylist; } } @@ -187,8 +183,6 @@ { play "sound/misc/menu1.wav"; uiScript SellToArmoury; - reset selllist; - reset buylist; } } } |