Language settings menu

This commit is contained in:
MihailRis
2023-12-13 04:04:23 +03:00
parent e97eb441d5
commit 4de8759ea2
10 changed files with 104 additions and 33 deletions
+15
View File
@@ -87,6 +87,13 @@ wstring Button::text() const {
return L"";
}
Button* Button::textSupplier(wstringsupplier supplier) {
if (label) {
Label* label = (Label*)(this->label.get());
label->textSupplier(supplier);
}
return this;
}
void Button::drawBackground(Batch2D* batch, Assets* assets) {
vec2 coord = calcCoord();
batch->texture(nullptr);
@@ -112,6 +119,14 @@ Button* Button::listenAction(onaction action) {
return this;
}
void Button::textAlign(Align align) {
if (label) {
Label* label = (Label*)(this->label.get());
label->align(align);
refresh();
}
}
// ================================ TextBox ===================================
TextBox::TextBox(wstring placeholder, vec4 padding)
: Panel(vec2(200,32), padding, 0, false),