summaryrefslogtreecommitdiff
path: root/ui/ingame.menu
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2007-10-30 18:18:47 +0000
committerTim Angus <tim@ngus.net>2007-10-30 18:18:47 +0000
commit1e0b515a6031a2cd2a77e9c34f2e4292fc9f9750 (patch)
tree51193c4f5cac62d5c5626c360c80218bc7fab71c /ui/ingame.menu
parente552cbda632662d32ffccc662c6d12ec1cc54719 (diff)
* (bug 3384) Remove server side armoury refresh and replace with UI side
refresh * Add trap_Key_SetOverstrikeMode and trap_Key_GetOverstrikeMode to cgame * Change Text_[Width|Height] to return floats * Add Text_Em[Width|Height] * Add CG_AlignText to cut down on code duplication * Add itemDef_t::textvalignment for vertical text alignment * Add UI_DrawTextBlock to replace a lot of duplicate code * Rewrite text wrapping code from scratch so that it actually works * Add UI_OwnerDrawText * Add expression evaluator to .menu parser * Split off Border_Paint from Window_Paint * Scale slider items to fit their rect * Rework edit field widgets to behave somewhat more correctly * Fix a few listbox widget layout issues * Don't display scrollbars in "notselectable" listbox widgets * Make scoreboard team labels ownerdrawn * Menu script rework + Use the expression evaluator to replace lots and lots of absolute coords with relative ones, hopefully easing future maintenance + Remove lots and lots of textalign[xy] that were present to work around broken text alignment routines + Replace a bunch of numeric constants with ones from menudef.h + Compose the huds from tremulous_common_hud.h + Generally neaten things up + Lots of whitespace fixes
Diffstat (limited to 'ui/ingame.menu')
-rw-r--r--ui/ingame.menu65
1 files changed, 36 insertions, 29 deletions
diff --git a/ui/ingame.menu b/ui/ingame.menu
index 13bd1f3c..07b969e6 100644
--- a/ui/ingame.menu
+++ b/ui/ingame.menu
@@ -1,32 +1,41 @@
#include "ui/menudef.h"
{
+
+#define BUTT_BAR_X 35
+#define BUTT_BAR_Y 0
+#define BUTT_BAR_W 235
+#define BUTT_BAR_H 56
+#define BUTT_W (BUTT_BAR_W/3)
+#define BUTT_H BUTT_BAR_H
+#define BUTT_TEXT_S 20
+
assetGlobalDef
{
font "fonts/font" 26 // font
smallFont "fonts/smallfont" 20 // font
bigFont "fonts/bigfont" 34 // font
- cursor "ui/assets/3_cursor3" // cursor
+ cursor "ui/assets/3_cursor3" // cursor
gradientBar "ui/assets/gradientbar2.tga" // gradient bar
itemFocusSound "sound/misc/menu2.wav" // sound for item getting focus (via keyboard or mouse )
-
+
fadeClamp 1.0 // sets the fadeup alpha
fadeCycle 1 // how often fade happens in milliseconds
fadeAmount 0.1 // amount to adjust alpha per cycle
shadowColor 0.1 0.1 0.1 0.25 // shadow color
}
-
+
\\ INGAME MENU \\
- menuDef
+ menuDef
{
name "ingame"
style WINDOW_STYLE_FILLED
- visible 0
+ 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 640 48
focusColor 1 .75 0 1
disableColor .5 .5 .5 1
backColor 0 0 0 1
@@ -35,38 +44,38 @@
{
close ingame;
}
-
+
itemDef
{
name splashmodel
- rect 0 -10 640 66
+ rect 0 -10 640 66
type ITEM_TYPE_MODEL
style WINDOW_STYLE_FILLED
asset_model "models/splash/splash_screen.md3"
model_fovx 32.0
model_fovy 3.8
model_angle 180
- visible 1
+ visible MENU_TRUE
decoration
backcolor 0 0 0 1
}
itemdef
{
- name game
- text "Game"
- rect 35 6 65 40
+ name game
+ text "Game"
+ rect BUTT_BAR_X BUTT_BAR_Y BUTT_W BUTT_H
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
- textalign ITEM_ALIGN_CENTER
- textalignx 32
- textaligny 28
+ textalign ITEM_ALIGN_RIGHT
+ textvalign ITEM_VALIGN_CENTER
+ textalignx -BUTT_TEXT_S
textscale .4
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
action
{
- play "sound/misc/menu1.wav";
+ play "sound/misc/menu1.wav";
open ingame_game
}
}
@@ -77,16 +86,15 @@
text "Options"
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
- rect 100 6 70 40
+ rect (BUTT_BAR_X+BUTT_W) BUTT_BAR_Y BUTT_W BUTT_H
textalign ITEM_ALIGN_CENTER
- textalignx 35
- textaligny 28
+ textvalign ITEM_VALIGN_CENTER
textscale .4
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
action
{
- play "sound/misc/menu1.wav";
+ play "sound/misc/menu1.wav";
open ingame_options
}
}
@@ -97,17 +105,16 @@
text "Exit"
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
- //rect 220 6 50 40
- rect 170 6 50 40
- textalign ITEM_ALIGN_CENTER
- textalignx 25
- textaligny 28
+ rect (BUTT_BAR_X+(2*BUTT_W)) BUTT_BAR_Y BUTT_W BUTT_H
+ textalign ITEM_ALIGN_LEFT
+ textvalign ITEM_VALIGN_CENTER
+ textalignx BUTT_TEXT_S
textscale .4
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
action
{
- play "sound/misc/menu1.wav";
+ play "sound/misc/menu1.wav";
open ingame_leave
}
}