Difference between revisions of "ImGui.Core:showUserGuide"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2020.9<br/> '''Class:''' ImGui<br/> === Description === Adds a basic help/info block (not a window): how to manipulate ImGui as a...")
 
(No difference)

Revision as of 21:58, 24 March 2021

Available since: Gideros 2020.9
Class: ImGui

Description

Adds a basic help/info block (not a window): how to manipulate ImGui as a end-user (mouse/keyboard controls).

ImGui:showUserGuide()

Example

MyClass = Core.class(Sprite)

function MyClass:init()
	self.imgui = ImGui.new()
	self:addChild(self.imgui)
	-- LISTENERS
	self:addEventListener("enterBegin", self.onTransitionInBegin, self)
end

-- LOOP
function MyClass:onEnterFrame(e)
	self.imgui:newFrame(e)
	self.imgui:showUserGuide()
	self.imgui:endFrame()
	self.imgui:render()
end

-- EVENT LISTENERS
function MyClass:onTransitionInBegin()
	self:addEventListener(Event.ENTER_FRAME, self.onEnterFrame, self)
end