Difference between revisions of "ImGui.Core:endWindow"

From GiderosMobile
m (MoKaLux moved page ImGui:endWindow to ImGui.Core:endWindow)
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Pops the window from the stack.
 
Pops the window from the stack.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
ImGui:endWindow()
 
ImGui:endWindow()
</source>
+
</syntaxhighlight>
  
 
=== Example ===
 
=== Example ===
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
-- LOOP
 
-- LOOP
 
function MyClass:onEnterFrame(e)
 
function MyClass:onEnterFrame(e)
Line 28: Line 28:
 
self.imgui:render()
 
self.imgui:render()
 
end
 
end
</source>
+
</syntaxhighlight>
  
 
{{ImGui}}
 
{{ImGui}}

Latest revision as of 15:29, 13 July 2023

Available since: Gideros 2020.9
Class: ImGui

Description

Pops the window from the stack.

ImGui:endWindow()

Example

-- LOOP
function MyClass:onEnterFrame(e)
	self.imgui:newFrame(e)
	if (self.window01) then -- if window exists
		local windowdrawn = false
		self.window01, windowdrawn = self.imgui:beginWindow(
			"Hello ImGui v"..ImGui._VERSION, -- window title
			self.window01 -- is window expanded
		)
		if (windowdrawn) then
			self.imgui:text("Hello Dear ImGui!")
		end
		self.imgui:endWindow()
	end
	self.imgui:endFrame()
	self.imgui:render()
end