Difference between revisions of "ImGui.Style:setColor"
From GiderosMobile
(changed link) |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
Line 5: | Line 5: | ||
=== Description === | === Description === | ||
Sets a color to an ImGui element. | Sets a color to an ImGui element. | ||
− | < | + | <syntaxhighlight lang="lua"> |
ImGui.Style:setColor(imguielement,color,alpha) | ImGui.Style:setColor(imguielement,color,alpha) | ||
</source> | </source> | ||
Line 15: | Line 15: | ||
=== Example === | === Example === | ||
− | < | + | <syntaxhighlight lang="lua"> |
local style = imgui:getStyle() | local style = imgui:getStyle() | ||
style:setColor(ImGui.Col_TabHovered, 0x54575b, 0.83) | style:setColor(ImGui.Col_TabHovered, 0x54575b, 0.83) |
Revision as of 15:28, 13 July 2023
Available since: Gideros 2020.9
Class: ImGui.Style
Description
Sets a color to an ImGui element. <syntaxhighlight lang="lua"> ImGui.Style:setColor(imguielement,color,alpha) </source>
Parameters
imguielement: (String) the ImGui element target (see ImGui.CONST.Col)
color: (number) the color in hex format
alpha: (number) the alpha between 0 and 1, default=1 optional
Example
<syntaxhighlight lang="lua"> 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) </source>
- ImGui.Style
- ImGui.Style:getAlpha
- ImGui.Style:getColor
- ImGui.Style:getDisplaySafeAreaPadding
- ImGui.Style:getItemSpacing
- ImGui.Style:getScrollbarRounding
- ImGui.Style:getScrollbarSize
- ImGui.Style:getTouchExtraPadding
- ImGui.Style:getWindowBorderSize
- ImGui.Style:getWindowMinSize
- ImGui.Style:getWindowRounding
- ImGui.Style:getWindowTitleAlign
- ImGui.Style:setAlpha
- ImGui.Style:setColor
- ImGui.Style:setDisplaySafeAreaPadding
- ImGui.Style:setItemSpacing
- ImGui.Style:setScrollbarRounding
- ImGui.Style:setScrollbarSize
- ImGui.Style:setTouchExtraPadding
- ImGui.Style:setWindowBorderSize
- ImGui.Style:setWindowMinSize
- ImGui.Style:setWindowRounding
- ImGui.Style:setWindowTitleAlign