ManaPlus
setup_quick.cpp
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2009 The Mana World Development Team
4  * Copyright (C) 2011-2019 The ManaPlus Developers
5  * Copyright (C) 2009-2021 Andrei Karas
6  *
7  * This file is part of The ManaPlus 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 
24 
25 #include "gamemodifiers.h"
26 
27 #include "gui/models/namesmodel.h"
28 
32 #include "gui/widgets/scrollarea.h"
33 
34 #include "utils/delete2.h"
35 #include "utils/gettext.h"
36 
37 #include "debug.h"
38 
39 Setup_Quick::Setup_Quick(const Widget2 *const widget) :
40  SetupTabScroll(widget),
41  mMoveTypeList(new NamesModel),
42  mCrazyMoveTypeList(new NamesModel)
43 {
44  // TRANSLATORS: quick tab in settings
45  setName(_("Quick"));
46 
47  LayoutHelper h(this);
48  ContainerPlacer place = h.getPlacer(0, 0);
49  place(0, 0, mScroll, 10, 10);
50 
51  new SetupQuickItem("", this, "moveTypeEvent",
54 
55  new SetupQuickItem("", this, "crazyMoveTypeEvent",
58 
59  new SetupQuickItem("", this, "moveToTargetTypeEvent",
62 
63  new SetupQuickItem("", this, "followModeEvent",
66 
67  new SetupQuickItem("", this, "attackWeaponTypeEvent",
70 
71  new SetupQuickItem("", this, "attackTypeEvent",
74 
75  new SetupQuickItem("", this, "magicAttackTypeEvent",
78 
79  new SetupQuickItem("", this, "pvpAttackTypeEvent",
82 
83  new SetupQuickItem("", this, "quickDropCounterEvent",
86 
87  new SetupQuickItem("", this, "pickUpTypeEvent",
90 
91  new SetupQuickItem("", this, "mapDrawTypeEvent",
94 
95  new SetupQuickItem("", this, "imitationModeEvent",
98 
99  new SetupQuickItem("", this, "CameraModeEvent",
102 
103  new SetupQuickItem("", this, "awayModeEvent",
106 
107  new SetupQuickItem("", this, "targetingTypeEvent",
110 
111  setDimension(Rect(0, 0, 550, 350));
112 }
113 
115 {
118 }
static std::string getPickUpTypeString()
static std::string getMoveToTargetTypeString()
static void changeImitationMode(const bool forward)
static void changePickUpType(const bool forward)
static std::string getQuickDropCounterString()
static std::string getAttackTypeString()
static std::string getMagicAttackTypeString()
static void changeCameraMode(const bool forward)
static void changeAttackWeaponType(const bool forward)
static void changeAttackType(const bool forward)
static void changeTargetingType(const bool forward)
static std::string getMoveTypeString()
static void changeFollowMode(const bool forward)
static std::string getCrazyMoveTypeString()
static void changeQuickDropCounter(const bool forward)
static void changeMoveType(const bool forward)
static void changePvpAttackType(const bool forward)
static void changeMoveToTargetType(const bool forward)
static void changeCrazyMoveType(const bool forward)
static void changeAwayMode(const bool forward)
static void changeMagicAttackType(const bool forward)
static void changeMapDrawType(const bool forward)
static std::string getTargetingTypeString()
static std::string getAwayModeString()
static std::string getCameraModeString()
static std::string getFollowModeString()
static std::string getAttackWeaponTypeString()
static std::string getPvpAttackTypeString()
static std::string getMapDrawTypeString()
static std::string getImitationModeString()
ContainerPlacer getPlacer(const int x, const int y)
Definition: rect.h:74
ScrollArea * mScroll
void setName(const std::string &name)
Definition: setuptab.h:68
NamesModel * mMoveTypeList
Definition: setup_quick.h:40
Setup_Quick(const Widget2 *const widget)
Definition: setup_quick.cpp:39
NamesModel * mCrazyMoveTypeList
Definition: setup_quick.h:42
void setDimension(const Rect &dimension)
Definition: widget.cpp:169
#define new
Definition: debug_new.h:147
#define delete2(var)
Definition: delete2.h:25
#define _(s)
Definition: gettext.h:35