diff options
| author | Physcik <mynameisgennadiy@vk.com> | 2026-01-30 03:04:43 +0500 |
|---|---|---|
| committer | Physcik <mynameisgennadiy@vk.com> | 2026-01-30 03:04:43 +0500 |
| commit | 95b7170acdfa73c5842db002ec64f78125fe2f90 (patch) | |
| tree | bcf1255a4133e53888faf48d04a6cf1740441178 /engine/UI/Style.go | |
| parent | 45b7d0ce612921729d925a7111e4d1aeba3ef849 (diff) | |
Text formation
Diffstat (limited to 'engine/UI/Style.go')
| -rw-r--r-- | engine/UI/Style.go | 24 |
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 + } +} |
