summaryrefslogtreecommitdiff
path: root/engine/UI/Style.go
diff options
context:
space:
mode:
Diffstat (limited to 'engine/UI/Style.go')
-rw-r--r--engine/UI/Style.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/engine/UI/Style.go b/engine/UI/Style.go
new file mode 100644
index 0000000..1901e4b
--- /dev/null
+++ b/engine/UI/Style.go
@@ -0,0 +1,24 @@
+package ui
+
+import (
+ rl "github.com/gen2brain/raylib-go/raylib"
+)
+
+type Style struct {
+ BacgroundColor *rl.Color
+ FontColor *rl.Color
+ Padding *float32
+}
+
+// Fills up not specifiend elements with default ones
+func (base *Style) FillMissing(defaultStyle *Style) {
+ if base.BacgroundColor == nil {
+ base.BacgroundColor = defaultLabelStyle.BacgroundColor
+ }
+ if base.Padding == nil {
+ base.Padding = defaultLabelStyle.Padding
+ }
+ if base.FontColor == nil {
+ base.FontColor = defaultLabelStyle.FontColor
+ }
+}