Skip to content

Commit 62ca252

Browse files
author
patrickriordan
authored
Merge pull request #6 from patrickriordan/idbrill-iterate-enums
Idbrii iterate enums
2 parents 3534f29 + 5d70841 commit 62ca252

File tree

5 files changed

+1444
-1011
lines changed

5 files changed

+1444
-1011
lines changed

README.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ This repo only deals with binding ImGui with lua and doesn't deal with setting u
88

99
For LOVE bindings check out https://github.com/slages/love-imgui (uses these C++ bindings and does the rest of the work for you).
1010

11-
Function support for dear imgui 1.50 (WIP):
12-
Normal Imgui functions: Supported: 222 Unsupported: 77
13-
Imgui DrawList functions: Supported: 34 Unsupported: 10
11+
Function support for dear imgui 1.60:
12+
13+
Normal Imgui functions: Supported: 204 Unsupported: 117
14+
Imgui DrawList functions: Supported: 36 Unsupported: 12
15+
1416

1517
## How to call these imgui bindings from lua
1618

@@ -89,9 +91,26 @@ Note you must specifiy the color in hex for now
8991
0x(ALPHA)(BLUE)(GREEN)(RED)
9092
0xFF0000FF = full opacity red
9193

92-
## How to build:
9394

94-
Generate iterator file (or use the one for 1.50 WIP already in the repo)
95+
##Enums:
96+
97+
Enums are exposed through a "constant" table. They're namespaced with "ImGui" stripped from the name.
98+
99+
```c++
100+
ImGui::SetNextWindowSize(ImVec2(550,680), ImGuiSetCond_FirstUseEver);
101+
ImGui::Begin("Demo", p_open, ImGuiWindowFlags_ShowBorders);
102+
ImGui::End()
103+
```
104+
105+
```lua
106+
imgui.SetNextWindowSize(550,680, imgui.constant.SetCond.FirstUseEver)
107+
imgui.Begin("Demo", true, imgui.constant.WindowFlags.ShowBorders)
108+
imgui.End()
109+
```
110+
111+
##How to build:##
112+
113+
Generate iterator file (or use the one for 1.50 already in the repo)
95114
```
96115
./generate_imgui_bindings.pl <../imgui/imgui.h >imgui_iterator.inl
97116
```

0 commit comments

Comments
 (0)