X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcontrol%2Fkeyboard_manager.hpp;h=9ddaba308a7d103325f8fe471bc3c9703f8454dd;hb=2ac55fe1293cf5c6b9927c926826da259cf640ea;hp=15d804352eea4e5f9187b2a77971e67060320b45;hpb=b26a4e8ac7eedb0def71d2a0d9b0b4b2c2d42cc9;p=supertux.git diff --git a/src/control/keyboard_manager.hpp b/src/control/keyboard_manager.hpp index 15d804352..9ddaba308 100644 --- a/src/control/keyboard_manager.hpp +++ b/src/control/keyboard_manager.hpp @@ -1,6 +1,6 @@ // SuperTux // Copyright (C) 2006 Matthias Braun , -// 2007-2014 Ingo Ruhnke +// 2007-2014 Ingo Ruhnke // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -26,16 +26,20 @@ #include "util/reader_fwd.hpp" #include "util/writer_fwd.hpp" -class JoystickKeyboardController; +class InputManager; +class KeyboardConfig; class KeyboardManager final { private: - friend class KeyboardMenu; - typedef std::map KeyMap; + InputManager* m_parent; + KeyboardConfig& m_keyboard_config; public: - KeyboardManager(JoystickKeyboardController* parent); + int wait_for_key; + +public: + KeyboardManager(InputManager* parent, KeyboardConfig& keyboard_config); ~KeyboardManager(); void process_key_event(const SDL_KeyboardEvent& event); @@ -43,18 +47,6 @@ public: void process_console_key_event(const SDL_KeyboardEvent& event); void process_menu_key_event(const SDL_KeyboardEvent& event); - SDL_Keycode reversemap_key(Controller::Control c); - void bind_key(SDL_Keycode key, Controller::Control c); - - void read(const lisp::Lisp* keymap_lisp); - void write(Writer& writer); - -private: - JoystickKeyboardController* m_parent; - KeyMap keymap; - bool jump_with_up_kbd; - int wait_for_key; - private: KeyboardManager(const KeyboardManager&) = delete; KeyboardManager& operator=(const KeyboardManager&) = delete;