GUIScript: Make LoadSymbol return an object.
[gemrb.git] / gemrb / GUIScripts / GUIDefines.py
blobd3fdd354160c03e624c0b023271071f9de8cc052
1 # -*-python-*-
2 # GemRB - Infinity Engine Emulator
3 # Copyright (C) 2003 The GemRB Project
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 # GUIDefines.py - common definitions of GUI-related constants for GUIScripts
23 #button flags
24 IE_GUI_BUTTON_NORMAL = 0x00000004 #default button, doesn't stick
25 IE_GUI_BUTTON_NO_IMAGE = 0x00000001
26 IE_GUI_BUTTON_PICTURE = 0x00000002
27 IE_GUI_BUTTON_SOUND = 0x00000004
28 IE_GUI_BUTTON_ALT_SOUND = 0x00000008
29 IE_GUI_BUTTON_CHECKBOX = 0x00000010 #or radio button
30 IE_GUI_BUTTON_RADIOBUTTON= 0x00000020 #sticks in a state
31 IE_GUI_BUTTON_DEFAULT = 0x00000040 #enter key triggers it
32 IE_GUI_BUTTON_ANIMATED = 0x00000080 # the button is animated
34 #these bits are hardcoded in the .chu structure, don't move them
35 IE_GUI_BUTTON_ALIGN_LEFT = 0x00000100
36 IE_GUI_BUTTON_ALIGN_RIGHT= 0x00000200
37 IE_GUI_BUTTON_ALIGN_TOP = 0x00000400
38 IE_GUI_BUTTON_ALIGN_BOTTOM = 0x00000800
39 IE_GUI_BUTTON_ALIGN_ANCHOR = 0x00001000
40 IE_GUI_BUTTON_LOWERCASE = 0x00002000
42 #end of hardcoded section
43 IE_GUI_BUTTON_DRAGGABLE = 0x00004000
44 IE_GUI_BUTTON_MULTILINE = 0x00008000 # don't set the SINGLE_LINE font rendering flag
45 IE_GUI_BUTTON_NO_TEXT = 0x00010000 # don't draw button label
46 IE_GUI_BUTTON_PLAYRANDOM = 0x00020000 # the button animation is random
47 IE_GUI_BUTTON_PLAYONCE = 0x00040000 # the button animation won't restart
49 IE_GUI_BUTTON_CENTER_PICTURES = 0x00080000 # center the button's PictureList
50 IE_GUI_BUTTON_BG1_PAPERDOLL = 0x00100000 # BG1-style paperdoll
51 IE_GUI_BUTTON_HORIZONTAL = 0x00200000 # horizontal clipping of overlay
52 IE_GUI_BUTTON_CANCEL = 0x00400000 # escape key triggers it
53 IE_GUI_BUTTON_CAPS = 0x00800000 # capitalize all the text (default for bg2)
55 #scrollbar flags
56 IE_GUI_SCROLLBAR_DEFAULT = 0x00000040 # mousewheel triggers it (same value as default button)
58 #textarea flags
59 IE_GUI_TEXTAREA_SELECTABLE = 0x05000001
60 IE_GUI_TEXTAREA_AUTOSCROLL = 0x05000002
61 IE_GUI_TEXTAREA_SMOOTHSCROLL = 0x05000004
62 IE_GUI_TEXTAREA_HISTORY = 0x05000008
63 IE_GUI_TEXTAREA_SPEAKER = 0x05000010
64 IE_GUI_TEXTAREA_EDITABLE = 0x05000040
66 #events
67 IE_GUI_BUTTON_ON_PRESS = 0x00000000
68 IE_GUI_MOUSE_OVER_BUTTON = 0x00000001
69 IE_GUI_MOUSE_ENTER_BUTTON = 0x00000002
70 IE_GUI_MOUSE_LEAVE_BUTTON = 0x00000003
71 IE_GUI_BUTTON_ON_SHIFT_PRESS= 0x00000004
72 IE_GUI_BUTTON_ON_RIGHT_PRESS= 0x00000005
73 IE_GUI_BUTTON_ON_DRAG_DROP = 0x00000006
74 IE_GUI_BUTTON_ON_DRAG_DROP_PORTRAIT = 0x00000007
75 IE_GUI_BUTTON_ON_DRAG = 0x00000008
76 IE_GUI_BUTTON_ON_DOUBLE_PRESS = 0x00000009
77 IE_GUI_PROGRESS_END_REACHED = 0x01000000
78 IE_GUI_SLIDER_ON_CHANGE = 0x02000000
79 IE_GUI_EDIT_ON_CHANGE = 0x03000000
80 IE_GUI_EDIT_ON_DONE = 0x03000001
81 IE_GUI_EDIT_ON_CANCEL = 0x03000002
82 IE_GUI_TEXTAREA_ON_CHANGE = 0x05000000
83 IE_GUI_TEXTAREA_OUT_OF_TEXT = 0x05000001
84 IE_GUI_LABEL_ON_PRESS = 0x06000000
85 IE_GUI_SCROLLBAR_ON_CHANGE = 0x07000000
86 IE_GUI_WORLDMAP_ON_PRESS = 0x08000000
87 IE_GUI_MOUSE_ENTER_WORLDMAP = 0x08000002
88 IE_GUI_MAP_ON_PRESS = 0x09000000
89 IE_GUI_MAP_ON_RIGHT_PRESS = 0x09000005
90 IE_GUI_MAP_ON_DOUBLE_PRESS = 0x09000008
92 #common states
93 IE_GUI_CONTROL_FOCUSED = 0x7f000080
95 #button states
96 IE_GUI_BUTTON_ENABLED = 0x00000000
97 IE_GUI_BUTTON_UNPRESSED = 0x00000000
98 IE_GUI_BUTTON_PRESSED = 0x00000001
99 IE_GUI_BUTTON_SELECTED = 0x00000002
100 IE_GUI_BUTTON_DISABLED = 0x00000003
101 # Like DISABLED, but processes MouseOver events and draws UNPRESSED bitmap
102 IE_GUI_BUTTON_LOCKED = 0x00000004
103 # Draws DISABLED bitmap, but it isn't disabled
104 IE_GUI_BUTTON_THIRD = 0x00000005
105 # Draws PRESSED bitmap, but it isn't shifted
106 IE_GUI_BUTTON_SECOND = 0x00000006
108 #edit field states
109 IE_GUI_EDIT_NUMBER = 0x030000001
111 #mapcontrol states (add 0x090000000 if used with SetControlStatus)
112 IE_GUI_MAP_NO_NOTES = 0
113 IE_GUI_MAP_VIEW_NOTES = 1
114 IE_GUI_MAP_SET_NOTE = 2
115 IE_GUI_MAP_REVEAL_MAP = 3
117 # !!! Keep these synchronized with WorldMapControl.h !!!
118 # WorldMap label colors
119 IE_GUI_WMAP_COLOR_NORMAL = 0
120 IE_GUI_WMAP_COLOR_SELECTED = 1
121 IE_GUI_WMAP_COLOR_NOTVISITED = 2
123 # !!! Keep these synchronized with Font.h !!!
124 IE_FONT_ALIGN_LEFT = 0x00
125 IE_FONT_ALIGN_CENTER = 0x01
126 IE_FONT_ALIGN_RIGHT = 0x02
127 IE_FONT_ALIGN_BOTTOM = 0x04
128 IE_FONT_ALIGN_TOP = 0x10 # Single-Line and Multi-Line Text
129 IE_FONT_ALIGN_MIDDLE = 0x20 #Only for single line Text
130 IE_FONT_SINGLE_LINE = 0x40
132 OP_SET = 0
133 OP_AND = 1
134 OP_OR = 2
135 OP_XOR = 3
136 OP_NAND = 4
138 # Window position anchors/alignments
139 # !!! Keep these synchronized with Window.h !!!
140 WINDOW_TOPLEFT = 0x00
141 WINDOW_CENTER = 0x01
142 WINDOW_ABSCENTER = 0x02
143 WINDOW_RELATIVE = 0x04
144 WINDOW_SCALE = 0x08
145 WINDOW_BOUNDED = 0x10
147 # GameScreen flags
148 GS_PARTYAI = 1
149 GS_SMALLDIALOG = 0
150 GS_MEDIUMDIALOG = 2
151 GS_LARGEDIALOG = 6
152 GS_DIALOGMASK = 6
153 GS_DIALOG = 8
154 GS_HIDEGUI = 16
155 GS_OPTIONPANE = 32
156 GS_PORTRAITPANE = 64
157 GS_MAPNOTE = 128
159 # GameControl screen flags
160 # !!! Keep these synchronized with GameControl.h !!!
161 SF_DISABLEMOUSE = 1
162 SF_CENTERONACTOR = 2
163 SF_ALWAYSCENTER = 4
164 SF_GUIENABLED = 8
165 SF_LOCKSCROLL = 16
167 # GameControltarget modes
168 # !!! Keep these synchronized with GameControl.h !!!
169 TARGET_MODE_NONE = 0
170 TARGET_MODE_TALK = 1
171 TARGET_MODE_ATTACK = 2
172 TARGET_MODE_CAST = 3
173 TARGET_MODE_DEFEND = 4
174 TARGET_MODE_PICK = 5
176 GA_SELECT = 16
177 GA_NO_DEAD = 32
178 GA_POINT = 64
179 GA_NO_HIDDEN = 128
180 GA_NO_ALLY = 256
181 GA_NO_ENEMY = 512
182 GA_NO_NEUTRAL = 1024
183 GA_NO_SELF = 2048
185 # Shadow color for ShowModal()
186 # !!! Keep these synchronized with Interface.h !!!
187 MODAL_SHADOW_NONE = 0
188 MODAL_SHADOW_GRAY = 1
189 MODAL_SHADOW_BLACK = 2
191 # Flags for SetVisible()
192 # !!! Keep these synchronized with Interface.h !!!
193 #WINDOW_INVALID = -1
194 WINDOW_INVISIBLE = 0
195 WINDOW_VISIBLE = 1
196 WINDOW_GRAYED = 2
197 WINDOW_FRONT = 3
199 # Flags for GameSelectPC()
200 # !!! Keep these synchronized with Game.h !!!
201 SELECT_NORMAL = 0x00
202 SELECT_REPLACE = 0x01
203 SELECT_QUIET = 0x02
205 # Spell types
206 # !!! Keep these synchronized with Spellbook.h !!!
207 IE_SPELL_TYPE_PRIEST = 0
208 IE_SPELL_TYPE_WIZARD = 1
209 IE_SPELL_TYPE_INNATE = 2
211 # Item Flags bits
212 # !!! Keep these synchronized with Item.h !!!
213 IE_ITEM_CRITICAL = 0x00000001
214 IE_ITEM_TWO_HANDED = 0x00000002
215 IE_ITEM_MOVABLE = 0x00000004
216 IE_ITEM_DISPLAYABLE = 0x00000008
217 IE_ITEM_CURSED = 0x00000010
218 IE_ITEM_NOT_COPYABLE = 0x00000020
219 IE_ITEM_MAGICAL = 0x00000040
220 IE_ITEM_BOW = 0x00000080
221 IE_ITEM_SILVER = 0x00000100
222 IE_ITEM_COLD_IRON = 0x00000200
223 IE_ITEM_STOLEN = 0x00000400
224 IE_ITEM_CONVERSABLE = 0x00000800
225 IE_ITEM_PULSATING = 0x00001000
226 IE_ITEM_UNSELLABLE = (IE_ITEM_CRITICAL | IE_ITEM_STOLEN)
228 # CREItem (SlotItem) Flags bits
229 # !!! Keep these synchronized with Inventory.h !!!
230 IE_INV_ITEM_IDENTIFIED = 0x01
231 IE_INV_ITEM_UNSTEALABLE = 0x02
232 IE_INV_ITEM_STOLEN = 0x04
233 IE_INV_ITEM_UNDROPPABLE = 0x08
234 # GemRB extensions
235 IE_INV_ITEM_ACQUIRED = 0x10
236 IE_INV_ITEM_DESTRUCTIBLE = 0x20
237 IE_INV_ITEM_EQUIPPED = 0x40
238 IE_INV_ITEM_STACKED = 0x80
239 # these come from the original item bits
240 IE_INV_ITEM_CRITICAL = 0x100
241 IE_INV_ITEM_TWOHANDED = 0x200
242 IE_INV_ITEM_MOVABLE = 0x400
243 IE_INV_ITEM_UNKNOWN800 = 0x800
244 IE_INV_ITEM_CURSED = 0x1000
245 IE_INV_ITEM_UNKNOWN2000 = 0x2000
246 IE_INV_ITEM_MAGICAL = 0x4000
247 IE_INV_ITEM_BOW = 0x8000
248 IE_INV_ITEM_SILVER = 0x10000
249 IE_INV_ITEM_COLDIRON = 0x20000
250 IE_INV_ITEM_STOLEN2 = 0x40000
251 IE_INV_ITEM_CONVERSIBLE = 0x80000
252 IE_INV_ITEM_PULSATING = 0x100000
254 #repeat key flags
255 GEM_RK_DOUBLESPEED = 1
256 GEM_RK_DISABLE = 2
257 GEM_RK_QUADRUPLESPEED = 4
259 SHOP_BUY = 1
260 SHOP_SELL = 2
261 SHOP_ID = 4
262 SHOP_STEAL = 8
263 SHOP_SELECT = 0x40
265 #game constants
266 PARTY_SIZE = 6
268 # !!! Keep this synchronized with Video.h !!!
269 TOOLTIP_DELAY_FACTOR = 250
271 #game strings
272 STR_LOADMOS = 0
274 #game integers
275 SV_BPP = 0
276 SV_WIDTH = 1
277 SV_HEIGHT = 2
278 global GEMRB_VERSION
279 GEMRB_VERSION = -1