mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Move keybinding settings to (Lua-based) setting menu (#15791)
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include "guiButton.h"
|
||||
#include "guiButtonImage.h"
|
||||
#include "guiButtonItemImage.h"
|
||||
#include "guiButtonKey.h"
|
||||
#include "guiEditBoxWithScrollbar.h"
|
||||
#include "guiInventoryList.h"
|
||||
#include "guiItemImage.h"
|
||||
@@ -1025,8 +1026,16 @@ void GUIFormSpecMenu::parseButton(parserData* data, const std::string &element)
|
||||
if (data->type == "button_url" || data->type == "button_url_exit")
|
||||
spec.url = url;
|
||||
|
||||
GUIButton *e = GUIButton::addButton(Environment, rect, m_tsrc,
|
||||
data->current_parent, spec.fid, spec.flabel.c_str());
|
||||
GUIButton *e;
|
||||
|
||||
if (data->type == "button_key") {
|
||||
spec.ftype = f_Unknown;
|
||||
e = GUIButtonKey::addButton(Environment, rect, m_tsrc,
|
||||
data->current_parent, spec.fid, spec.flabel.c_str());
|
||||
} else {
|
||||
e = GUIButton::addButton(Environment, rect, m_tsrc,
|
||||
data->current_parent, spec.fid, spec.flabel.c_str());
|
||||
}
|
||||
|
||||
auto style = getStyleForElement(data->type, name, (data->type != "button") ? "button" : "");
|
||||
|
||||
@@ -2873,6 +2882,7 @@ const std::unordered_map<std::string, std::function<void(GUIFormSpecMenu*, GUIFo
|
||||
{"button_exit", &GUIFormSpecMenu::parseButton},
|
||||
{"button_url", &GUIFormSpecMenu::parseButton},
|
||||
{"button_url_exit", &GUIFormSpecMenu::parseButton},
|
||||
{"button_key", &GUIFormSpecMenu::parseButton},
|
||||
{"background", &GUIFormSpecMenu::parseBackground},
|
||||
{"background9", &GUIFormSpecMenu::parseBackground},
|
||||
{"tableoptions", &GUIFormSpecMenu::parseTableOptions},
|
||||
|
Reference in New Issue
Block a user