By default, ImGui is not enabled in packaged game. To enable ImGui integration, you have to do following:
#define LUMIX_APP_IMGUI_INTEGRATION
in imgui_integration.h.app
project.In your scene, add following script to an entity:
local show_imgui = false
function onInputEvent(event : InputEvent)
if event.type == "button" then
if event.device.type == "keyboard" then
if event.key_id == LumixAPI.INPUT_KEYCODE_F11 and event.down then
show_imgui = not show_imgui
end
end
end
end
function update(time_delta)
this.world:getModule("gui"):getSystem():enableCursor(show_imgui)
if show_imgui then
ImGui.Begin("foo")
ImGui.Text("Hello World!")
ImGui.End()
end
end