Implemented view change and trash in file selector, and moved more file IO to SDL file IO
This commit is contained in:
parent
b81b33660e
commit
9ea5a1eae9
15 changed files with 585 additions and 203 deletions
20
src/GUIStuff/Elements/MutableTextLabel.cpp
Normal file
20
src/GUIStuff/Elements/MutableTextLabel.cpp
Normal 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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue