summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-08-12 02:42:17 +0000
committerTim Angus <tim@ngus.net>2003-08-12 02:42:17 +0000
commitd8289eef899a0be82afbe22501f39f20e5b25d90 (patch)
tree69580d6f7ebb4d339cb5368f4b52a430e8a8886a /src/ui
parent44a9b6d825e66df1f6f9cd2475186c0f0bf2cb8b (diff)
* Disabled automatically bringing up spawn menus to prevent cutting off chat
* EV_NEXT_WEAPON event now only triggers on the correct client * Creep slowdown totally reworked, it's now predicted and might actually work * Listboxes now have their selection set to 0 whenever displayed
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/ui_main.c2
-rw-r--r--src/ui/ui_shared.c9
2 files changed, 10 insertions, 1 deletions
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c
index b01f62bc..21281f87 100644
--- a/src/ui/ui_main.c
+++ b/src/ui/ui_main.c
@@ -3574,6 +3574,8 @@ static void UI_LoadTremAlienBuilds( )
uiInfo.tremAlienBuildCount++;
}
}
+
+ uiInfo.tremAlienBuildIndex = 0;
}
/*
diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c
index 73244fef..5b0e8e30 100644
--- a/src/ui/ui_shared.c
+++ b/src/ui/ui_shared.c
@@ -4404,7 +4404,7 @@ qboolean Menus_AnyFullScreenVisible() {
}
menuDef_t *Menus_ActivateByName(const char *p) {
- int i;
+ int i, j;
menuDef_t *m = NULL;
menuDef_t *focus = Menu_GetFocused();
@@ -4413,6 +4413,13 @@ menuDef_t *Menus_ActivateByName(const char *p) {
m = &Menus[i];
Menus_Activate(m);
Menu_HandleMouseMove( m, DC->cursorx, DC->cursory ); //TA: force the item under the cursor to focus
+
+ for( j = 0; j < m->itemCount; j++ ) //TA: reset selection in listboxes when opened
+ {
+ if( m->items[ j ]->type == ITEM_TYPE_LISTBOX )
+ m->items[ j ]->cursorPos = 0;
+ }
+
if (openMenuCount < MAX_OPEN_MENUS && focus != NULL) {
menuStack[openMenuCount++] = focus;
}