Difference between revisions of "ImGui.Core.new"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Initializes a new ImGui instance.
 
Initializes a new ImGui instance.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
ImGui.new(xxx)
 
ImGui.new(xxx)
 
</source>
 
</source>
Line 14: Line 14:
 
=== Example ===
 
=== Example ===
 
'''A minimum example'''
 
'''A minimum example'''
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
require "ImGui"
 
require "ImGui"
  

Revision as of 15:28, 13 July 2023

Available since: Gideros 2020.9
Class: ImGui

Description

Initializes a new ImGui instance. <syntaxhighlight lang="lua"> ImGui.new(xxx) </source>

Parameters

xxx: (table) parameters optional

Example

A minimum example <syntaxhighlight lang="lua"> 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) </source>