Difference between revisions of "ImGui.Core:showStyleSelector"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Adds a style selector block (not a window), essentially a combo listing the default styles.
 
Adds a style selector block (not a window), essentially a combo listing the default styles.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
ImGui:showStyleSelector(styleselector)
 
ImGui:showStyleSelector(styleselector)
 
</source>
 
</source>
Line 39: Line 39:
  
 
=== Example ===
 
=== Example ===
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
MyClass = Core.class(Sprite)
 
MyClass = Core.class(Sprite)
  

Revision as of 15:28, 13 July 2023

Available since: Gideros 2020.9
Class: ImGui

Description

Adds a style selector block (not a window), essentially a combo listing the default styles. <syntaxhighlight lang="lua"> ImGui:showStyleSelector(styleselector) </source>

styleselector can be any of the following:

  • ImGui.StyleVar_GrabRounding
  • ImGui.StyleVar_Alpha
  • ImGui.StyleVar_WindowMinSize
  • ImGui.StyleVar_PopupBorderSize
  • ImGui.StyleVar_WindowBorderSize
  • ImGui.StyleVar_FrameBorderSize
  • ImGui.StyleVar_ItemSpacing
  • ImGui.StyleVar_IndentSpacing
  • ImGui.StyleVar_FramePadding
  • ImGui.StyleVar_WindowPadding
  • ImGui.StyleVar_ChildRounding
  • ImGui.StyleVar_ItemInnerSpacing
  • ImGui.StyleVar_WindowRounding
  • ImGui.StyleVar_FrameRounding
  • ImGui.StyleVar_TabRounding
  • ImGui.StyleVar_ChildBorderSize
  • ImGui.StyleVar_GrabMinSize
  • ImGui.StyleVar_ScrollbarRounding
  • ImGui.StyleVar_ScrollbarSize
  • ImGui.StyleVar_WindowTitleAlign
  • ImGui.StyleVar_SelectableTextAlign
  • ImGui.StyleVar_PopupRounding
  • ImGui.StyleVar_ButtonTextAlign
  • ImGui.StyleVar_CellPadding

Parameters

styleselector: (string) any of the above selector

Example

<syntaxhighlight lang="lua"> 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:showStyleSelector(StyleVar_PopupRounding) self.imgui:endFrame() self.imgui:render() end

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