styling
This commit is contained in:
parent
d627409f30
commit
39a8656e4a
@ -628,8 +628,9 @@ V_WidgetTheme V_GetWidgetTheme(void)
|
|||||||
theme.col.button_active = Rgb32(0x0078a6);
|
theme.col.button_active = Rgb32(0x0078a6);
|
||||||
theme.col.button_selected = Rgb32(0x00668D);
|
theme.col.button_selected = Rgb32(0x00668D);
|
||||||
|
|
||||||
theme.col.positive = VEC4(0.25, 0.5, 0.25, 1);
|
theme.col.positive = VEC4(0.25, 0.50, 0.25, 1);
|
||||||
theme.col.negative = VEC4(0.5, 0.25, 0.25, 1);
|
theme.col.negative = VEC4(0.50, 0.25, 0.25, 1);
|
||||||
|
theme.col.warn = VEC4(0.60, 0.60, 0.25, 1);
|
||||||
|
|
||||||
theme.col.text = Rgb32(0xffdddee0);
|
theme.col.text = Rgb32(0xffdddee0);
|
||||||
// theme.col.hint = Rgb32(0xff71767f);
|
// theme.col.hint = Rgb32(0xff71767f);
|
||||||
@ -5467,6 +5468,7 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
|
|
||||||
//- Build profiler
|
//- Build profiler
|
||||||
UI_Key profiler_box = UI_KeyF("profiler");
|
UI_Key profiler_box = UI_KeyF("profiler");
|
||||||
|
ProfZoneDF("Build profiler")
|
||||||
UI_SetDF(Tag, profiler_box.v)
|
UI_SetDF(Tag, profiler_box.v)
|
||||||
UI_SetDF(Parent, profiler_box)
|
UI_SetDF(Parent, profiler_box)
|
||||||
{
|
{
|
||||||
@ -5687,7 +5689,7 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
// u64 zone_idx = 0;
|
// u64 zone_idx = 0;
|
||||||
u64 depth = 0;
|
u64 depth = 0;
|
||||||
|
|
||||||
for (u64 sample_seq = 0; sample_seq < samples_end_seq; ++sample_seq)
|
for (u64 sample_seq = samples_start_seq; sample_seq < samples_end_seq; ++sample_seq)
|
||||||
{
|
{
|
||||||
ProfSample *sample = &samples[sample_seq % ProfTrackSamplesCap];
|
ProfSample *sample = &samples[sample_seq % ProfTrackSamplesCap];
|
||||||
|
|
||||||
@ -5743,6 +5745,7 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
zone_track->zone_rows = PushStructs(frame->arena, V_ZoneRow, zone_track->zone_rows_count);
|
zone_track->zone_rows = PushStructs(frame->arena, V_ZoneRow, zone_track->zone_rows_count);
|
||||||
for (V_ZoneDesc *zone = zone_track->first_zone; zone; zone = zone->next)
|
for (V_ZoneDesc *zone = zone_track->first_zone; zone; zone = zone->next)
|
||||||
{
|
{
|
||||||
|
// FIXME: Large depth
|
||||||
V_ZoneRow *row = &zone_track->zone_rows[zone->depth];
|
V_ZoneRow *row = &zone_track->zone_rows[zone->depth];
|
||||||
row->count += 1;
|
row->count += 1;
|
||||||
DllQueuePushNP(row->first_zone, row->last_zone, zone, next_in_row, prev_in_row);
|
DllQueuePushNP(row->first_zone, row->last_zone, zone, next_in_row, prev_in_row);
|
||||||
@ -6027,6 +6030,10 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//- Timeline tooltop
|
//- Timeline tooltop
|
||||||
|
{
|
||||||
|
b32 show_ruler_time = is_measuring && ruler_len_ns != 0;
|
||||||
|
b32 show_hovered_zone = hovered_zone != 0;
|
||||||
|
if (show_ruler_time || show_hovered_zone)
|
||||||
{
|
{
|
||||||
UI_Key tooltip_box = UI_KeyF("tooltip");
|
UI_Key tooltip_box = UI_KeyF("tooltip");
|
||||||
Vec2 tooltip_pos = SubVec2(frame->screen_cursor, UI_Anchor(main_box));
|
Vec2 tooltip_pos = SubVec2(frame->screen_cursor, UI_Anchor(main_box));
|
||||||
@ -6065,13 +6072,14 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
{
|
{
|
||||||
UI_BuildSpacer(window_padding, Axis_Y);
|
UI_BuildSpacer(window_padding, Axis_Y);
|
||||||
|
|
||||||
if (is_measuring && ruler_len_ns != 0)
|
if (show_ruler_time)
|
||||||
{
|
{
|
||||||
UI_SetNext(TextColor, theme.col.positive);
|
// UI_SetNext(TextColor, theme.col.positive);
|
||||||
|
// UI_SetNext(TextColor, theme.col.button_active);
|
||||||
UI_BuildLabelF("%F", FmtTimeNs(ruler_len_ns, .p = 3));
|
UI_BuildLabelF("%F", FmtTimeNs(ruler_len_ns, .p = 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hovered_zone)
|
if (show_hovered_zone)
|
||||||
{
|
{
|
||||||
V_ZoneDesc *zone = hovered_zone;
|
V_ZoneDesc *zone = hovered_zone;
|
||||||
// UI_BuildLabelF("Hi!!");
|
// UI_BuildLabelF("Hi!!");
|
||||||
@ -6096,6 +6104,7 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// UI_BuildSpacer(window_padding, Axis_Y);
|
// UI_BuildSpacer(window_padding, Axis_Y);
|
||||||
|
|
||||||
@ -6104,13 +6113,22 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
UI_SetDF(ChildAlignment, UI_Region_Center)
|
UI_SetDF(ChildAlignment, UI_Region_Center)
|
||||||
UI_SetDF(Parent, UI_BuildRow())
|
UI_SetDF(Parent, UI_BuildRow())
|
||||||
{
|
{
|
||||||
UI_BuildSpacer(UI_Grow(1, 0), Axis_X);
|
if (IsUnoptimized)
|
||||||
|
|
||||||
if (do_break)
|
|
||||||
{
|
{
|
||||||
UI_ForceNext(DebugBreakFlags, UI_DebugBreakFlag_PrepLayout);
|
UI_SetDF(Width, UI_Shrink(0, 1))
|
||||||
|
UI_SetDF(Height, UI_Shrink(0, 1))
|
||||||
|
UI_SetDF(ChildAlignment, UI_Region_Left)
|
||||||
|
UI_SetDF(TextColor, theme.col.warn)
|
||||||
|
UI_SetDF(Parent, UI_BuildRow())
|
||||||
|
{
|
||||||
|
// UI_BuildIcon(theme.icon_font, UI_Icon_Warning);
|
||||||
|
UI_BuildIcon(theme.icon_font, UI_Icon_Info);
|
||||||
|
UI_BuildLabelF(" Profiling an unoptimized build");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Right side text
|
||||||
|
UI_BuildSpacer(UI_Grow(1, 0), Axis_X);
|
||||||
UI_SetNext(Opacity, UI_Hot(main_box));
|
UI_SetNext(Opacity, UI_Hot(main_box));
|
||||||
UI_BuildLabelF("%Fs", FmtFloat(SecondsFromNs(profiler->cursor_ns), .p = 3));
|
UI_BuildLabelF("%Fs", FmtFloat(SecondsFromNs(profiler->cursor_ns), .p = 3));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -67,6 +67,7 @@ Struct(V_WidgetTheme)
|
|||||||
|
|
||||||
Vec4 positive;
|
Vec4 positive;
|
||||||
Vec4 negative;
|
Vec4 negative;
|
||||||
|
Vec4 warn;
|
||||||
|
|
||||||
Vec4 text;
|
Vec4 text;
|
||||||
Vec4 hint;
|
Vec4 hint;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user