summaryrefslogtreecommitdiff
path: root/source/ui_confirm.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2009-05-29 21:32:02 +0000
committerAndrey Nazarov <skuller@skuller.net>2009-05-29 21:32:02 +0000
commit3ef036028a652f979a4197dd4a2ddd779e437597 (patch)
tree42c11d1e5396509e41d3776b80eaca3660a998db /source/ui_confirm.c
parent454fc2e2eb975e359696850f07c071aa0736aac7 (diff)
Ran all source files through expand(1).
Diffstat (limited to 'source/ui_confirm.c')
-rw-r--r--source/ui_confirm.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/source/ui_confirm.c b/source/ui_confirm.c
index cb60512..7c7adeb 100644
--- a/source/ui_confirm.c
+++ b/source/ui_confirm.c
@@ -30,12 +30,12 @@ CONFIRM MENU
*/
typedef struct {
- menuFrameWork_t menu;
- menuStatic_t text;
- confirmAction_t action;
+ menuFrameWork_t menu;
+ menuStatic_t text;
+ confirmAction_t action;
} confirmMenu_t;
-static confirmMenu_t m_confirm;
+static confirmMenu_t m_confirm;
static menuSound_t ConfirmKeydown( menuFrameWork_t *self, int key ) {
switch( key ) {
@@ -50,26 +50,26 @@ static menuSound_t ConfirmKeydown( menuFrameWork_t *self, int key ) {
UI_PopMenu();
return QMS_OUT;
default:
- return QMS_NOTHANDLED;
+ return QMS_NOTHANDLED;
}
}
void M_Menu_Confirm( const char *text, confirmAction_t action ) {
- memset( &m_confirm, 0, sizeof( m_confirm ) );
+ memset( &m_confirm, 0, sizeof( m_confirm ) );
m_confirm.menu.keydown = ConfirmKeydown;
m_confirm.menu.image = uis.backgroundHandle;
*( uint32_t * )m_confirm.menu.color = *( uint32_t * )colorBlack;
- m_confirm.text.generic.type = MTYPE_STATIC;
- m_confirm.text.generic.name = ( char * )text;
- m_confirm.text.generic.uiFlags = UI_CENTER;
+ m_confirm.text.generic.type = MTYPE_STATIC;
+ m_confirm.text.generic.name = ( char * )text;
+ m_confirm.text.generic.uiFlags = UI_CENTER;
m_confirm.action = action;
-
- Menu_AddItem( &m_confirm.menu, &m_confirm.text );
+
+ Menu_AddItem( &m_confirm.menu, &m_confirm.text );
- UI_PushMenu( &m_confirm.menu );
+ UI_PushMenu( &m_confirm.menu );
}
@@ -82,48 +82,48 @@ ERROR MENU
*/
typedef struct m_errorMenu_s {
- menuFrameWork_t menu;
- menuStatic_t text;
+ menuFrameWork_t menu;
+ menuStatic_t text;
} m_errorMenu_t;
-static m_errorMenu_t m_error;
+static m_errorMenu_t m_error;
static menuSound_t ErrorKeydown( menuFrameWork_t *self, int key ) {
- UI_PopMenu();
- return QMS_OUT;
+ UI_PopMenu();
+ return QMS_OUT;
}
void M_Menu_Error( comErrorType_t type, const char *text ) {
color_t color;
- if( !text ) {
+ if( !text ) {
return;
}
switch( type ) {
case ERR_SILENT:
- return;
+ return;
case ERR_DROP:
*( uint32_t * )color = *( uint32_t * )colorRed;
break;
default:
*( uint32_t * )color = *( uint32_t * )colorYellow;
break;
- }
+ }
- memset( &m_error, 0, sizeof( m_error ) );
+ memset( &m_error, 0, sizeof( m_error ) );
- m_error.menu.keydown = ErrorKeydown;
+ m_error.menu.keydown = ErrorKeydown;
m_error.menu.image = uis.backgroundHandle;
*( uint32_t * )m_error.menu.color = *( uint32_t * )colorBlack;
- m_error.text.generic.type = MTYPE_STATIC;
- m_error.text.generic.flags = QMF_CUSTOM_COLOR;
- m_error.text.generic.name = ( char * )text;
- m_error.text.generic.uiFlags = UI_CENTER|UI_MULTILINE;
- *( uint32_t * )m_error.text.generic.color = *( uint32_t * )color;
-
- Menu_AddItem( &m_error.menu, ( void * )&m_error.text );
+ m_error.text.generic.type = MTYPE_STATIC;
+ m_error.text.generic.flags = QMF_CUSTOM_COLOR;
+ m_error.text.generic.name = ( char * )text;
+ m_error.text.generic.uiFlags = UI_CENTER|UI_MULTILINE;
+ *( uint32_t * )m_error.text.generic.color = *( uint32_t * )color;
+
+ Menu_AddItem( &m_error.menu, ( void * )&m_error.text );
- UI_PushMenu( &m_error.menu );
+ UI_PushMenu( &m_error.menu );
}