Implemented view change and trash in file selector, and moved more file IO to SDL file IO

This commit is contained in:
Yousef Khadadeh 2026-04-23 20:56:11 +03:00
parent b81b33660e
commit 9ea5a1eae9
15 changed files with 585 additions and 203 deletions

View file

@ -0,0 +1,20 @@
#include "MutableTextLabel.hpp"
#include "../GUIManager.hpp"
namespace GUIStuff {
MutableTextLabel::MutableTextLabel(GUIManager& gui): Element(gui) {}
void MutableTextLabel::layout(const Clay_ElementId& id, const std::string& text, Clay_TextElementConfig* textConfig) {
if(text != oldText) {
oldText = text;
gui.invalidate_draw_element(this);
}
CLAY(id, {
.layout = {.sizing = {.width = CLAY_SIZING_FIT(0), .height = CLAY_SIZING_FIT(0)}}
}) {
CLAY_TEXT(gui.strArena.std_str_to_clay_str(text), textConfig);
}
}
}