Difference between revisions of "ImGui.Core:setNextWindowPos"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2020.9<br/> '''Class:''' ImGui<br/> === Description === Sets the position of the next window in the windows list to a fixed posit...")
 
 
Line 4: Line 4:
  
 
=== Description ===
 
=== Description ===
Sets the position of the next window in the windows list to a fixed position.
+
Sets the position of the next window in the windows list. The window will remain at the desired position.
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
 
ImGui:setNextWindowPos(x,y)
 
ImGui:setNextWindowPos(x,y)

Latest revision as of 11:33, 27 August 2024

Available since: Gideros 2020.9
Class: ImGui

Description

Sets the position of the next window in the windows list. The window will remain at the desired position.

ImGui:setNextWindowPos(x,y)

Parameters

x: (number) the next window x position
y: (number) the next window y position

Example

function onEnterFrame(e)
	self.imgui:newFrame(e.deltaTime)
	local ischanged = false
	-- myWindow1
	self.imgui:setNextWindowPos(8, 8)
	self.imgui:setNextWindowSize(32*6, 32*3)
	self.imgui:getStyle():setWindowMinSize(32*6, 32*3)
	self.imgui:beginWindow("myWindow1") -- no close button
		-- add your widgets here
	self.imgui:endWindow()
	self.imgui:endFrame()
	self.imgui:render()
end




Dear ImGui