ImGui.Core:showStyleSelector

From GiderosMobile
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Available since: Gideros 2020.9
Class: ImGui

Description

Adds a style selector block (not a window), essentially a combo listing the default styles.

ImGui:showStyleSelector(styleselector)

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

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