Show intro movie properly when idle in main menu, including subtitles if on
This commit is contained in:
parent
05cc0f32af
commit
5ee9ccd867
|
@ -1,5 +1,9 @@
|
|||
D1X-Rebirth Changelog
|
||||
|
||||
20100317
|
||||
--------
|
||||
main/menu.c, main/menu.h: Add hide_menus and show_menus (for later use in the case of D1X)
|
||||
|
||||
20100317
|
||||
--------
|
||||
arch/sdl/window.c, arch/include/window.h: Add window_exists function so event loops can be placed for specific windows
|
||||
|
|
28
main/menu.c
28
main/menu.c
|
@ -114,6 +114,8 @@ enum MENUS
|
|||
|
||||
#define ADD_ITEM(t,value,key) do { m[num_options].type=NM_TYPE_MENU; m[num_options].text=t; menu_choice[num_options]=value;num_options++; } while (0)
|
||||
|
||||
static window *menus[16];
|
||||
|
||||
// Function Prototypes added after LINTING
|
||||
void do_option(int select);
|
||||
void do_new_game_menu(void);
|
||||
|
@ -122,6 +124,32 @@ extern void newmenu_close();
|
|||
extern void ReorderPrimary();
|
||||
extern void ReorderSecondary();
|
||||
|
||||
// Hide all menus
|
||||
void hide_menus(void)
|
||||
{
|
||||
window *wind;
|
||||
int i;
|
||||
|
||||
for (i = 0; (i < 15) && (wind = window_get_front()); i++)
|
||||
{
|
||||
menus[i] = wind;
|
||||
window_set_visible(wind, 0);
|
||||
}
|
||||
|
||||
Assert(window_get_front() == NULL);
|
||||
menus[i] = NULL;
|
||||
}
|
||||
|
||||
// Show all menus, with the front one shown first
|
||||
// This makes sure EVENT_WINDOW_ACTIVATED is only sent to that window
|
||||
void show_menus(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; (i < 16) && menus[i]; i++)
|
||||
window_set_visible(menus[i], 1);
|
||||
}
|
||||
|
||||
//pairs of chars describing ranges
|
||||
char playername_allowed_chars[] = "azAZ09__--";
|
||||
|
||||
|
|
|
@ -20,6 +20,9 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
#ifndef _MENU_H
|
||||
#define _MENU_H
|
||||
|
||||
extern void hide_menus(void);
|
||||
extern void show_menus(void);
|
||||
|
||||
// called once at program startup to get the player's name
|
||||
extern int RegisterPlayer();
|
||||
|
||||
|
|
Loading…
Reference in a new issue