Fix alpha for liquid nodes (#5494)
[oweals/minetest.git] / src / guiKeyChangeMenu.h
index b81866983bc6b5612de9ba2e3217b36d934c19c5..1aa4006324b0e1e1dbc87eef4d3de37848dea045 100644 (file)
@@ -1,8 +1,8 @@
 /*
- Minetest-c55
- Copyright (C) 2010-11 celeron55, Perttu Ahola <celeron55@gmail.com>
- Copyright (C) 2011 Ciaran Gultnieks <ciaran@ciarang.com>
- Copyright (C) 2011 teddydestodes <derkomtur@schattengang.net>
+ Minetest
+ Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
+ Copyright (C) 2013 Ciaran Gultnieks <ciaran@ciarang.com>
+ Copyright (C) 2013 teddydestodes <derkomtur@schattengang.net>
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License as published by
 #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
+class GUIKeyChangeMenu : public GUIModalMenu
 {
 public:
-       GUIKeyChangeMenu(gui::IGUIEnvironment* env, gui::IGUIElement* parent,
-                       s32 id, IMenuManager *menumgr);
+       GUIKeyChangeMenu(gui::IGUIEnvironment *env, gui::IGUIElement *parent, s32 id,
+                       IMenuManager *menumgr);
        ~GUIKeyChangeMenu();
 
        void removeChildren();
@@ -56,22 +56,22 @@ public:
 
        bool acceptInput();
 
-       bool OnEvent(const SEventevent);
+       bool OnEvent(const SEvent &event);
 
 private:
-
        void init_keys();
 
        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;
 
        s32 activeKey;
-       
+
        std::vector<KeyPress> key_used;
        gui::IGUIStaticText *key_used_text;
        std::vector<key_setting *> key_settings;
 };
 
 #endif
-