From a437a92bb39894beb91d6c4308d04852bc0d5eac Mon Sep 17 00:00:00 2001 From: San Jacobs Date: Sat, 14 Oct 2023 17:05:01 +0200 Subject: Advancements on theme and layout --- src/ui_implementation.odin | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/ui_implementation.odin') 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 -- cgit v1.2.1