style tweaks
This commit is contained in:
parent
90a674724a
commit
285fd64989
@ -82,7 +82,8 @@ V_WidgetTheme V_GetWidgetTheme(void)
|
|||||||
// theme.font = GC_FontKeyFromResource(ResourceKeyFromStore(&V_Resources, Lit("font/fixedsys.ttf")));
|
// theme.font = GC_FontKeyFromResource(ResourceKeyFromStore(&V_Resources, Lit("font/fixedsys.ttf")));
|
||||||
theme.font = GC_FontKeyFromResource(ResourceKeyFromStore(&V_Resources, Lit("font/seguisb.ttf")));
|
theme.font = GC_FontKeyFromResource(ResourceKeyFromStore(&V_Resources, Lit("font/seguisb.ttf")));
|
||||||
|
|
||||||
theme.font_size = 14;
|
// theme.font_size = 14;
|
||||||
|
theme.font_size = TweakFloat(Lit("Font size"), 14, 6, 50);
|
||||||
theme.h1 = 2.00;
|
theme.h1 = 2.00;
|
||||||
theme.h2 = 1.50;
|
theme.h2 = 1.50;
|
||||||
theme.h3 = 1.17;
|
theme.h3 = 1.17;
|
||||||
@ -98,7 +99,6 @@ V_WidgetTheme V_GetWidgetTheme(void)
|
|||||||
theme.text_padding_x = 5;
|
theme.text_padding_x = 5;
|
||||||
theme.text_padding_y = 5;
|
theme.text_padding_y = 5;
|
||||||
|
|
||||||
theme.font_size = TweakFloat(Lit("Font size"), 14, 10, 50);
|
|
||||||
|
|
||||||
theme.window_background_color = Rgb32(0xff1a1d1e);
|
theme.window_background_color = Rgb32(0xff1a1d1e);
|
||||||
theme.window_border_color = Rgb32(0xff343a3b);
|
theme.window_border_color = Rgb32(0xff343a3b);
|
||||||
@ -1482,8 +1482,8 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
item_border_color = LerpSrgb(item_border_color, theme.button_active_color, item_rep.hot);
|
item_border_color = LerpSrgb(item_border_color, theme.button_active_color, item_rep.hot);
|
||||||
}
|
}
|
||||||
|
|
||||||
UI_Size item_height = UI_FNT(1.5, 1);
|
f32 item_size_px = UI_FNT(1.5, 1).v;
|
||||||
UI_Size tweak_height = UI_FNT(1.25, 1);
|
f32 tweak_size_px = UI_FNT(1.25, 1).v;
|
||||||
|
|
||||||
UI_SetNext(BorderColor, 0);
|
UI_SetNext(BorderColor, 0);
|
||||||
UI_SetNext(Rounding, UI_RPIX(0));
|
UI_SetNext(Rounding, UI_RPIX(0));
|
||||||
@ -1493,7 +1493,7 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
UI_SetNext(BackgroundColor, item_color);
|
UI_SetNext(BackgroundColor, item_color);
|
||||||
UI_SetNext(Rounding, UI_RPIX(5));
|
UI_SetNext(Rounding, UI_RPIX(5));
|
||||||
UI_SetNext(Width, UI_GROW(1, 0));
|
UI_SetNext(Width, UI_GROW(1, 0));
|
||||||
UI_SetNext(Height, item_height);
|
UI_SetNext(Height, UI_PIX(item_size_px, 1));
|
||||||
UI_SetNext(ChildAlignment, UI_Region_Left);
|
UI_SetNext(ChildAlignment, UI_Region_Left);
|
||||||
UI_SetNext(Flags, UI_BoxFlag_DrawText | UI_BoxFlag_Interactable);
|
UI_SetNext(Flags, UI_BoxFlag_DrawText | UI_BoxFlag_Interactable);
|
||||||
UI_PushCP(UI_BuildRowEx(item->key));
|
UI_PushCP(UI_BuildRowEx(item->key));
|
||||||
@ -1648,7 +1648,7 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
Vec4 slider_bg_color = theme.window_background_color;
|
Vec4 slider_bg_color = theme.window_background_color;
|
||||||
Vec4 slider_border_color = theme.window_border_color;
|
Vec4 slider_border_color = theme.window_border_color;
|
||||||
Vec4 slider_progress_color = theme.color_positive;
|
Vec4 slider_progress_color = theme.color_positive;
|
||||||
Vec4 marker_bg_color = slider_bg_color;
|
Vec4 marker_bg_color = slider_progress_color;
|
||||||
slider_border_color = LerpSrgb(slider_border_color, theme.button_active_color, slider_reps.draw.hot);
|
slider_border_color = LerpSrgb(slider_border_color, theme.button_active_color, slider_reps.draw.hot);
|
||||||
marker_bg_color = LerpSrgb(marker_bg_color, theme.text_color, slider_reps.draw.hot);
|
marker_bg_color = LerpSrgb(marker_bg_color, theme.text_color, slider_reps.draw.hot);
|
||||||
|
|
||||||
@ -1657,7 +1657,7 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
UI_SetNext(Rounding, UI_RGROW(theme.rounding));
|
UI_SetNext(Rounding, UI_RGROW(theme.rounding));
|
||||||
UI_SetNext(Border, 1);
|
UI_SetNext(Border, 1);
|
||||||
UI_SetNext(Width, UI_FNT(10, 1));
|
UI_SetNext(Width, UI_FNT(10, 1));
|
||||||
UI_SetNext(Height, tweak_height);
|
UI_SetNext(Height, UI_PIX(tweak_size_px * 0.75, 1));
|
||||||
UI_SetNext(Flags, UI_BoxFlag_Interactable);
|
UI_SetNext(Flags, UI_BoxFlag_Interactable);
|
||||||
UI_SetNext(Misc, ratio);
|
UI_SetNext(Misc, ratio);
|
||||||
UI_PushCP(UI_BuildRowEx(slider_key));
|
UI_PushCP(UI_BuildRowEx(slider_key));
|
||||||
@ -1669,10 +1669,10 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
UI_SetNext(BackgroundColor, slider_progress_color);
|
UI_SetNext(BackgroundColor, slider_progress_color);
|
||||||
// UI_SetNext(Rounding, UI_RGROW(theme.rounding));
|
// UI_SetNext(Rounding, UI_RGROW(theme.rounding));
|
||||||
UI_SetNext(Rounding, 0);
|
UI_SetNext(Rounding, 0);
|
||||||
UI_SetNext(BorderColor, 0);
|
UI_SetNext(BorderColor, slider_border_color);
|
||||||
UI_SetNext(Border, 1);
|
UI_SetNext(Border, 1);
|
||||||
UI_SetNext(Width, UI_PIX(marker_pos + half_marker_dims.x, 0));
|
UI_SetNext(Width, UI_PIX(marker_pos + half_marker_dims.x, 0));
|
||||||
UI_SetNext(Height, tweak_height);
|
UI_SetNext(Height, UI_PIX(tweak_size_px * 0.75, 1));
|
||||||
UI_BuildBox();
|
UI_BuildBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1682,11 +1682,12 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
UI_SetNext(BorderColor, slider_border_color);
|
UI_SetNext(BorderColor, slider_border_color);
|
||||||
UI_SetNext(Rounding, UI_RGROW(theme.rounding));
|
UI_SetNext(Rounding, UI_RGROW(theme.rounding));
|
||||||
UI_SetNext(Border, 1);
|
UI_SetNext(Border, 1);
|
||||||
UI_SetNext(Width, tweak_height);
|
UI_SetNext(Width, UI_PIX(tweak_size_px, 1));
|
||||||
UI_SetNext(Height, tweak_height);
|
UI_SetNext(Height, UI_PIX(tweak_size_px, 1));
|
||||||
// UI_SetNext(Anchor, UI_Region_Center);
|
// UI_SetNext(Anchor, UI_Region_Center);
|
||||||
UI_SetNext(FloatingPos, VEC2(marker_pos, 0));
|
// UI_SetNext(FloatingPos, VEC2(marker_pos, (marker_size_px * 0.5)));
|
||||||
UI_SetNext(Flags, UI_BoxFlag_Floating);
|
UI_SetNext(FloatingPos, VEC2(marker_pos, -marker_dims.y * 0.125));
|
||||||
|
UI_SetNext(Flags, UI_BoxFlag_Floating | UI_BoxFlag_NoFloatingClamp);
|
||||||
UI_BuildBoxEx(marker_key);
|
UI_BuildBoxEx(marker_key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user