carb::simplegui::Style¶
Defined in carb/simplegui/SimpleGuiTypes.h
-
struct
carb::simplegui
::
Style
¶ Struct with all style variables.
You may modify the simplegui::getStyle() main instance during initialization and before newFrame(). During the frame, use simplegui::pushStyleVar()/popStyleVar() to alter the main style values, and simplegui::pushStyleColor()/popStyleColor() for colors.
Public Functions
-
inline
Style
()¶ Constructor.
Public Members
-
float
alpha
¶ Global alpha applies to everything in simplegui.
-
float
windowRounding
¶ Radius of window corners rounding. Set to 0.0f to have rectangular windows.
-
float
windowBorderSize
¶ Thickness of border around windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly).
-
Float2
windowMinSize
¶ Minimum window size. This is a global setting. If you want to constraint individual windows, use SetNextWindowSizeConstraints().
-
Float2
windowTitleAlign
¶ Alignment for title bar text. Defaults to (0.0f,0.5f) for left-aligned,vertically centered.
-
float
childRounding
¶ Radius of child window corners rounding. Set to 0.0f to have rectangular windows.
-
float
childBorderSize
¶ Thickness of border around child windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly).
-
float
popupRounding
¶ Radius of popup window corners rounding. (Note that tooltip windows use WindowRounding)
-
float
popupBorderSize
¶ Thickness of border around popup/tooltip windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly).
-
float
frameRounding
¶ Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets).
-
float
frameBorderSize
¶ Thickness of border around frames. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly).
-
Float2
itemInnerSpacing
¶ Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label).
-
Float2
touchExtraPadding
¶ Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don’t sort widgets so priority on overlap will always be given to the first widget. So don’t grow this too much!
-
float
indentSpacing
¶ Horizontal indentation when e.g. entering a tree node. Generally == (FontSize + FramePadding.x*2).
-
float
columnsMinSpacing
¶ Minimum horizontal spacing between two columns.
-
float
scrollbarSize
¶ Width of the vertical scrollbar, Height of the horizontal scrollbar.
-
float
scrollbarRounding
¶ Radius of grab corners for scrollbar.
-
float
grabMinSize
¶ Minimum width/height of a grab box for slider/scrollbar.
-
float
grabRounding
¶ Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
-
float
tabRounding
¶ Radius of upper corners of a tab. Set to 0.0f to have rectangular tabs.
-
float
tabBorderSize
¶ Thickness of border around tabs.
Alignment of button text when button is larger than text. Defaults to (0.5f,0.5f) for horizontally+vertically centered.
-
Float2
selectableTextAlign
¶ Alignment of selectable text when selectable is larger than text. Defaults to (0.0f, 0.0f) (top-left aligned).
-
Float2
displayWindowPadding
¶ Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows.
-
Float2
displaySafeAreaPadding
¶ If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows.
-
float
mouseCursorScale
¶ Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). May be removed later.
-
bool
antiAliasedLines
¶ Enable anti-aliasing on lines/borders. Disable if you are really tight on CPU/GPU.
-
bool
antiAliasedFill
¶ Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.)
-
float
curveTessellationTol
¶ Tessellation tolerance when using PathBezierCurveTo() without a specific number of segments. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality.
-
inline