Mana
Loading...
Searching...
No Matches
setup_keyboard.h
Go to the documentation of this file.
1/*
2 * Custom keyboard shortcuts configuration
3 * Copyright (C) 2007 Joshua Langley <joshlangley@optusnet.com.au>
4 * Copyright (C) 2009 The Mana World Development Team
5 * Copyright (C) 2009-2012 The Mana Developers
6 *
7 * This file is part of The Mana Client.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 */
22
23#pragma once
24
25#include "guichanfwd.h"
26
28
29#include <guichan/actionlistener.hpp>
30
31class Setup_Keyboard : public SetupTab, public gcn::ActionListener
32{
33 public:
35
36 ~Setup_Keyboard() override;
37
38 void apply() override;
39 void cancel() override;
40
41 void action(const gcn::ActionEvent &event) override;
42
46 void refreshAssignedKey(int index);
47
51 void newKeyCallback(int index);
52
56 void refreshKeys();
57
61 void keyUnresolved();
62
63 private:
65 gcn::ListBox *mKeyList;
66
67 gcn::Button *mAssignKeyButton;
68 gcn::Button *mUnassignKeyButton;
69 gcn::Button *mMakeDefaultButton;
70
72};
The list model for key function list.
A container for the contents of a tab in the setup window.
Definition setuptab.h:32
void cancel() override
Called when the Cancel button is pressed in the setup window.
void keyUnresolved()
If a key function is unresolved, then this reverts it.
void newKeyCallback(int index)
The callback function when a new key has been pressed.
class KeyListModel * mKeyListModel
void refreshAssignedKey(int index)
Get an update on the assigned key.
gcn::Button * mMakeDefaultButton
void refreshKeys()
Shorthand method to update all the keys.
~Setup_Keyboard() override
gcn::ListBox * mKeyList
gcn::Button * mAssignKeyButton
bool mKeySetting
flag to check if key being set.
void action(const gcn::ActionEvent &event) override
void apply() override
Called when the Apply button is pressed in the setup window.
gcn::Button * mUnassignKeyButton