UFO: Alien Invasion
|
#include "../../cl_shared.h"
#include "../../ui/ui_main.h"
#include "../../ui/ui_data.h"
#include "cp_campaign.h"
#include "cp_messageoptions.h"
#include "cp_messageoptions_callbacks.h"
Go to the source code of this file.
Functions | |
static void | MSO_InitList (void) |
Initializes menu texts for scrollable area. More... | |
static void | MSO_UpdateVisibleButtons (void) |
Executes confuncs to update visible message options lines. More... | |
static void | MSOCB_Init (void) |
initializes message options menu by showing as much button lines as needed. More... | |
static void | MSO_Init_f (void) |
initializes message options menu by showing as much button lines as needed. More... | |
static void | MSO_Toggle_f (void) |
Function for menu buttons to update message settings. More... | |
static void | MSO_Scroll_f (void) |
Function to update message options menu after scrolling. Updates all visible button lines based on configuration. More... | |
static void | MSO_BackupSettings_f (void) |
Saves actual settings into backup settings variable. More... | |
static void | MSO_RestoreSettings_f (void) |
Restores actual settings from backup settings variable. More... | |
void | MSO_SetMenuState (const msoMenuState_t newState, const bool callInit, const bool preserveIndex) |
void | MSO_InitCallbacks (void) |
void | MSO_ShutdownCallbacks (void) |
Variables | |
static msoMenuState_t | msoMenuState = MSO_MSTATE_REINIT |
static int | messageList_size = 0 |
static int | messageList_scroll = 0 |
static int | visibleMSOEntries = 0 |
messageSettings_t | backupMessageSettings [NT_NUM_NOTIFYTYPE] |
static const cmdList_t | msgOptionsCallbacks [] |
Definition in file cp_messageoptions_callbacks.cpp.
Saves actual settings into backup settings variable.
Definition at line 220 of file cp_messageoptions_callbacks.cpp.
References messageSettings.
initializes message options menu by showing as much button lines as needed.
Definition at line 139 of file cp_messageoptions_callbacks.cpp.
References cgi, cgame_import_s::Cmd_Argv(), messageList_size, and MSOCB_Init().
Definition at line 255 of file cp_messageoptions_callbacks.cpp.
Referenced by MSO_Init().
Initializes menu texts for scrollable area.
Definition at line 44 of file cp_messageoptions_callbacks.cpp.
References ccs, cgi, uiNode_t::firstChild, msgCategoryEntry_s::isCategory, ccs_s::msgCategoryEntries, MSO_MSTATE_PREPARED, MSO_SetMenuState(), msgCategoryEntry_s::notifyType, ccs_s::numMsgCategoryEntries, Sys_Error(), TEXT_MESSAGEOPTIONS, cgame_import_s::UI_AddOption(), cgame_import_s::UI_GetOption(), and va().
Referenced by MSOCB_Init().
Restores actual settings from backup settings variable.
Definition at line 230 of file cp_messageoptions_callbacks.cpp.
References messageSettings, MSO_MSTATE_REINIT, and MSO_SetMenuState().
Function to update message options menu after scrolling. Updates all visible button lines based on configuration.
Definition at line 206 of file cp_messageoptions_callbacks.cpp.
References cgi, cgame_import_s::Cmd_Argv(), messageList_scroll, and MSO_UpdateVisibleButtons().
void MSO_SetMenuState | ( | const msoMenuState_t | newState, |
const bool | callInit, | ||
const bool | preserveIndex | ||
) |
Definition at line 236 of file cp_messageoptions_callbacks.cpp.
References messageList_scroll, MSO_MSTATE_REINIT, MSOCB_Init(), msoMenuState, and visibleMSOEntries.
Referenced by MSO_InitList(), MSO_LoadXML(), MSO_ParseCategory(), MSO_ParseOption(), MSO_RestoreSettings_f(), MSO_Set(), and MSO_SetAll_f().
Definition at line 262 of file cp_messageoptions_callbacks.cpp.
References cgi, and TEXT_MESSAGEOPTIONS.
Referenced by MSO_Shutdown().
Function for menu buttons to update message settings.
Definition at line 153 of file cp_messageoptions_callbacks.cpp.
References ccs, cgi, cgame_import_s::Cmd_Argv(), messageSettings_s::doNotify, messageSettings_s::doPause, messageSettings_s::doSound, msgCategoryEntry_s::isCategory, messageList_scroll, ccs_s::msgCategoryEntries, MSO_NOTIFY, MSO_PAUSE, MSO_Set(), MSO_SOUND, msgCategoryEntry_s::notifyType, NT_NUM_NOTIFYTYPE, nt_strings, uiOptionIterator_t::option, OPTIONEXTRADATA, Q_streq, msgCategoryEntry_s::settings, TEXT_MESSAGEOPTIONS, type, cgame_import_s::UI_GetOption(), and cgame_import_s::UI_InitOptionIteratorAtIndex().
Executes confuncs to update visible message options lines.
Definition at line 76 of file cp_messageoptions_callbacks.cpp.
References msgCategoryEntry_s::category, ccs, cgi, messageSettings_s::doNotify, messageSettings_s::doPause, messageSettings_s::doSound, msgCategoryEntry_s::isCategory, messageList_scroll, messageList_size, ccs_s::msgCategoryEntries, uiOptionIterator_t::option, OPTIONEXTRADATACONST, msgCategoryEntry_s::settings, TEXT_MESSAGEOPTIONS, cgame_import_s::UI_GetOption(), cgame_import_s::UI_InitOptionIteratorAtIndex(), and cgame_import_s::UI_OptionIteratorNextOption().
Referenced by MSO_Scroll_f(), and MSOCB_Init().
initializes message options menu by showing as much button lines as needed.
Definition at line 122 of file cp_messageoptions_callbacks.cpp.
References MSO_InitList(), MSO_MSTATE_INITIALIZED, MSO_MSTATE_PREPARED, MSO_UpdateVisibleButtons(), and msoMenuState.
Referenced by MSO_Init_f(), and MSO_SetMenuState().
messageSettings_t backupMessageSettings[NT_NUM_NOTIFYTYPE] |
array holding backup message settings (used for restore function in options popup)
Definition at line 38 of file cp_messageoptions_callbacks.cpp.
|
static |
actual messageSettings list begin index due to scrolling
Definition at line 36 of file cp_messageoptions_callbacks.cpp.
Referenced by MSO_Scroll_f(), MSO_SetMenuState(), MSO_Toggle_f(), and MSO_UpdateVisibleButtons().
|
static |
actual messageSettings list size
Definition at line 35 of file cp_messageoptions_callbacks.cpp.
Referenced by MSO_Init_f(), and MSO_UpdateVisibleButtons().
|
static |
Definition at line 247 of file cp_messageoptions_callbacks.cpp.
|
static |
Definition at line 34 of file cp_messageoptions_callbacks.cpp.
Referenced by MSO_SetMenuState(), and MSOCB_Init().
|
static |
actual visible entry count
Definition at line 37 of file cp_messageoptions_callbacks.cpp.
Referenced by MSO_SetMenuState().