summaryrefslogtreecommitdiff
path: root/ui/joinserver.menu
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2007-11-08 00:05:14 +0000
committerTim Angus <tim@ngus.net>2007-11-08 00:05:14 +0000
commit74c8d33a2b830a47c31272bcf16cbbfd404ce0e8 (patch)
treee57fc261700a619fbf9a09a589706a5165653221 /ui/joinserver.menu
parentc6a9027b7cf0d35401cae346b67ca95c5f55b4a1 (diff)
* Merge and move text paint functions into ui_shared.c
* Add aspectBias to indicate alignment on non-4:3 video modes * Add "reset <item>" script command to reset an item * Compensate for aspect ratio in lots and lots and lots of places * Release edit field focus when tabbing away * Fix infinite loop bug in text wrapping code when rect is very narrow * Mung .menu scripts to line things up correctly on non-4:3 ratios
Diffstat (limited to 'ui/joinserver.menu')
-rw-r--r--ui/joinserver.menu93
1 files changed, 49 insertions, 44 deletions
diff --git a/ui/joinserver.menu b/ui/joinserver.menu
index e169183e..b9bc9540 100644
--- a/ui/joinserver.menu
+++ b/ui/joinserver.menu
@@ -53,6 +53,7 @@
focusColor 1 .75 0 1
outOfBoundsClick
style WINDOW_STYLE_EMPTY
+ aspectBias ASPECT_NONE
onOpen
{
uiScript InitServerList 3;
@@ -85,8 +86,8 @@
style WINDOW_STYLE_EMPTY
ownerdraw UI_NETSOURCE
rect TOP_X TOP_Y TOPBUTT_W TOPBUTT_H
- textalign ITEM_ALIGN_LEFT
- textvalign ITEM_VALIGN_TOP
+ textalign ALIGN_LEFT
+ textvalign VALIGN_TOP
textalignx TOP_TOFF_X
textaligny TOP_TOFF_Y
textscale .4
@@ -109,8 +110,8 @@
textscale .4
style WINDOW_STYLE_EMPTY
rect (TOP_X+TOPBUTT_W) TOP_Y TOPBUTT_W TOPBUTT_H
- textalign ITEM_ALIGN_LEFT
- textvalign ITEM_VALIGN_TOP
+ textalign ALIGN_LEFT
+ textvalign VALIGN_TOP
textalignx TOP_TOFF_X
textaligny TOP_TOFF_Y
backcolor .5 .5 .5 .5
@@ -131,8 +132,8 @@
style WINDOW_STYLE_EMPTY
type ITEM_TYPE_BUTTON
rect (TOP_X+(2*TOPBUTT_W)) TOP_Y TOPBUTT_W TOPBUTT_H
- textalign ITEM_ALIGN_LEFT
- textvalign ITEM_VALIGN_TOP
+ textalign ALIGN_LEFT
+ textvalign VALIGN_TOP
textalignx TOP_TOFF_X
textaligny TOP_TOFF_Y
backcolor .5 .5 .5 .5
@@ -154,8 +155,8 @@
cvar "ui_browserShowEmpty"
textscale .4
rect TOP_X (TOP_Y+TOPBUTT_H) TOPBUTT_W TOPBUTT_H
- textalign ITEM_ALIGN_LEFT
- textvalign ITEM_VALIGN_TOP
+ textalign ALIGN_LEFT
+ textvalign VALIGN_TOP
textalignx TOP_TOFF_X
textaligny TOP_TOFF_Y
forecolor 1 1 1 1
@@ -177,8 +178,8 @@
cvar "ui_browserShowFull"
textscale .4
rect (TOP_X+TOPBUTT_W) (TOP_Y+TOPBUTT_H) TOPBUTT_W TOPBUTT_H
- textalign ITEM_ALIGN_LEFT
- textvalign ITEM_VALIGN_TOP
+ textalign ALIGN_LEFT
+ textvalign VALIGN_TOP
textalignx TOP_TOFF_X
textaligny TOP_TOFF_Y
forecolor 1 1 1 1
@@ -217,8 +218,8 @@
textscale .33
style WINDOW_STYLE_EMPTY
rect LIST_X LIST_Y (SERVER_C*LIST_W) HEADFOOT_H
- textalign ITEM_ALIGN_LEFT
- textvalign ITEM_VALIGN_CENTER
+ textalign ALIGN_LEFT
+ textvalign VALIGN_CENTER
textalignx LIST_TOFF
border WINDOW_BORDER_FULL
bordercolor 0.5 0.5 0.5 1
@@ -259,8 +260,8 @@
textscale .33
style WINDOW_STYLE_EMPTY
rect (LIST_X+(SERVER_C*LIST_W)) LIST_Y (MAP_C*LIST_W) HEADFOOT_H
- textalign ITEM_ALIGN_LEFT
- textvalign ITEM_VALIGN_CENTER
+ textalign ALIGN_LEFT
+ textvalign VALIGN_CENTER
textalignx LIST_TOFF
border WINDOW_BORDER_FULL
bordercolor 0.5 0.5 0.5 1
@@ -301,8 +302,8 @@
textscale .33
style WINDOW_STYLE_EMPTY
rect (LIST_X+((SERVER_C+MAP_C)*LIST_W)) LIST_Y (PLAYERS_C*LIST_W) HEADFOOT_H
- textalign ITEM_ALIGN_LEFT
- textvalign ITEM_VALIGN_CENTER
+ textalign ALIGN_LEFT
+ textvalign VALIGN_CENTER
textalignx LIST_TOFF
border WINDOW_BORDER_FULL
bordercolor 0.5 0.5 0.5 1
@@ -343,8 +344,8 @@
textscale .33
style WINDOW_STYLE_EMPTY
rect (LIST_X+((SERVER_C+MAP_C+PLAYERS_C)*LIST_W)) LIST_Y (PING_C*LIST_W) HEADFOOT_H
- textalign ITEM_ALIGN_LEFT
- textvalign ITEM_VALIGN_CENTER
+ textalign ALIGN_LEFT
+ textvalign VALIGN_CENTER
textalignx LIST_TOFF
border WINDOW_BORDER_FULL
bordercolor 0.5 0.5 0.5 1
@@ -396,10 +397,10 @@
outlinecolor 0.1 0.1 0.1 0.5
visible MENU_TRUE
columns 4
- LIST_TOFF ((SERVER_C*LIST_W)-(3*LIST_TOFF)) ITEM_ALIGN_LEFT
- (LIST_TOFF+((SERVER_C)*LIST_W)) ((MAP_C*LIST_W)-(3*LIST_TOFF)) ITEM_ALIGN_LEFT
- (LIST_TOFF+((SERVER_C+MAP_C)*LIST_W)) ((PLAYERS_C*LIST_W)-(3*LIST_TOFF)) ITEM_ALIGN_LEFT
- (LIST_TOFF+((SERVER_C+MAP_C+PLAYERS_C)*LIST_W)) ((PING_C*LIST_W)-(3*LIST_TOFF)) ITEM_ALIGN_LEFT
+ LIST_TOFF ((SERVER_C*LIST_W)-(3*LIST_TOFF)) ALIGN_LEFT
+ (LIST_TOFF+((SERVER_C)*LIST_W)) ((MAP_C*LIST_W)-(3*LIST_TOFF)) ALIGN_LEFT
+ (LIST_TOFF+((SERVER_C+MAP_C)*LIST_W)) ((PLAYERS_C*LIST_W)-(3*LIST_TOFF)) ALIGN_LEFT
+ (LIST_TOFF+((SERVER_C+MAP_C+PLAYERS_C)*LIST_W)) ((PING_C*LIST_W)-(3*LIST_TOFF)) ALIGN_LEFT
doubleClick { uiScript JoinServer }
}
@@ -413,8 +414,8 @@
ownerdraw UI_SERVERREFRESHDATE
textscale .33
rect LIST_X (LIST_Y+(LIST_H-HEADFOOT_H)) (LIST_W/2) HEADFOOT_H
- textalign ITEM_ALIGN_LEFT
- textvalign ITEM_VALIGN_CENTER
+ textalign ALIGN_LEFT
+ textvalign VALIGN_CENTER
textalignx LIST_TOFF
forecolor 1 1 1 1
border WINDOW_BORDER_FULL
@@ -429,8 +430,8 @@
ownerdraw UI_SERVERMOTD
textscale .33
rect (LIST_X+(LIST_W/2)) (LIST_Y+(LIST_H-HEADFOOT_H)) (LIST_W/2) HEADFOOT_H
- textalign ITEM_ALIGN_LEFT
- textvalign ITEM_VALIGN_CENTER
+ textalign ALIGN_LEFT
+ textvalign VALIGN_CENTER
textalignx LIST_TOFF
forecolor 1 1 1 1
border WINDOW_BORDER_FULL
@@ -450,8 +451,8 @@
textscale .4
style WINDOW_STYLE_EMPTY
rect BOT_X BOT_Y BOTBUTT_W BOTBUTT_H
- textalign ITEM_ALIGN_CENTER
- textvalign ITEM_VALIGN_CENTER
+ textalign ALIGN_CENTER
+ textvalign VALIGN_CENTER
forecolor 1 1 1 1
visible MENU_TRUE
action
@@ -469,8 +470,8 @@
textscale .4
style WINDOW_STYLE_EMPTY
rect (BOT_X+BOTBUTT_W) BOT_Y BOTBUTT_W BOTBUTT_H
- textalign ITEM_ALIGN_CENTER
- textvalign ITEM_VALIGN_CENTER
+ textalign ALIGN_CENTER
+ textvalign VALIGN_CENTER
forecolor 1 1 1 1
visible MENU_TRUE
action
@@ -489,8 +490,8 @@
style WINDOW_STYLE_EMPTY
ownerdrawFlag UI_SHOW_NOTFAVORITESERVERS
rect (BOT_X+(2*BOTBUTT_W)) BOT_Y BOTBUTT_W BOTBUTT_H
- textalign ITEM_ALIGN_CENTER
- textvalign ITEM_VALIGN_CENTER
+ textalign ALIGN_CENTER
+ textvalign VALIGN_CENTER
forecolor 1 1 1 1
visible MENU_TRUE
action
@@ -509,8 +510,8 @@
style WINDOW_STYLE_EMPTY
ownerdrawFlag UI_SHOW_FAVORITESERVERS
rect (BOT_X+(2*BOTBUTT_W)) BOT_Y BOTBUTT_W BOTBUTT_H
- textalign ITEM_ALIGN_CENTER
- textvalign ITEM_VALIGN_CENTER
+ textalign ALIGN_CENTER
+ textvalign VALIGN_CENTER
forecolor 1 1 1 1
visible MENU_TRUE
action
@@ -529,8 +530,8 @@
textscale .4
style WINDOW_STYLE_EMPTY
rect (BOT_X+(3*BOTBUTT_W)) BOT_Y BOTBUTT_W BOTBUTT_H
- textalign ITEM_ALIGN_CENTER
- textvalign ITEM_VALIGN_CENTER
+ textalign ALIGN_CENTER
+ textvalign VALIGN_CENTER
forecolor 1 1 1 1
visible MENU_TRUE
action
@@ -548,8 +549,8 @@
textscale .4
style WINDOW_STYLE_EMPTY
rect (BOT_X+(4*BOTBUTT_W)) BOT_Y BOTBUTT_W BOTBUTT_H
- textalign ITEM_ALIGN_CENTER
- textvalign ITEM_VALIGN_CENTER
+ textalign ALIGN_CENTER
+ textvalign VALIGN_CENTER
forecolor 1 1 1 1
visible MENU_TRUE
action
@@ -571,8 +572,8 @@
style WINDOW_STYLE_EMPTY
type ITEM_TYPE_BUTTON
rect (BCJ_X+ARROW_W) BCJ_Y (BCJ_W-(2*ARROW_W)) BCJ_H
- textalign ITEM_ALIGN_CENTER
- textvalign ITEM_VALIGN_CENTER
+ textalign ALIGN_CENTER
+ textvalign VALIGN_CENTER
forecolor 1 1 1 1
visible MENU_TRUE
action
@@ -589,6 +590,7 @@
style WINDOW_STYLE_SHADER
background "ui/assets/backarrow.tga"
rect BCJ_X BCJ_Y ARROW_H ARROW_W
+ aspectBias ALIGN_LEFT
visible MENU_TRUE
action
{
@@ -609,14 +611,15 @@
style WINDOW_STYLE_SHADER
background "ui/assets/backarrow_alt.tga"
rect BCJ_X BCJ_Y ARROW_H ARROW_W
+ aspectBias ALIGN_LEFT
backcolor 0 0 0 0
forecolor 1 1 1 1
visible MENU_FALSE
type ITEM_TYPE_BUTTON
text "Back"
- textalign ITEM_ALIGN_LEFT
- textvalign ITEM_VALIGN_CENTER
+ textalign ALIGN_LEFT
+ textvalign VALIGN_CENTER
textalignx ARROW_W
textscale .6
@@ -641,6 +644,7 @@
name accept
style WINDOW_STYLE_SHADER
rect ((BCJ_X+BCJ_W)-ARROW_W) BCJ_Y ARROW_H ARROW_W
+ aspectBias ALIGN_RIGHT
background "ui/assets/forwardarrow.tga"
backcolor 0 0 0 0
forecolor 1 1 1 1
@@ -663,6 +667,7 @@
name accept_alt
style WINDOW_STYLE_SHADER
rect ((BCJ_X+BCJ_W)-ARROW_W) BCJ_Y ARROW_H ARROW_W
+ aspectBias ALIGN_RIGHT
background "ui/assets/forwardarrow_alt.tga"
backcolor 0 0 0 0
type ITEM_TYPE_BUTTON
@@ -671,8 +676,8 @@
type ITEM_TYPE_BUTTON
text "Join"
- textalign ITEM_ALIGN_RIGHT
- textvalign ITEM_VALIGN_CENTER
+ textalign ALIGN_RIGHT
+ textvalign VALIGN_CENTER
textalignx -ARROW_W
textscale .6