mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add setting callbacks for Camera and TouchControls (#15700)
This commit is contained in:
parent
b5e084c9a5
commit
41dfac96c1
6 changed files with 71 additions and 25 deletions
|
@ -23,10 +23,7 @@ GUITouchscreenLayout::GUITouchscreenLayout(gui::IGUIEnvironment* env,
|
|||
GUIModalMenu(env, parent, id, menumgr),
|
||||
m_tsrc(tsrc)
|
||||
{
|
||||
if (g_touchcontrols)
|
||||
m_layout = g_touchcontrols->getLayout();
|
||||
else
|
||||
m_layout = ButtonLayout::loadFromSettings();
|
||||
m_layout = ButtonLayout::loadFromSettings();
|
||||
|
||||
m_gui_help_text = grab_gui_element<IGUIStaticText>(Environment->addStaticText(
|
||||
L"", core::recti(), false, false, this, -1));
|
||||
|
@ -378,8 +375,6 @@ bool GUITouchscreenLayout::OnEvent(const SEvent& event)
|
|||
}
|
||||
|
||||
if (event.GUIEvent.Caller == m_gui_done_btn.get()) {
|
||||
if (g_touchcontrols)
|
||||
g_touchcontrols->applyLayout(m_layout);
|
||||
std::ostringstream oss;
|
||||
m_layout.serializeJson(oss);
|
||||
g_settings->set("touch_layout", oss.str());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue