forked from kallisti5/guisan
-
Notifications
You must be signed in to change notification settings - Fork 1
Coloring the widgets
Gwilherm Baudic edited this page Apr 5, 2020
·
2 revisions
If you have played a little bit with the included examples, you may have noticed that the color scheme consists mostly of grey shades, like old versions of Windows. For a game, chances are you will like to change this. Fortunately, guisan provides an API for this in the Widget
class:
setBaseColor()
setForegroundColor()
setBackgroundColor()
Now the question is: which is which? The following table summarizes the use of these colors in the existing widgets. When in doubt, check the code.
Widget | baseColor | foregroundColor | backgroundColor |
---|---|---|---|
Button, ImageButton, ImageTextButton, ToggleButton | background, shadows | text, focus rectangle | - |
Checkbox, RadioButton | shadows | text, focus rectangle, check/circle | background of the clickable area |
Icon | shadows | - | - |
InputBox | background, shadows | caption text | - |
Label | border (if any) | text | - |
ListBox | |||
MessageBox | |||
PasswordField, TextBox, TextField | |||
ProgressBar |