summaryrefslogtreecommitdiff
path: root/source/ui_options.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2007-12-10 16:05:54 +0000
committerAndrey Nazarov <skuller@skuller.net>2007-12-10 16:05:54 +0000
commitd6363bebbd029559f4800b631368f3e8154a8b0f (patch)
treebeb599f4ddef858e12368b4e9970c743cee7eaa8 /source/ui_options.c
parenta0387528e7952b0909bcaf187565d968dc65c1af (diff)
Made the rest of the menus resizable.
Diffstat (limited to 'source/ui_options.c')
-rw-r--r--source/ui_options.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/source/ui_options.c b/source/ui_options.c
index 8597ddb..496b834 100644
--- a/source/ui_options.c
+++ b/source/ui_options.c
@@ -46,7 +46,6 @@ static const char names[][16] = {
typedef struct optionsMenu_s {
menuFrameWork_t menu;
menuAction_t actions[OPTIONS_ITEMS];
- menuStatic_t banner;
} optionsMenu_t;
static optionsMenu_t m_options;
@@ -85,6 +84,9 @@ static int OptionsMenu_Callback( int id, int msg, int param ) {
break;
}
return QMS_IN;
+ case QM_SIZE:
+ Menu_Size( &m_options.menu );
+ break;
default:
break;
}
@@ -92,37 +94,24 @@ static int OptionsMenu_Callback( int id, int msg, int param ) {
return QMS_NOTHANDLED;
}
-
-
static void OptionsMenu_Init( void ) {
int i;
- int x, y;
-
- x = uis.width / 2;
- y = ( uis.height - MENU_SPACING * OPTIONS_ITEMS ) / 2;
memset( &m_options, 0, sizeof( m_options ) );
m_options.menu.callback = OptionsMenu_Callback;
+ m_options.menu.banner = "Options";
for( i = 0; i < OPTIONS_ITEMS; i++ ) {
m_options.actions[i].generic.type = MTYPE_ACTION;
m_options.actions[i].generic.id = i;
m_options.actions[i].generic.name = names[i];
- m_options.actions[i].generic.x = x;
- m_options.actions[i].generic.y = y;
m_options.actions[i].generic.uiFlags = UI_CENTER;
- y += MENU_SPACING;
-
- Menu_AddItem( &m_options.menu, (void *)&m_options.actions[i] );
+
+ Menu_AddItem( &m_options.menu, &m_options.actions[i] );
}
m_options.actions[0].generic.flags = QMF_HASFOCUS;
-
- UI_SetupDefaultBanner( &m_options.banner, "Options" );
-
- Menu_AddItem( &m_options.menu, (void *)&m_options.banner );
-
}
@@ -131,4 +120,3 @@ void M_Menu_Options_f( void ) {
UI_PushMenu( &m_options.menu );
}
-