ImGui.Style:setColor

From GiderosMobile
Revision as of 06:53, 24 March 2021 by MoKaLux (talk | contribs) (Created page with "__NOTOC__ '''Available since:''' Gideros 2020.9<br/> '''Class:''' ImGui.Style<br/> === Description === Sets a color to an ImGui element. <source lang="lua"> ImGui.Style:s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2020.9
Class: ImGui.Style

Description

Sets a color to an ImGui element.

ImGui.Style:setColor(imguielement,color,alpha)

Parameters

imguielement: (String) the ImGui element target (see ImGui Col constants)
color: (number) the color in hex format
alpha: (number) the alpha between 0 and 1, default=1 optional

Example

local style = imgui:getStyle()
style:setColor(ImGui.Col_TabHovered, 0x54575b, 0.83)
style:setColor(ImGui.Col_NavWindowingHighlight, 0xffffff, 0.70)
style:setColor(ImGui.Col_FrameBgActive, 0xababaa, 0.39)