mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-13 05:15:28 +01:00
Add setting callbacks for Camera and TouchControls (#15700)
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user