#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. | |
static void | MSO_UpdateVisibleButtons (void) |
Executes confuncs to update visible message options lines. | |
static void | MSOCB_Init (void) |
initializes message options menu by showing as much button lines as needed. | |
static void | MSO_Init_f (void) |
initializes message options menu by showing as much button lines as needed. | |
static void | MSO_Toggle_f (void) |
Function for menu buttons to update message settings. | |
static void | MSO_Scroll_f (void) |
Function to update message options menu after scrolling. Updates all visible button lines based on configuration. | |
static void | MSO_BackupSettings_f (void) |
Saves actual settings into backup settings variable. | |
static void | MSO_RestoreSettings_f (void) |
Restores actual settings from backup settings variable. | |
void | MSO_SetMenuState (const msoMenuState_t newState, const qboolean callInit, const qboolean 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] |
Definition in file cp_messageoptions_callbacks.c.
static void MSO_BackupSettings_f | ( | void | ) | [static] |
Saves actual settings into backup settings variable.
Definition at line 217 of file cp_messageoptions_callbacks.c.
References messageSettings.
Referenced by MSO_InitCallbacks().
static void MSO_Init_f | ( | void | ) | [static] |
initializes message options menu by showing as much button lines as needed.
Definition at line 137 of file cp_messageoptions_callbacks.c.
References Cmd_Argc(), Cmd_Argv(), messageList_size, and MSOCB_Init().
Referenced by MSO_InitCallbacks().
void MSO_InitCallbacks | ( | void | ) |
Definition at line 245 of file cp_messageoptions_callbacks.c.
References Cmd_AddCommand(), MSO_BackupSettings_f(), MSO_Init_f(), MSO_RestoreSettings_f(), MSO_Scroll_f(), and MSO_Toggle_f().
Referenced by MSO_Init().
static void MSO_InitList | ( | void | ) | [static] |
Initializes menu texts for scrollable area.
Definition at line 43 of file cp_messageoptions_callbacks.c.
References ccs, uiNode_s::firstChild, msgCategoryEntry_s::isCategory, ccs_s::msgCategoryEntries, MSO_MSTATE_PREPARED, MSO_SetMenuState(), msgCategoryEntry_s::notifyType, ccs_s::numMsgCategoryEntries, qfalse, qtrue, Sys_Error(), TEXT_MESSAGEOPTIONS, UI_AddOption(), UI_GetOption(), UI_RegisterOption(), UI_ResetData(), and va().
Referenced by MSOCB_Init().
static void MSO_RestoreSettings_f | ( | void | ) | [static] |
Restores actual settings from backup settings variable.
Definition at line 227 of file cp_messageoptions_callbacks.c.
References messageSettings, MSO_MSTATE_REINIT, MSO_SetMenuState(), qfalse, and qtrue.
Referenced by MSO_InitCallbacks().
static void MSO_Scroll_f | ( | void | ) | [static] |
Function to update message options menu after scrolling. Updates all visible button lines based on configuration.
Definition at line 203 of file cp_messageoptions_callbacks.c.
References Cmd_Argc(), Cmd_Argv(), messageList_scroll, and MSO_UpdateVisibleButtons().
Referenced by MSO_InitCallbacks().
void MSO_SetMenuState | ( | const msoMenuState_t | newState, | |
const qboolean | callInit, | |||
const qboolean | preserveIndex | |||
) |
Definition at line 233 of file cp_messageoptions_callbacks.c.
References messageList_scroll, MSO_MSTATE_REINIT, MSOCB_Init(), msoMenuState, and visibleMSOEntries.
Referenced by MSO_InitList(), MSO_LoadXML(), MSO_ParseCategories(), MSO_ParseSettings(), MSO_RestoreSettings_f(), MSO_Set(), and MSO_SetAll_f().
void MSO_ShutdownCallbacks | ( | void | ) |
Definition at line 256 of file cp_messageoptions_callbacks.c.
References Cmd_RemoveCommand(), TEXT_MESSAGEOPTIONS, and UI_ResetData().
Referenced by MSO_Shutdown().
static void MSO_Toggle_f | ( | void | ) | [static] |
Function for menu buttons to update message settings.
Definition at line 150 of file cp_messageoptions_callbacks.c.
References ccs, Cmd_Argc(), Cmd_Argv(), Com_Printf(), 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, qtrue, msgCategoryEntry_s::settings, TEXT_MESSAGEOPTIONS, type, UI_GetOption(), and UI_InitOptionIteratorAtIndex().
Referenced by MSO_InitCallbacks().
static void MSO_UpdateVisibleButtons | ( | void | ) | [static] |
Executes confuncs to update visible message options lines.
Definition at line 74 of file cp_messageoptions_callbacks.c.
References msgCategoryEntry_s::category, ccs, 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, UI_ExecuteConfunc(), UI_GetOption(), UI_InitOptionIteratorAtIndex(), and UI_OptionIteratorNextOption().
Referenced by MSO_Scroll_f(), and MSOCB_Init().
static void MSOCB_Init | ( | void | ) | [static] |
initializes message options menu by showing as much button lines as needed.
Definition at line 120 of file cp_messageoptions_callbacks.c.
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 37 of file cp_messageoptions_callbacks.c.
int messageList_scroll = 0 [static] |
actual messageSettings list begin index due to scrolling
Definition at line 35 of file cp_messageoptions_callbacks.c.
Referenced by MSO_Scroll_f(), MSO_SetMenuState(), MSO_Toggle_f(), and MSO_UpdateVisibleButtons().
int messageList_size = 0 [static] |
actual messageSettings list size
Definition at line 34 of file cp_messageoptions_callbacks.c.
Referenced by MSO_Init_f(), and MSO_UpdateVisibleButtons().
msoMenuState_t msoMenuState = MSO_MSTATE_REINIT [static] |
Definition at line 33 of file cp_messageoptions_callbacks.c.
Referenced by MSO_SetMenuState(), and MSOCB_Init().
int visibleMSOEntries = 0 [static] |
actual visible entry count
Definition at line 36 of file cp_messageoptions_callbacks.c.
Referenced by MSO_SetMenuState().