Difference between revisions of "ImGui.Style:setWindowTitleAlign"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2020.9<br/> '''Class:''' ImGui.Style<br/> === Description === Sets the ImGui global style a window title alignment value. <source...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Sets the ImGui global style a window title alignment value.
 
Sets the ImGui global style a window title alignment value.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
ImGui.Style:setWindowTitleAlign(alignx, aligny)
 
ImGui.Style:setWindowTitleAlign(alignx, aligny)
</source>
+
</syntaxhighlight>
  
 
=== Parameters ===
 
=== Parameters ===
Line 14: Line 14:
  
 
=== Example ===
 
=== Example ===
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
local imgui = ImGui.new()
 
local imgui = ImGui.new()
 
stage:addChild(imgui)
 
stage:addChild(imgui)
Line 20: Line 20:
 
local style = imgui:getStyle()
 
local style = imgui:getStyle()
 
style:setWindowTitleAlign(0.5, 0.5)
 
style:setWindowTitleAlign(0.5, 0.5)
</source>
+
</syntaxhighlight>
  
 
{{ImGui.Style}}
 
{{ImGui.Style}}

Latest revision as of 15:29, 13 July 2023

Available since: Gideros 2020.9
Class: ImGui.Style

Description

Sets the ImGui global style a window title alignment value.

ImGui.Style:setWindowTitleAlign(alignx, aligny)

Parameters

alignx: (number) the window title align x value, usually between 0 and 1
aligny: (number) the window title align y value, usually between 0 and 1

Example

local imgui = ImGui.new()
stage:addChild(imgui)

local style = imgui:getStyle()
style:setWindowTitleAlign(0.5, 0.5)