Writing an IMGUI
By Henry Rose
1
Who Am I?
●
Game Dev of a game called FiKo
●
Creator of VUI (an IMGUI)
https://github.com/heroseh/vui
●
Stream Mon – Fri 1PM GMT
https://twitch.tv/heroseh
●
Twitter: @_herose_ 2
FiKo
3
Level Editor with IMGUI
4
VUI: an IMGUI
5
What makes it different?
6
●
User UI code runs every input event
●
No control objects in user code
●
Dynamic by default
https://youtu.be/Z1qyvQsjK5Y
Casey Muratori (2005)
7
Dear Imgui (C++)
First - V1.0 released 11/08/14
Latest - V1.80 released 21/01/21 8
Nuklear (C)
First - V1.0 released 14/04/16
Is now maintained by the community
9
Handmade Podcast Ep 3
https://handmade.network/podcast/ep/c1174949-adc4-492d-89b5-ca73dea4ff16
10
Why IMGUI
11
Why IMGUI - Retained
12
Why IMGUI - Retained
13
Why IMGUI - Retained
14
Why IMGUI
15
Why IMGUI
16
How do you build controls?
17
Button
Label
Grid
TextBox
CheckBox
RadioButton
ComboBox
Retained UI IMGUI
Control
How do you build controls?
18
Build controls - stack
19
[ ]
Problems of the stack approach
20
●
Doing to much at once
●
Fixed or Auto sizing only, cannot fill the
parent or ratio of parent
●
Animation is harder since you create new
controls each time.
Build controls - tree
21
Internal Build State Pointers
P = Parent Control
PS = Previous Sibling Control
P
P
PS
8
21
25
27
PS
PS
22
Internal Build State Pointers
P = Parent Control
PS = Previous Sibling Control
P
P
PS
8
21
25
27
PS
PS
Build controls – tree (later iteration)
P
PS
11
PS
17
PS
15
Control data structure
23
Control data structure
24
Control data structure
25
High Level Overview
26
Logic
Rendering
Frame
27
Logic
Rendering
Frame
High Level Overview
28
Logic
Input – (User -> System)
Build UI - (User)
Layout - (System)
High Level Overview
High Level Overview - Logic
29
30
High Level Overview - Logic
31
High Level Overview - Logic
32
High Level Overview - Logic
33
High Level Overview - Logic
How is one Designed? - Logic
34
How is one Designed? - Logic
35
36
Logic
Rendering
Frame
High Level Overview
High Level Overview
37
Logic
Rendering
Frame
Thank you for watching
38
Questions?
39

Implementing imgui