Language settings menu
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user