summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
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;
}