-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUI_Tut.txt
64 lines (51 loc) · 905 Bytes
/
UI_Tut.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
UI Tut
Widget - elements/components
*Labels - text
*Images - sprite, frame, position
*Actor - actor action, position
*Buttons - [ Label | Image | Custom ]
*Panel - list of widgets, layout style
-----------------
; (Label) ;
;(Panel 1^ & 2↓);
; (Button) ;
-----------------
Button.State
The state of the button - nothing, highlighted, pressed, held, released
typedef Widget_Structure
{
id/Name
position,
routine,
draw function*,
update function*,
void* Data
}
Update Globally
Call updates
if !NULL
if Update()
Add Globally
Window
{
position,
rectangle,
draw function*,
update function*,
(window *win, Glist *updateList)
steal focus,
draw generic,
GList *Callbacks (defined below ↓)
}
Draw ↓
---------------
; -----------
; ; ;
; ; ;
; -----------
---------------
Update ^
_________________________________
Callbacks
void (func*)(void *data),
void *data