ImGui.Core.new

From GiderosMobile
Revision as of 03:52, 24 March 2021 by MoKaLux (talk | contribs) (improved example)

Available since: Gideros 2020.9
Class: ImGui

Description

Initializes a new ImGui instance.

ImGui.new(xxx)

Parameters

xxx: (table) parameters optional

Example

A minimum example

require "ImGui"

local imgui = ImGui.new()
stage:addChild(imgui)

function onEnterFrame(e)
	imgui:newFrame(e)
	imgui:setClassicStyle()

	imgui:showDemoWindow()

	imgui:render()
	imgui:endFrame()
end

stage:addEventListener(Event.ENTER_FRAME, onEnterFrame)