From d8289eef899a0be82afbe22501f39f20e5b25d90 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Tue, 12 Aug 2003 02:42:17 +0000 Subject: * 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 --- src/ui/ui_main.c | 2 ++ src/ui/ui_shared.c | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src/ui') 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; } -- cgit