]> git.lizzy.rs Git - minetest.git/blobdiff - src/guiKeyChangeMenu.h
Remove `mathconstants.h` and use the correct way to get `M_PI` in MSVC. (#5072)
[minetest.git] / src / guiKeyChangeMenu.h
index 2b498676b2691d16d35e48f5bde4375d9bedf48b..19a07620d242c2804418b3c488dcddf2d062139f 100644 (file)
 #include <string>
 #include <vector>
 
-typedef struct {
+struct key_setting {
        int id;
-       wchar_t *button_name;
+       const wchar_t *button_name;
        KeyPress key;
        std::string setting_name;
        gui::IGUIButton *button;
-} key_setting;
+};
 
 
 class GUIKeyChangeMenu: public GUIModalMenu
@@ -64,7 +64,7 @@ class GUIKeyChangeMenu: public GUIModalMenu
 
        bool resetMenu();
 
-       void add_key(int id, std::string setting_name, std::string button_name);
+       void add_key(int id, const wchar_t *button_name, const std::string &setting_name);
 
        bool shift_down;