1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 16:45:20 +02:00

Formspecs: Add state-selection to style elements (#9378)

This commit is contained in:
Hugues Ross
2020-04-11 16:39:30 -04:00
committed by GitHub
parent ba3587e776
commit f780bae05c
22 changed files with 462 additions and 325 deletions

View File

@@ -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;
}