cp_messageoptions.h
Go to the documentation of this file.00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef CLIENT_CL_MESSAGEOPTIONS_H
00027 #define CLIENT_CL_MESSAGEOPTIONS_H
00028
00029 #include "cp_messages.h"
00030
00032 typedef enum nt_s {
00033 NT_INSTALLATION_INSTALLED,
00034 NT_INSTALLATION_REMOVED,
00035 NT_INSTALLATION_REPLACE,
00036 NT_AIRCRAFT_REFUELED,
00037 NT_AIRCRAFT_CANNOTREFUEL,
00038 NT_INSTALLATION_BUILDSTART,
00039 NT_INSTALLATION_BUILDFINISH,
00040 NT_INSTALLATION_DESTROY,
00041 NT_RESEARCH_PROPOSED,
00042 NT_RESEARCH_HALTED,
00043 NT_RESEARCH_COMPLETED,
00044 NT_PRODUCTION_STARTED,
00045 NT_PRODUCTION_FINISHED,
00046 NT_PRODUCTION_FAILED,
00047 NT_PRODUCTION_QUEUE_EMPTY,
00048 NT_HAPPINESS_CHANGED,
00049 NT_HAPPINESS_MIN,
00050 NT_HAPPINESS_PLEASED,
00051 NT_TRANSFER_STARTED,
00052 NT_TRANSFER_COMPLETED_SUCCESS,
00053 NT_TRANSFER_LOST,
00054 NT_TRANSFER_ALIENBODIES_DEFERED,
00055 NT_TRANSFER_UFORECOVERY_FINISHED,
00056 NT_UFO_SPOTTED,
00057 NT_UFO_SIGNAL_LOST,
00058 NT_UFO_ATTACKING,
00059
00060 NT_NUM_NOTIFYTYPE
00061 } notify_t;
00062
00064 typedef enum ntmask_s {
00065 NTMASK_NOTIFY = 1 << 0,
00066 NTMASK_PAUSE = 1 << 1,
00067 NTMASK_SOUND = 1 << 2
00068 } notifyMask_t;
00069
00071 typedef enum msgcategorymask_s {
00072 MSGCATMASK_FOLDED = 1 << 0
00073 } msgCategoryMask_t;
00074
00076 #define MSO_PAUSE (NTMASK_PAUSE | NTMASK_NOTIFY)
00077
00078 #define MSO_NOTIFY (NTMASK_NOTIFY)
00079
00080 #define MSO_SOUND (NTMASK_SOUND | NTMASK_NOTIFY)
00081
00085 typedef struct messageSettings_s {
00086 qboolean doPause;
00087 qboolean doNotify;
00088 qboolean doSound;
00089 } messageSettings_t;
00090
00091 #define MAX_MESSAGECATEGORIES 16
00092 typedef struct msgCategoryEntry_s {
00093 const char *notifyType;
00094 struct msgCategory_s *category;
00095 struct msgCategoryEntry_s *next;
00096 struct msgCategoryEntry_s *previous;
00097 messageSettings_t *settings;
00098 qboolean isCategory;
00099 } msgCategoryEntry_t;
00100
00101 typedef struct msgCategory_s {
00102 int idx;
00103 const char *id;
00104 msgCategoryEntry_t *first;
00105 msgCategoryEntry_t *last;
00106 } msgCategory_t;
00107
00108 extern messageSettings_t messageSettings[NT_NUM_NOTIFYTYPE];
00109 extern const char* nt_strings[NT_NUM_NOTIFYTYPE];
00110
00111 message_t *MSO_CheckAddNewMessage(const notify_t messagecategory, const char *title, const char *text, qboolean popup, messageType_t type, void *pedia);
00112 void MSO_ParseSettings(const char *name, const char **text);
00113 void MSO_ParseCategories(const char *name, const char **text);
00114 void MSO_Set(const int listIndex, const notify_t type, const int optionType, const qboolean activate, const qboolean sendCommands);
00115 void MSO_Init(void);
00116 void MSO_Shutdown(void);
00117
00118 #endif