-
-
Notifications
You must be signed in to change notification settings - Fork 53
SetColor
otvv edited this page Aug 17, 2020
·
1 revision
This function sets the default color of a ColorPicker or a Label.
This function takes a FGUI::COLOR
or 4 std::uint8_t
(r, g, b, a) as arguments.
NOTE: You don't need to set the gradient state.
List of widgets that are using this function:
ColorPicker
Label
Here's how you can set a default color to the ColorPicker:
buildrPattern.Widget(ColorPicker).Title("ColorPicker 1").Font("Tahoma", 12).Position(15, 200).Color(FGUI::COLOR(255, 255, 0)).SpawnIn(Container);
// or
buildrPattern.Widget(ColorPicker).Title("ColorPicker 1").Font("Tahoma", 12).Position(15, 200).Color({ 255, 255, 0 }).SpawnIn(Container);
// or
buildrPattern.Widget(ColorPicker).Title("ColorPicker 1").Font("Tahoma", 12).Position(15, 200).Color(255, 255, 0).SpawnIn(Container);
NOTE: The process is the same for Labels.
NOTE: There's an extra function added into the pattern: Color
. As you can see, there's multiple ways you can add a new color. Just pick the one you think looks better.
Next you will learn about the AddTab function.
You can also read the library comments/functions for additional info.