diff options
author | San Jacobs | 2023-10-14 17:05:01 +0200 |
---|---|---|
committer | San Jacobs | 2023-10-14 17:05:01 +0200 |
commit | a437a92bb39894beb91d6c4308d04852bc0d5eac (patch) | |
tree | 4303e3a2e90517289d501c88cf3d1427b726da26 /src/ui_implementation.odin | |
parent | 44d408583ab8811f2b89d8fcb9e21b98f1409b7d (diff) | |
download | satscalc-a437a92bb39894beb91d6c4308d04852bc0d5eac.tar.gz satscalc-a437a92bb39894beb91d6c4308d04852bc0d5eac.tar.bz2 satscalc-a437a92bb39894beb91d6c4308d04852bc0d5eac.zip |
Advancements on theme and layout
Diffstat (limited to 'src/ui_implementation.odin')
-rw-r--r-- | src/ui_implementation.odin | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/ui_implementation.odin b/src/ui_implementation.odin index 6b0947d..e4b4f80 100644 --- a/src/ui_implementation.odin +++ b/src/ui_implementation.odin @@ -13,18 +13,12 @@ Theme :: struct { base: rl.Color, slider_bar: rl.Color, text: rl.Color, + price_100: rl.Color, + price_150: rl.Color, + price_200: rl.Color, + price_300: rl.Color, } -/*theme : Theme = { - background = {20, 25, 25, 255}, - background_top = {30, 35, 35, 255}, - background_bottom = {40, 40, 40, 255}, - button = {80, 80, 80, 255}, - base = {60, 60, 60, 255}, - slider_bar = {170, 170, 170, 255}, - text = rl.RAYWHITE, -}*/ - theme : Theme = { background = {25 , 27 , 29 , 255,}, background_bar = {43 , 43 , 48 , 255,}, @@ -32,6 +26,10 @@ theme : Theme = { base = {60 , 60 , 60 , 255,}, slider_bar = {91 , 91 , 204, 255,}, text = {255, 255, 255, 252,}, + price_100 = {30 , 240, 30 , 255,}, + price_150 = {240, 200, 30 , 255,}, + price_200 = {240, 30 , 30 , 255,}, + price_300 = {240, 30 , 240, 255,}, } DAY_HEIGHT :: 35 @@ -171,9 +169,9 @@ Text_Alignment :: enum int { Right, Center, } -label :: proc(text: string, font: rl.Font, alignment: Text_Alignment = .Left) -> ^Item { +label :: proc(text: string, font: rl.Font, width: int = 150, alignment: Text_Alignment = .Left) -> ^Item { item := oui.item_make(c0) - item.layout_size = {150, 25} + item.layout_size = {width, 25} data := oui.alloc_typed(c0, item, Data_Label) data.subtype = .Label |