Table of Contents

ImGui Style Table

The ImGui Style table the current visual style of ImGui and the various properties that can alter it.


Accessing ImGui Style Table

Within an addon, you can access the ImGui Style table via 'imgui.style'.

local style = imgui.style;

ImGui Style Table Notes

Please note! The imgui.style table differs from the main imgui functions! Please be sure to read the following notes carefully!!

The imgui.style table differs from the functions found within the 'imgui' table. The style table is implemented in a different manner and can make use of certain types such as ImVec2, ImVec4, etc. Because of this, things are used a little differently. But it should be straight forward enough.

Here are some examples of how you can make use of the imgui.style table properties:

-- Obtain the style table..
local s = imgui.style;
 
-- Set the rounding properties to 0..
s.GrabRounding = 0;
s.FrameRounding = 0;
s.ScrollbarRounding = 0;
s.WindowRounding = 0;
 
-- Set a color to black..
local colors = imgui.style.Colors;
colors[ImGuiCol_WindowBg] = ImVec4(0.0, 0.0, 0.0, 1.0);
imgui.style.Colors = colors;

Any property that is within an array must be done in the above manner. You cannot directly index these arrays and set their values.
You must pull the array, edit it, then reset the full array to make changes.


ImGui IO Table Properties