mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
Language settings menu
This commit is contained in:
parent
e97eb441d5
commit
4de8759ea2
10 changed files with 104 additions and 33 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue