mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-16 22:28:30 +01:00
generator.lua: correctly detect IMGUI_HAS_DOCK
This commit is contained in:
@@ -142,11 +142,11 @@ local function get_defines(t)
|
|||||||
while true do
|
while true do
|
||||||
local line = pipe:read"*l"
|
local line = pipe:read"*l"
|
||||||
if not line then break end
|
if not line then break end
|
||||||
local key,value = line:match([[#define%s+(%S+)%s+(.+)]])
|
local key,value = line:match([[#define%s+(%S+)%s*(.*)]])
|
||||||
if not key or not value then
|
if not key then --or not value then
|
||||||
--print(line)
|
--print(line)
|
||||||
else
|
else
|
||||||
defines[key]=value
|
defines[key]=value or ""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
pipe:close()
|
pipe:close()
|
||||||
@@ -344,7 +344,7 @@ while true do
|
|||||||
imgui_version = line:match([[#define%s+IMGUI_VERSION%s+(".+")]])
|
imgui_version = line:match([[#define%s+IMGUI_VERSION%s+(".+")]])
|
||||||
end
|
end
|
||||||
if not has_dock then
|
if not has_dock then
|
||||||
has_dock = line:match([[#define%s+IMGUI_HAS_DOCK%s+(".+")]])
|
has_dock = line:match([[#define%s+IMGUI_HAS_DOCK]])--%s*(".+")]])
|
||||||
end
|
end
|
||||||
if imgui_version and has_dock then break end
|
if imgui_version and has_dock then break end
|
||||||
end
|
end
|
||||||
@@ -364,8 +364,9 @@ end
|
|||||||
if gdefines.IMGUI_HAS_DOCK then
|
if gdefines.IMGUI_HAS_DOCK then
|
||||||
cimgui_header = cimgui_header..[[//docking branch
|
cimgui_header = cimgui_header..[[//docking branch
|
||||||
]]
|
]]
|
||||||
print("IMGUI_HAS_DOCK",gdefines.IMGUI_HAS_DOCK)
|
|
||||||
end
|
end
|
||||||
|
print("IMGUI_HAS_DOCK",gdefines.IMGUI_HAS_DOCK)
|
||||||
print("IMGUI_VERSION",imgui_version)
|
print("IMGUI_VERSION",imgui_version)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user