mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Formspecs: Add state-selection to style elements (#9378)
This commit is contained in:
parent
ba3587e776
commit
f780bae05c
22 changed files with 462 additions and 325 deletions
|
@ -38,10 +38,12 @@ const int ID_cancel = 261;
|
|||
GUIPasswordChange::GUIPasswordChange(gui::IGUIEnvironment* env,
|
||||
gui::IGUIElement* parent, s32 id,
|
||||
IMenuManager *menumgr,
|
||||
Client* client
|
||||
Client* client,
|
||||
ISimpleTextureSource *tsrc
|
||||
):
|
||||
GUIModalMenu(env, parent, id, menumgr),
|
||||
m_client(client)
|
||||
m_client(client),
|
||||
m_tsrc(tsrc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -146,14 +148,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
|
|||
core::rect<s32> rect(0, 0, 100 * s, 30 * s);
|
||||
rect = rect + v2s32(size.X / 4 + 56 * s, ypos);
|
||||
text = wgettext("Change");
|
||||
GUIButton::addButton(Environment, rect, this, ID_change, text);
|
||||
GUIButton::addButton(Environment, rect, m_tsrc, this, ID_change, text);
|
||||
delete[] text;
|
||||
}
|
||||
{
|
||||
core::rect<s32> rect(0, 0, 100 * s, 30 * s);
|
||||
rect = rect + v2s32(size.X / 4 + 185 * s, ypos);
|
||||
text = wgettext("Cancel");
|
||||
GUIButton::addButton(Environment, rect, this, ID_cancel, text);
|
||||
GUIButton::addButton(Environment, rect, m_tsrc, this, ID_cancel, text);
|
||||
delete[] text;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue