tweaking
This commit is contained in:
parent
1502645570
commit
a13697ac59
@ -340,9 +340,9 @@ void V_PushNotif(String msg)
|
||||
notif->time_ns = TimeNs();
|
||||
notif->datetime = LocalDateTime();
|
||||
notif->msg = PushString(perm, msg);
|
||||
if (V.last_notif)
|
||||
if (V.first_notif)
|
||||
{
|
||||
notif->seq = V.last_notif->seq + 1;
|
||||
notif->seq = V.first_notif->seq + 1;
|
||||
}
|
||||
SllQueuePushFront(V.first_notif, V.last_notif, notif);
|
||||
LogInfoF("Notif: %F", FmtString(notif->msg));
|
||||
@ -996,7 +996,8 @@ void V_TickForever(WaveLaneCtx *lane)
|
||||
|
||||
Vec2 pos = Zi;
|
||||
pos.x = 10;
|
||||
pos.y = frame->ui_dims.y * 0.5 - DimsFromRng2(notifs_rep.screen_rect).y * 0.5;
|
||||
// pos.y = frame->ui_dims.y * 0.5 - DimsFromRng2(notifs_rep.screen_rect).y * 0.5;
|
||||
pos.y = 10;
|
||||
|
||||
// Vec4 bg = VEC4(0, 0, 0, 0.25);
|
||||
Vec4 bg = VEC4(0, 0, 0, 0);
|
||||
@ -1038,11 +1039,25 @@ void V_TickForever(WaveLaneCtx *lane)
|
||||
String msg = StringF(
|
||||
frame->arena,
|
||||
"[%F:%F:%F] ",
|
||||
FmtUint(notif->datetime.hour, .z = 2),
|
||||
FmtUint(notif->datetime.hour % 12, .z = 2),
|
||||
FmtUint(notif->datetime.minute, .z = 2),
|
||||
FmtUint(notif->datetime.second, .z = 2)
|
||||
);
|
||||
UI_SetNext(TextColor, VEC4(0.5, 0.5, 0.5, 1));
|
||||
Vec4 col = UI_Top(TextColor);
|
||||
if (notif->seq % 2 == 0)
|
||||
{
|
||||
col.x = 0.55;
|
||||
col.y = 0.52;
|
||||
col.z = 0.49;
|
||||
}
|
||||
else
|
||||
{
|
||||
col.x = 0.49;
|
||||
col.y = 0.52;
|
||||
col.z = 0.55;
|
||||
}
|
||||
|
||||
UI_SetNext(TextColor, col);
|
||||
UI_SetNext(Text, msg);
|
||||
UI_SetNext(Flags, UI_BoxFlag_DrawText);
|
||||
UI_BuildRow();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user