ImGui.Core:setLightStyle

From GiderosMobile
Revision as of 21:30, 16 March 2021 by MoKaLux (talk | contribs) (Created page with "__NOTOC__ '''Available since:''' Gideros 2020.9<br/> '''Class:''' Dear ImGui<br/> === Description === Sets a light color style. <source lang="lua"> ImGui:setLightStyle()...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2020.9
Class: Dear ImGui

Description

Sets a light color style.

ImGui:setLightStyle()

Best used with borders and a custom, thicker font.

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()
	self.imgui:setLightStyle()
	-- 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