increase ui scale snap epsilon
This commit is contained in:
parent
285fd64989
commit
31b277d8f7
@ -1292,11 +1292,7 @@ void V_TickForever(WaveLaneCtx *lane)
|
||||
|
||||
V_Palette *palette = &frame->palette;
|
||||
{
|
||||
f32 palette_ease = 30.0 * frame->dt;
|
||||
if (TweakBool(Lit("Slow palette ease"), 0))
|
||||
{
|
||||
palette_ease = 1.0 * frame->dt;
|
||||
}
|
||||
f32 palette_ease = TweakFloat(Lit("Command palette ease"), 30, 1, 100) * frame->dt;
|
||||
palette->show = LerpF32(palette->show, palette->pref_show, palette_ease);
|
||||
}
|
||||
if (palette->show > 0.001)
|
||||
@ -1474,13 +1470,17 @@ void V_TickForever(WaveLaneCtx *lane)
|
||||
}
|
||||
|
||||
Vec4 item_color = theme.window_background_color;
|
||||
item_color = LerpSrgb(item_color, theme.button_hot_color, item_rep.hot);
|
||||
Vec4 item_border_color = Zi;
|
||||
Vec4 item_border_color = item_color;
|
||||
if (item->flags & PaletteItemFlag_IsCmd)
|
||||
{
|
||||
item_color = LerpSrgb(item_color, theme.button_hot_color, item_rep.hot);
|
||||
item_color = LerpSrgb(item_color, theme.button_active_color, item_rep.active);
|
||||
item_border_color = LerpSrgb(item_border_color, theme.button_active_color, item_rep.hot);
|
||||
}
|
||||
else
|
||||
{
|
||||
item_border_color = LerpSrgb(item_border_color, theme.button_active_color, item_rep.hot);
|
||||
}
|
||||
|
||||
f32 item_size_px = UI_FNT(1.5, 1).v;
|
||||
f32 tweak_size_px = UI_FNT(1.25, 1).v;
|
||||
@ -1543,7 +1543,7 @@ void V_TickForever(WaveLaneCtx *lane)
|
||||
UI_SetNext(BackgroundColor, reset_bg_color);
|
||||
UI_SetNext(BorderColor, reset_border_color);
|
||||
UI_SetNext(Rounding, UI_RGROW(theme.rounding));
|
||||
UI_SetNext(Border, 2);
|
||||
UI_SetNext(Border, 1);
|
||||
UI_SetNext(Width, UI_FNT(1.25, 1));
|
||||
UI_SetNext(Height, UI_FNT(1.25, 1));
|
||||
UI_SetNext(Flags, UI_BoxFlag_Interactable);
|
||||
@ -1553,8 +1553,6 @@ void V_TickForever(WaveLaneCtx *lane)
|
||||
UI_PopCP(UI_TopCP());
|
||||
}
|
||||
|
||||
TweakFloat(Lit("Test"), 0, -50, 50);
|
||||
|
||||
switch (tweak_desc.kind)
|
||||
{
|
||||
// Boolean tweak
|
||||
@ -1581,7 +1579,7 @@ void V_TickForever(WaveLaneCtx *lane)
|
||||
UI_SetNext(BackgroundColor, cb_bg_color);
|
||||
UI_SetNext(BorderColor, cb_border_color);
|
||||
UI_SetNext(Rounding, UI_RGROW(theme.rounding));
|
||||
UI_SetNext(Border, 2);
|
||||
UI_SetNext(Border, 1);
|
||||
UI_SetNext(Width, UI_FNT(1.25, 1));
|
||||
UI_SetNext(Height, UI_FNT(1.25, 1));
|
||||
UI_SetNext(Flags, UI_BoxFlag_Interactable);
|
||||
|
||||
@ -1126,11 +1126,13 @@ void UI_EndFrame(UI_Frame *frame)
|
||||
{
|
||||
box->solved_scale = MulVec2Vec2(parent->solved_scale, box->solved_scale);
|
||||
}
|
||||
if (AbsF32(1.0 - box->solved_scale.x) < 0.0025)
|
||||
|
||||
f32 scale_snap = TweakFloat(Lit("UI scale snap"), 0.0050, 0, 0.01);
|
||||
if (AbsF32(1.0 - box->solved_scale.x) < scale_snap)
|
||||
{
|
||||
box->solved_scale.x = 1;
|
||||
}
|
||||
if (AbsF32(1.0 - box->solved_scale.y) < 0.0025)
|
||||
if (AbsF32(1.0 - box->solved_scale.y) < scale_snap)
|
||||
{
|
||||
box->solved_scale.y = 1;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user