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
78 IE_GUI_BUTTON_ON_PRESS
= 0x00000000
79 IE_GUI_MOUSE_OVER_BUTTON
= 0x00000001
80 IE_GUI_MOUSE_ENTER_BUTTON
= 0x00000002
81 IE_GUI_MOUSE_LEAVE_BUTTON
= 0x00000003
82 IE_GUI_BUTTON_ON_SHIFT_PRESS
= 0x00000004
83 IE_GUI_BUTTON_ON_RIGHT_PRESS
= 0x00000005
84 IE_GUI_BUTTON_ON_DRAG_DROP
= 0x00000006
85 IE_GUI_BUTTON_ON_DRAG_DROP_PORTRAIT
= 0x00000007
86 IE_GUI_BUTTON_ON_DRAG
= 0x00000008
87 IE_GUI_BUTTON_ON_DOUBLE_PRESS
= 0x00000009
88 IE_GUI_PROGRESS_END_REACHED
= 0x01000000
89 IE_GUI_SLIDER_ON_CHANGE
= 0x02000000
90 IE_GUI_EDIT_ON_CHANGE
= 0x03000000
91 IE_GUI_EDIT_ON_DONE
= 0x03000001
92 IE_GUI_EDIT_ON_CANCEL
= 0x03000002
93 IE_GUI_TEXTAREA_ON_CHANGE
= 0x05000000
94 IE_GUI_TEXTAREA_OUT_OF_TEXT
= 0x05000001
95 IE_GUI_LABEL_ON_PRESS
= 0x06000000
96 IE_GUI_SCROLLBAR_ON_CHANGE
= 0x07000000
97 IE_GUI_WORLDMAP_ON_PRESS
= 0x08000000
98 IE_GUI_MOUSE_ENTER_WORLDMAP
= 0x08000002
99 IE_GUI_MAP_ON_PRESS
= 0x09000000
100 IE_GUI_MAP_ON_RIGHT_PRESS
= 0x09000005
101 IE_GUI_MAP_ON_DOUBLE_PRESS
= 0x09000008
104 IE_GUI_CONTROL_FOCUSED
= 0x7f000080
107 IE_GUI_BUTTON_ENABLED
= 0x00000000
108 IE_GUI_BUTTON_UNPRESSED
= 0x00000000
109 IE_GUI_BUTTON_PRESSED
= 0x00000001
110 IE_GUI_BUTTON_SELECTED
= 0x00000002
111 IE_GUI_BUTTON_DISABLED
= 0x00000003
112 # Like DISABLED, but processes MouseOver events and draws UNPRESSED bitmap
113 IE_GUI_BUTTON_LOCKED
= 0x00000004
114 # Draws DISABLED bitmap, but it isn't disabled
115 IE_GUI_BUTTON_THIRD
= 0x00000005
116 # Draws PRESSED bitmap, but it isn't shifted
117 IE_GUI_BUTTON_SECOND
= 0x00000006
120 IE_GUI_EDIT_NUMBER
= 0x030000001
122 #mapcontrol states (add 0x090000000 if used with SetControlStatus)
123 IE_GUI_MAP_NO_NOTES
= 0
124 IE_GUI_MAP_VIEW_NOTES
= 1
125 IE_GUI_MAP_SET_NOTE
= 2
126 IE_GUI_MAP_REVEAL_MAP
= 3
128 # !!! Keep these synchronized with WorldMapControl.h !!!
129 # WorldMap label colors
130 IE_GUI_WMAP_COLOR_NORMAL
= 0
131 IE_GUI_WMAP_COLOR_SELECTED
= 1
132 IE_GUI_WMAP_COLOR_NOTVISITED
= 2
134 # !!! Keep these synchronized with Font.h !!!
135 IE_FONT_ALIGN_LEFT
= 0x00
136 IE_FONT_ALIGN_CENTER
= 0x01
137 IE_FONT_ALIGN_RIGHT
= 0x02
138 IE_FONT_ALIGN_BOTTOM
= 0x04
139 IE_FONT_ALIGN_TOP
= 0x10 # Single-Line and Multi-Line Text
140 IE_FONT_ALIGN_MIDDLE
= 0x20 #Only for single line Text
141 IE_FONT_SINGLE_LINE
= 0x40
149 # Window position anchors/alignments
150 # !!! Keep these synchronized with Window.h !!!
151 WINDOW_TOPLEFT
= 0x00
153 WINDOW_ABSCENTER
= 0x02
154 WINDOW_RELATIVE
= 0x04
156 WINDOW_BOUNDED
= 0x10
170 # GameControl screen flags
171 # !!! Keep these synchronized with GameControl.h !!!
178 # GameControltarget modes
179 # !!! Keep these synchronized with GameControl.h !!!
182 TARGET_MODE_ATTACK
= 2
184 TARGET_MODE_DEFEND
= 4
196 # Shadow color for ShowModal()
197 # !!! Keep these synchronized with Interface.h !!!
198 MODAL_SHADOW_NONE
= 0
199 MODAL_SHADOW_GRAY
= 1
200 MODAL_SHADOW_BLACK
= 2
202 # Flags for SetVisible()
203 # !!! Keep these synchronized with Interface.h !!!
210 # Flags for GameSelectPC()
211 # !!! Keep these synchronized with Game.h !!!
213 SELECT_REPLACE
= 0x01
217 # !!! Keep these synchronized with Spellbook.h !!!
218 IE_SPELL_TYPE_PRIEST
= 0
219 IE_SPELL_TYPE_WIZARD
= 1
220 IE_SPELL_TYPE_INNATE
= 2
223 # !!! Keep these synchronized with Item.h !!!
224 IE_ITEM_CRITICAL
= 0x00000001
225 IE_ITEM_TWO_HANDED
= 0x00000002
226 IE_ITEM_MOVABLE
= 0x00000004
227 IE_ITEM_DISPLAYABLE
= 0x00000008
228 IE_ITEM_CURSED
= 0x00000010
229 IE_ITEM_NOT_COPYABLE
= 0x00000020
230 IE_ITEM_MAGICAL
= 0x00000040
231 IE_ITEM_BOW
= 0x00000080
232 IE_ITEM_SILVER
= 0x00000100
233 IE_ITEM_COLD_IRON
= 0x00000200
234 IE_ITEM_STOLEN
= 0x00000400
235 IE_ITEM_CONVERSABLE
= 0x00000800
236 IE_ITEM_PULSATING
= 0x00001000
237 IE_ITEM_UNSELLABLE
= (IE_ITEM_CRITICAL | IE_ITEM_STOLEN
)
239 # CREItem (SlotItem) Flags bits
240 # !!! Keep these synchronized with Inventory.h !!!
241 IE_INV_ITEM_IDENTIFIED
= 0x01
242 IE_INV_ITEM_UNSTEALABLE
= 0x02
243 IE_INV_ITEM_STOLEN
= 0x04
244 IE_INV_ITEM_UNDROPPABLE
= 0x08
246 IE_INV_ITEM_ACQUIRED
= 0x10
247 IE_INV_ITEM_DESTRUCTIBLE
= 0x20
248 IE_INV_ITEM_EQUIPPED
= 0x40
249 IE_INV_ITEM_STACKED
= 0x80
250 # these come from the original item bits
251 IE_INV_ITEM_CRITICAL
= 0x100
252 IE_INV_ITEM_TWOHANDED
= 0x200
253 IE_INV_ITEM_MOVABLE
= 0x400
254 IE_INV_ITEM_UNKNOWN800
= 0x800
255 IE_INV_ITEM_CURSED
= 0x1000
256 IE_INV_ITEM_UNKNOWN2000
= 0x2000
257 IE_INV_ITEM_MAGICAL
= 0x4000
258 IE_INV_ITEM_BOW
= 0x8000
259 IE_INV_ITEM_SILVER
= 0x10000
260 IE_INV_ITEM_COLDIRON
= 0x20000
261 IE_INV_ITEM_STOLEN2
= 0x40000
262 IE_INV_ITEM_CONVERSIBLE
= 0x80000
263 IE_INV_ITEM_PULSATING
= 0x100000
266 GEM_RK_DOUBLESPEED
= 1
268 GEM_RK_QUADRUPLESPEED
= 4
279 # !!! Keep this synchronized with Video.h !!!
280 TOOLTIP_DELAY_FACTOR
= 250