1 //============================================================================= 2 // 3 // Adventure Game Studio (AGS) 4 // 5 // Copyright (C) 1999-2011 Chris Jones and 2011-20xx others 6 // The full list of copyright holders can be found in the Copyright.txt 7 // file, which is part of this source code distribution. 8 // 9 // The AGS source code is provided under the Artistic License 2.0. 10 // A copy of this license can be found in the file License.txt and at 11 // http://www.opensource.org/licenses/artistic-license-2.0.php 12 // 13 //============================================================================= 14 15 #ifndef __AC_GUIDEFINES_H 16 #define __AC_GUIDEFINES_H 17 18 #define MAX_LISTBOX_ITEMS 200 19 #define MAX_GUILABEL_TEXT_LEN 2048 20 #define GUIMAGIC 0xcafebeef 21 // GUI Control flags (32-bit) 22 #define GUIF_DEFAULT 0x0001 23 #define GUIF_CANCEL 0x0002 // obsolete? 24 #define GUIF_DISABLED 0x0004 25 #define GUIF_TABSTOP 0x0008 // obsolete? 26 #define GUIF_INVISIBLE 0x0010 27 #define GUIF_CLIP 0x0020 28 #define GUIF_NOCLICKS 0x0040 29 #define GUIF_TRANSLATED 0x0080 // 3.3.0.1132 30 #define GUIF_DELETED 0x8000 31 #define MAX_GUIOBJ_EVENTS 10 32 #define TEXTWINDOW_PADDING_DEFAULT 3 33 // ListBox flags 34 #define GLF_NOBORDER 1 35 #define GLF_NOARROWS 2 36 #define GLF_SGINDEXVALID 4 37 // TextBox flags 38 #define GTF_NOBORDER 1 39 //#define MAX_OBJ_EACH_TYPE 251 40 41 #define MAXLINE 50 42 43 // TODO: find out more about gui version history 44 //============================================================================= 45 // GUI Version history 46 //----------------------------------------------------------------------------- 47 // 48 // 2.1.4..... (100): Introduced Slider gui control. Gui count is now serialized 49 // in game file. 50 // 2.2.2..... (101): Introduced TextBox gui control. 51 // 2.3.0..... (102): Introduced ListBox gui control. 52 // 2.6.0..... (105): GUI custom Z-order support. 53 // 2.7.0..... (110): Added GUI OnClick handler. 54 // 2.7.2.???? (111): Added text alignment property to buttons. 55 // 2.7.2.???? (112): Added text alignment property to list boxes. 56 // 2.7.2.???? (113): Increased permitted length of GUI label text from 200 to 57 // 2048 characters. 58 // 2.7.2.???? (114): Obsoleted savegameindex[] array, and added 59 // ListBox.SaveGameSlots[] array instead. 60 // 2.7.2.???? (115): Added GUI Control z-order support. 61 // 62 // 3.3.0.1132 (116): Added GUIF_TRANSLATED flag. 63 // 3.3.1.???? (117): Added padding variable for text window GUIs. 64 // 3.4.0 (118): Removed GUI limits 65 // 66 //============================================================================= 67 68 enum GuiVersion 69 { 70 // TODO: find out all corresponding engine version numbers 71 kGuiVersion_Initial = 0, 72 kGuiVersion_214 = 100, 73 kGuiVersion_222 = 101, 74 kGuiVersion_230 = 102, 75 kGuiVersion_unkn_103 = 103, 76 kGuiVersion_unkn_104 = 104, 77 kGuiVersion_260 = 105, 78 kGuiVersion_unkn_106 = 106, 79 kGuiVersion_unkn_107 = 107, 80 kGuiVersion_unkn_108 = 108, 81 kGuiVersion_unkn_109 = 109, 82 kGuiVersion_270 = 110, 83 kGuiVersion_272a = 111, 84 kGuiVersion_272b = 112, 85 kGuiVersion_272c = 113, 86 kGuiVersion_272d = 114, 87 kGuiVersion_272e = 115, 88 89 kGuiVersion_330 = 116, 90 kGuiVersion_331 = 117, 91 kGuiVersion_340 = 118, 92 kGuiVersion_Current = kGuiVersion_340, 93 // Defines the oldest version of gui data that is complying to current 94 // savedgame format; if the loaded game data is of this version or lower, 95 // then this value will be written to savedgame instead of current version. 96 kGuiVersion_ForwardCompatible = kGuiVersion_272e 97 }; 98 99 namespace AGS 100 { 101 namespace Common 102 { 103 104 enum GUIMainFlags 105 { 106 kGUIMain_NoClick = 0x01, 107 kGUIMain_TextWindow = 0x02 108 }; 109 110 enum GUIMainLegacyFlags 111 { 112 kGUIMain_LegacyTextWindow = 5 113 }; 114 115 enum GUIPopupStyle 116 { 117 // normal GUI, initally on 118 kGUIPopupNone = 0, 119 // show when mouse moves to top of screen 120 kGUIPopupMouseY = 1, 121 // pauses game when shown 122 kGUIPopupModal = 2, 123 // initially on and not removed when interface is off 124 kGUIPopupNoAutoRemove = 3, 125 // normal GUI, initially off 126 kGUIPopupNoneInitiallyOff = 4 127 }; 128 129 enum GUIControlType 130 { 131 kGUIControlUndefined = -1, 132 kGUIButton = 1, 133 kGUILabel = 2, 134 kGUIInvWindow = 3, 135 kGUISlider = 4, 136 kGUITextBox = 5, 137 kGUIListBox = 6 138 }; 139 140 } // namespace Common 141 } // namespace AGS 142 143 extern int guis_need_update; 144 145 #endif // __AC_GUIDEFINES_H 146