Difference between revisions of "ImGui.Core.new"

From GiderosMobile
m (MoKaLux moved page ImGui.new to ImGui.Core.new)
Line 21: Line 21:
  
 
function onEnterFrame(e)
 
function onEnterFrame(e)
imgui:newFrame(e)
+
imgui:newFrame(e.deltaTime)
 
imgui:setClassicStyle()
 
imgui:setClassicStyle()
  

Revision as of 01:42, 23 October 2021

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.deltaTime)
	imgui:setClassicStyle()

	imgui:showDemoWindow()

	imgui:render()
	imgui:endFrame()
end

stage:addEventListener(Event.ENTER_FRAME, onEnterFrame)