|
UFO: Alien Invasion
|
Header file for messageoptions related stuff. More...
#include "cp_messages.h"

Go to the source code of this file.
Data Structures | |
| structure holding pause and notify settings for a notify type. More... | |
| struct | msgCategoryEntry_t |
| struct | msgCategory_t |
Macros | |
| #define | MSO_PAUSE (NTMASK_PAUSE | NTMASK_NOTIFY) |
| notification type: pause game | |
| #define | MSO_NOTIFY (NTMASK_NOTIFY) |
| notification type: add notification message | |
| #define | MSO_SOUND (NTMASK_SOUND | NTMASK_NOTIFY) |
| notification type: play notification sound | |
| #define | MAX_MESSAGECATEGORIES 16 |
Functions | |
| uiMessageListNodeMessage_t * | MSO_CheckAddNewMessage (const notify_t messagecategory, const char *title, const char *text, messageType_t type=MSG_STANDARD, technology_t *pedia=nullptr, bool popup=false) |
| Adds a new message to message stack. It uses message settings to verify whether sound should be played and whether game should stop. | |
| void | MSO_ParseMessageSettings (const char *name, const char **text) |
| parses message options settings from file. | |
| void | MSO_Set (const int listIndex, const notify_t type, const int optionType, const bool activate, const bool sendCommands) |
| Function updates pause or notification settings. | |
| void | MSO_Init (void) |
| void | MSO_Shutdown (void) |
Variables | |
| messageSettings_t | messageSettings [NT_NUM_NOTIFYTYPE] |
| char const *const | nt_strings [NT_NUM_NOTIFYTYPE] |
| valid notification types that may cause pause / notice | |
Header file for messageoptions related stuff.
Definition in file cp_messageoptions.h.
| #define MAX_MESSAGECATEGORIES 16 |
Definition at line 92 of file cp_messageoptions.h.
Referenced by MSO_ParseCategory().
| #define MSO_NOTIFY (NTMASK_NOTIFY) |
notification type: add notification message
Definition at line 79 of file cp_messageoptions.h.
Referenced by MSO_LoadXML(), MSO_ParseOptionType(), MSO_Set(), and MSO_Toggle_f().
| #define MSO_PAUSE (NTMASK_PAUSE | NTMASK_NOTIFY) |
notification type: pause game
Definition at line 77 of file cp_messageoptions.h.
Referenced by MSO_LoadXML(), MSO_ParseOptionType(), and MSO_Toggle_f().
| #define MSO_SOUND (NTMASK_SOUND | NTMASK_NOTIFY) |
notification type: play notification sound
Definition at line 81 of file cp_messageoptions.h.
Referenced by MSO_LoadXML(), MSO_ParseOptionType(), and MSO_Toggle_f().
| enum msgCategoryMask_t |
bitmask values for storing msgcategory state
| Enumerator | |
|---|---|
| MSGCATMASK_FOLDED | |
Definition at line 72 of file cp_messageoptions.h.
| enum notify_t |
Notify types.
Definition at line 30 of file cp_messageoptions.h.
| enum notifyMask_t |
bitmask values for storing msgoptions
| Enumerator | |
|---|---|
| NTMASK_NOTIFY | |
| NTMASK_PAUSE | |
| NTMASK_SOUND | |
Definition at line 65 of file cp_messageoptions.h.
| uiMessageListNodeMessage_t * MSO_CheckAddNewMessage | ( | const notify_t | messagecategory, |
| const char * | title, | ||
| const char * | text, | ||
| messageType_t | type, | ||
| technology_t * | pedia, | ||
| bool | popup ) |
Adds a new message to message stack. It uses message settings to verify whether sound should be played and whether game should stop.
| messagecategory | category for notification | |
| [in] | title | Already translated message/mail title |
| [in] | text | Already translated message/mail body |
| [in] | popup | Show this as a popup, too? |
| [in] | type | The message type |
| [in] | pedia | Pointer to technology (only if needed) |
Definition at line 208 of file cp_messageoptions.cpp.
References CP_GameTimeStop(), messageSettings_t::doNotify, messageSettings_t::doPause, messageSettings_t::doSound, messageSettings, MS_AddNewMessage(), and type.
Referenced by AII_UpdateOneInstallationDelay(), AIR_Move(), AIR_Refuel(), AIRFIGHT_ExecuteActions(), B_UpdateBuildingConstructions(), CP_BaseAttackStartMission(), INS_BuildInstallation_f(), INS_DestroyInstallation(), INS_UpdateInstallationData(), NAT_SetHappiness(), PR_CheckFrame(), PR_FinishDisassembly(), PR_FinishProduction(), PR_ProductionIncrease_f(), PR_QueueNext(), RS_CheckRequirements(), RS_MarkCollected(), RS_MarkOneResearchable(), RS_ResearchFinish(), RS_ResearchRun(), TR_EmptyTransferCargo(), TR_TransferEnd(), TR_TransferStart_f(), UFO_CampaignCheckEvents(), UFO_SearchAircraftTarget(), UR_ProcessActive(), and US_TransferUFO().
Definition at line 484 of file cp_messageoptions.cpp.
References cgi, msgOptionsCmds, and MSO_InitCallbacks().
Referenced by MS_MessageInit().
| void MSO_ParseMessageSettings | ( | const char * | name, |
| const char ** | text ) |
parses message options settings from file.
Definition at line 444 of file cp_messageoptions.cpp.
References cgi, Com_Parse(), ERR_DROP, messageSettings, MSO_ParseCategory(), name, OBJZERO, and Q_streq.
Referenced by CP_ParseScriptFirst().
| void MSO_Set | ( | const int | listIndex, |
| const notify_t | type, | ||
| const int | optionType, | ||
| const bool | activate, | ||
| const bool | sendCommands ) |
Function updates pause or notification settings.
| listIndex | listIndex in menu to update via confunc |
| type | notification type to update |
| optionType | option type that should be updated |
| activate | flag indicating whether setting should be activated (true) or deactivated |
| sendCommands | flag indicating whether confunc command to update menu button should be sent |
Definition at line 80 of file cp_messageoptions.cpp.
References cgi, messageSettings_t::doNotify, messageSettings_t::doPause, messageSettings_t::doSound, messageSettings, MSO_MSTATE_PREPARED, MSO_NOTIFY, MSO_SetMenuState(), NTMASK_PAUSE, NTMASK_SOUND, and type.
Referenced by MSO_LoadXML(), MSO_ParseOption(), MSO_Set_f(), MSO_SetAll_f(), and MSO_Toggle_f().
Definition at line 490 of file cp_messageoptions.cpp.
References cgi, msgOptionsCmds, and MSO_ShutdownCallbacks().
Referenced by CP_RemoveCampaignCallbackCommands().
|
extern |
array holding actual message settings for every notify type
Definition at line 67 of file cp_messageoptions.cpp.
Referenced by MSO_BackupSettings_f(), MSO_CheckAddNewMessage(), MSO_ParseCategory(), MSO_ParseMessageSettings(), MSO_RestoreSettings_f(), MSO_SaveXML(), and MSO_Set().
|
extern |
valid notification types that may cause pause / notice
Definition at line 34 of file cp_messageoptions.cpp.
Referenced by CASSERT(), MSO_LoadXML(), MSO_ParseCategory(), MSO_ParseNotifyType(), MSO_SaveXML(), MSO_Set_f(), and MSO_Toggle_f().