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
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)
56 IE_GUI_SCROLLBAR_DEFAULT
= 0x00000040 # mousewheel triggers it (same value as default button)
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
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
93 IE_GUI_CONTROL_FOCUSED
= 0x7f000080
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
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
138 # Window position anchors/alignments
139 # !!! Keep these synchronized with Window.h !!!
140 WINDOW_TOPLEFT
= 0x00
142 WINDOW_ABSCENTER
= 0x02
143 WINDOW_RELATIVE
= 0x04
145 WINDOW_BOUNDED
= 0x10
159 # GameControl screen flags
160 # !!! Keep these synchronized with GameControl.h !!!
167 # GameControltarget modes
168 # !!! Keep these synchronized with GameControl.h !!!
171 TARGET_MODE_ATTACK
= 2
173 TARGET_MODE_DEFEND
= 4
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 !!!
199 # Flags for GameSelectPC()
200 # !!! Keep these synchronized with Game.h !!!
202 SELECT_REPLACE
= 0x01
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
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
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
255 GEM_RK_DOUBLESPEED
= 1
257 GEM_RK_QUADRUPLESPEED
= 4
268 # !!! Keep this synchronized with Video.h !!!
269 TOOLTIP_DELAY_FACTOR
= 250