2 // control/visual/visual.qh
17 void() Item_Picture_Draw;
18 void() Item_Picture_Destroy;
19 void() Item_Picture_Spawn;
26 void() Item_Rect_Draw;
27 void() Item_Rect_Spawn;
37 void() Item_Label_Draw;
38 void() Item_Label_Update;
39 void() Item_Label_Destroy;
40 void() Item_Label_Spawn;
42 // Item_MultiLabel implements Item_Label
50 .float wrap; // 0 for no wrapping
52 void() Item_MultiLabel_Update;
53 void() Item_MultiLabel_Draw;
54 void() Item_MultiLabel_Destroy;
55 void() Item_MultiLabel_Spawn;
57 // Item_Button [Item_Link]
58 // add $ to the text if you want to use pictures
59 // e.g. $gfx/menu_newgame
60 // if selected is "" then it falls back to normal
61 // if pressed is "" then it falls back to selected or normal (see above)
67 .vector colorSelected;
69 .vector drawFlags; // x = normal; y = selected; z = pressed
71 .string soundSelected;
76 // cevents supported by Item_Button
82 void() Item_Button_Draw;
83 void() Item_Button_Update;
84 void( bool pSelect, bool pUser ) Item_Button_Select;
85 bool( float pKey, float pAscii ) Item_Button_Key;
86 void() Item_Button_Destroy;
87 void() Item_Button_Spawn;
89 // Item_Slider [Item_DataUser]
90 // Item_Slider changes link's value when the slider is moved
91 // the slider is x-centered but not y
92 .vector proportions; // x is left margin, y is slider width and z is right margin (sum should be 1)
93 .string picture; // picture of the background
94 .string pictureSlider; // picture of the slider
95 .string soundSelected;
96 .string soundIncrease;
97 .string soundDecrease;
98 .vector sizeSlider; // size of the slider
99 .vector direction; // y values of the slider: _x for the start and _y for the end (as percentages of size_y)
100 // only has normal and selected
102 .vector colorSelected;
106 // cevents supported by Item_Slider
109 .event action; // called when the slider is changed
112 void( bool pSelect, bool pUser ) Item_Slider_Select;
113 void() Item_Slider_Draw;
114 bool( float pKey, float pAscii ) Item_Slider_Key;
115 void() Item_Slider_Destroy;
116 void() Item_Slider_Spawn;
118 // Item_EditBox [Item_DataUser]
120 .vector colorSelected;
121 .vector colorPressed;
126 .vector colorCursorFlash;
128 .vector sizeCursorFlash;
129 .vector alphasCursor;
130 .vector drawFlagsCursor;
132 .string soundSelected;
140 // cevents supported by Item_EditBox
143 .event action; // called when the return key is pressed
147 void() Item_EditBox_Draw;
148 void() Item_EditBox_Update;
149 bool( float pKey, float pAscii ) Item_EditBox_Key;
150 void( bool pSelect, bool pUser ) Item_EditBox_Select;
151 void() Item_EditBox_Destroy;
152 void() Item_EditBox_Reinit;
153 void() Item_EditBox_Spawn;
155 // Item_ValueButton [Item_Button] [Item_DataUser] FIXME: actually this is bad practice
157 void() Item_ValueButton_Update;
158 void() Item_ValueButton_Destroy;
159 void() Item_ValueButton_Spawn;
161 // Item_SwitchButton Item_ValueButton
162 bool( float pKey, float pAscii ) Item_SwitchButton_Key;
163 void() Item_SwitchButton_Spawn;
165 // Item_List [Item_DataUser]
167 .vector colorSelected;
168 .vector colorPressed;
169 .vector colorInactive;
170 .vector drawFlags; // x = normal; y = selected; z = pressed
171 .float drawFlagInactive;
173 .float alphaInactive;
174 .string soundSelected;
175 .string soundPressed;
179 // cevents supported by Item_List
183 .event action; // called on double-click
185 void() Item_List_Draw;
186 void() Item_List_Update;
187 void( bool pSelect, bool pUser ) Item_List_Select;
188 bool( float pKey, float pAscii ) Item_List_Key;
189 void() Item_List_Destroy;
190 void() Item_List_Spawn;
193 // When you click on the area, the target will move with the mouse cursor until you click again
197 bool( float pKey, float pAscii ) Item_FloatingArea_Key;
198 void() Item_FloatingArea_Update;
199 void() Item_FloatingArea_Spawn;
202 // target should point to a ScrollWindow
206 void() Item_VScrollBar_Draw;
207 bool( float pKey, float Ascii ) Item_VScrollBar_Key;
208 void() Item_VScrollBar_Update;
209 void() Item_VScrollBar_Spawn;