File tree Expand file tree Collapse file tree 3 files changed +17
-8
lines changed
Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ This repo only deals with binding ImGui with lua and doesn't deal with setting u
88
99For 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- Supported functions: 222 Unsupported functions: 77 for 1.50 (WIP)
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
1214
1315##How to call these imgui bindings from lua##
1416
Original file line number Diff line number Diff line change @@ -196,9 +196,11 @@ sub generateNamespaceImgui {
196196 push (@before , " UINT_ARG($name )" );
197197 }
198198 push (@funcArgs , $name );
199- # ImTextureID
200- } elsif ($args [$i ] =~ m / ^ *ImTextureID ([^ =\[ ]*) *$ / ) {
201- my $name = $1 ;
199+ # ImTextureID or const ImTextureID&
200+ # const ImTextureID& is the same thing as var
201+ # as lua is concerned
202+ } elsif ($args [$i ] =~ m / ^ *(ImTextureID|const ImTextureID&) ([^ =\[ ]*) *$ / ) {
203+ my $name = $2 ;
202204 push (@before , " IM_TEXTURE_ID_ARG($name )" );
203205 push (@funcArgs , $name );
204206 # bool with default value or not
@@ -491,9 +493,11 @@ sub generateDrawListFunctions {
491493 push (@before , " UINT_ARG($name )" );
492494 }
493495 push (@funcArgs , $name );
494- # ImTextureID
495- } elsif ($args [$i ] =~ m / ^ *ImTextureID ([^ =\[ ]*) *$ / ) {
496- my $name = $1 ;
496+ # ImTextureID or const ImTextureID&
497+ # const ImTextureID& is the same thing as var
498+ # as lua is concerned
499+ } elsif ($args [$i ] =~ m / ^ *(ImTextureID|const ImTextureID&) ([^ =\[ ]*) *$ / ) {
500+ my $name = $2 ;
497501 push (@before , " IM_TEXTURE_ID_ARG($name )" );
498502 push (@funcArgs , $name );
499503 # bool with default value or not
Original file line number Diff line number Diff line change @@ -1662,7 +1662,10 @@ IMGUI_FUNCTION_DRAW_LIST(PopClipRect)
16621662DRAW_LIST_CALL_FUNCTION_NO_RET(PopClipRect)
16631663END_IMGUI_FUNC
16641664// IMGUI_API void PushTextureID(const ImTextureID& texture_id);
1665- // Unsupported arg type const ImTextureID& texture_id
1665+ IMGUI_FUNCTION_DRAW_LIST(PushTextureID)
1666+ IM_TEXTURE_ID_ARG(texture_id)
1667+ DRAW_LIST_CALL_FUNCTION_NO_RET(PushTextureID, texture_id)
1668+ END_IMGUI_FUNC
16661669// IMGUI_API void PopTextureID();
16671670IMGUI_FUNCTION_DRAW_LIST(PopTextureID)
16681671DRAW_LIST_CALL_FUNCTION_NO_RET(PopTextureID)
You can’t perform that action at this time.
0 commit comments