diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-26 21:40:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-27 02:22:56 +0300 |
commit | 3a19b08078d42837126cc585d2a9b6f5f61b2c2b (patch) | |
tree | 400122420df75e178cb7d52cfd2f67cd12d394a8 /src/input | |
parent | 4a6e5d83cd39dfde59d273b9be79cd76c685a8e9 (diff) | |
download | manaplus-3a19b08078d42837126cc585d2a9b6f5f61b2c2b.tar.gz manaplus-3a19b08078d42837126cc585d2a9b6f5f61b2c2b.tar.bz2 manaplus-3a19b08078d42837126cc585d2a9b6f5f61b2c2b.tar.xz manaplus-3a19b08078d42837126cc585d2a9b6f5f61b2c2b.zip |
Add quick shortcuts for add selected item to each craft inventory slot.
Add craft tab with shortcuts in input tab.
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/inputactionmap.h | 99 | ||||
-rw-r--r-- | src/input/pages/craft.cpp | 89 | ||||
-rw-r--r-- | src/input/pages/craft.h | 28 |
3 files changed, 216 insertions, 0 deletions
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index b187b63b0..f76e8cb53 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -5086,6 +5086,105 @@ static const InputActionData inputActionData "skill|useskill", UseArgs_true, Protected_false}, + {"keyCraftShortcut1", + emptyKey, + emptyKey, + Input::GRP_DEFAULT, + &Actions::craftKey, + InputAction::NO_VALUE, 100, + InputCondition::NOMODAL | InputCondition::NOAWAY + | InputCondition::NONPCINPUT, + "", + UseArgs_false, + Protected_true}, + {"keyCraftShortcut2", + emptyKey, + emptyKey, + Input::GRP_DEFAULT, + &Actions::craftKey, + InputAction::NO_VALUE, 100, + InputCondition::NOMODAL | InputCondition::NOAWAY + | InputCondition::NONPCINPUT, + "", + UseArgs_false, + Protected_true}, + {"keyCraftShortcut3", + emptyKey, + emptyKey, + Input::GRP_DEFAULT, + &Actions::craftKey, + InputAction::NO_VALUE, 100, + InputCondition::NOMODAL | InputCondition::NOAWAY + | InputCondition::NONPCINPUT, + "", + UseArgs_false, + Protected_true}, + {"keyCraftShortcut4", + emptyKey, + emptyKey, + Input::GRP_DEFAULT, + &Actions::craftKey, + InputAction::NO_VALUE, 100, + InputCondition::NOMODAL | InputCondition::NOAWAY + | InputCondition::NONPCINPUT, + "", + UseArgs_false, + Protected_true}, + {"keyCraftShortcut5", + emptyKey, + emptyKey, + Input::GRP_DEFAULT, + &Actions::craftKey, + InputAction::NO_VALUE, 100, + InputCondition::NOMODAL | InputCondition::NOAWAY + | InputCondition::NONPCINPUT, + "", + UseArgs_false, + Protected_true}, + {"keyCraftShortcut6", + emptyKey, + emptyKey, + Input::GRP_DEFAULT, + &Actions::craftKey, + InputAction::NO_VALUE, 100, + InputCondition::NOMODAL | InputCondition::NOAWAY + | InputCondition::NONPCINPUT, + "", + UseArgs_false, + Protected_true}, + {"keyCraftShortcut7", + emptyKey, + emptyKey, + Input::GRP_DEFAULT, + &Actions::craftKey, + InputAction::NO_VALUE, 100, + InputCondition::NOMODAL | InputCondition::NOAWAY + | InputCondition::NONPCINPUT, + "", + UseArgs_false, + Protected_true}, + {"keyCraftShortcut8", + emptyKey, + emptyKey, + Input::GRP_DEFAULT, + &Actions::craftKey, + InputAction::NO_VALUE, 100, + InputCondition::NOMODAL | InputCondition::NOAWAY + | InputCondition::NONPCINPUT, + "", + UseArgs_false, + Protected_true}, + {"keyCraftShortcut9", + emptyKey, + emptyKey, + Input::GRP_DEFAULT, + &Actions::craftKey, + InputAction::NO_VALUE, 100, + InputCondition::NOMODAL | InputCondition::NOAWAY + | InputCondition::NONPCINPUT, + "", + UseArgs_false, + Protected_true}, }; #undef defaultAction diff --git a/src/input/pages/craft.cpp b/src/input/pages/craft.cpp new file mode 100644 index 000000000..5b5bf0466 --- /dev/null +++ b/src/input/pages/craft.cpp @@ -0,0 +1,89 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2016 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "gui/setupactiondata.h" + +#include "utils/gettext.h" +#include "utils/stringutils.h" + +#include "debug.h" + +SetupActionData setupActionDataCraft[] = +{ + { + // TRANSLATORS: input action name + strprintf(N_("Craft shortcut %d"), 1), + InputAction::CRAFT_1, + "", + }, + { + // TRANSLATORS: input action name + strprintf(N_("Craft shortcut %d"), 2), + InputAction::CRAFT_2, + "", + }, + { + // TRANSLATORS: input action name + strprintf(N_("Craft shortcut %d"), 3), + InputAction::CRAFT_3, + "", + }, + { + // TRANSLATORS: input action name + strprintf(N_("Craft shortcut %d"), 4), + InputAction::CRAFT_4, + "", + }, + { + // TRANSLATORS: input action name + strprintf(N_("Craft shortcut %d"), 5), + InputAction::CRAFT_5, + "", + }, + { + // TRANSLATORS: input action name + strprintf(N_("Craft shortcut %d"), 6), + InputAction::CRAFT_6, + "", + }, + { + // TRANSLATORS: input action name + strprintf(N_("Craft shortcut %d"), 7), + InputAction::CRAFT_7, + "", + }, + { + // TRANSLATORS: input action name + strprintf(N_("Craft shortcut %d"), 8), + InputAction::CRAFT_8, + "", + }, + { + // TRANSLATORS: input action name + strprintf(N_("Craft shortcut %d"), 9), + InputAction::CRAFT_9, + "", + }, + { + "", + InputAction::NO_VALUE, + "" + }, +}; diff --git a/src/input/pages/craft.h b/src/input/pages/craft.h new file mode 100644 index 000000000..ef797f7a5 --- /dev/null +++ b/src/input/pages/craft.h @@ -0,0 +1,28 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2016 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef INPUT_PAGES_CRAFT_H +#define INPUT_PAGES_CRAFT_H + +#include "gui/setupactiondata.h" + +extern SetupActionData setupActionDataCraft[]; + +#endif // INPUT_PAGES_CRAFT_H |