ImGui.Core:setLightStyle

From GiderosMobile
Revision as of 15:28, 13 July 2023 by Hgy29 (talk | contribs) (Text replacement - "<source" to "<syntaxhighlight")

Available since: Gideros 2020.9
Class: ImGui

Description

Sets a light color style. <syntaxhighlight lang="lua"> ImGui:setLightStyle() </source>

Best used with borders and a custom, thicker font.

Example

<syntaxhighlight lang="lua"> MyClass = Core.class(Sprite)

function MyClass:init() self.imgui = ImGui.new() self:addChild(self.imgui) self.imgui:setLightStyle() -- LISTENERS self:addEventListener("enterBegin", self.onTransitionInBegin, self) end

-- LOOP function MyClass:onEnterFrame(e) self.imgui:newFrame() -- 2 we build our GUI -- ... self.imgui:endFrame() self.imgui:render() end

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