Fixed clay ID error

This commit is contained in:
Yousef Khadadeh 2026-03-03 12:11:11 +03:00
parent 6effc6de56
commit 017102a2b1

View file

@ -1243,11 +1243,12 @@ void Toolbar::global_log() {
}) {
constexpr float DISPLAY_TIME = 8.0f;
constexpr float FADE_START_TIME = 7.0f;
int i = 0;
for(auto& logM : main.logMessages) {
logM.time.update_time_since();
if(logM.time < DISPLAY_TIME) {
float a = 1.0f - lerp_time<float>(logM.time, DISPLAY_TIME, FADE_START_TIME);
Clay_ElementId elemId = CLAY_ID_LOCAL("GLOBAL LOG");
Clay_ElementId elemId = CLAY_IDI_LOCAL("GLOBAL LOG", i++);
CLAY(elemId, {
.layout = {
.sizing = {.width = CLAY_SIZING_FIT(300), .height = CLAY_SIZING_FIT(0) },