summaryrefslogtreecommitdiff
path: root/src/gui/textcommandeditor.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-22 22:56:46 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-22 22:56:46 +0300
commitf9c0a11f184444b82e678b9aea4b14d3982d5201 (patch)
tree181e29a12dc5b7d56bef4a808a804b9cfe5717b9 /src/gui/textcommandeditor.cpp
parentf3405f599e202d06cfd7aa98559fd64df039242d (diff)
downloadmanaplus-f9c0a11f184444b82e678b9aea4b14d3982d5201.tar.gz
manaplus-f9c0a11f184444b82e678b9aea4b14d3982d5201.tar.bz2
manaplus-f9c0a11f184444b82e678b9aea4b14d3982d5201.tar.xz
manaplus-f9c0a11f184444b82e678b9aea4b14d3982d5201.zip
improve textcommandeditor.
Diffstat (limited to 'src/gui/textcommandeditor.cpp')
-rw-r--r--src/gui/textcommandeditor.cpp47
1 files changed, 17 insertions, 30 deletions
diff --git a/src/gui/textcommandeditor.cpp b/src/gui/textcommandeditor.cpp
index 7df02e704..7b3703cfb 100644
--- a/src/gui/textcommandeditor.cpp
+++ b/src/gui/textcommandeditor.cpp
@@ -22,9 +22,12 @@
#include "gui/textcommandeditor.h"
-#include <SDL.h>
-#include <SDL_thread.h>
-#include <algorithm>
+#include "configuration.h"
+#include "item.h"
+#include "localplayer.h"
+#include "main.h"
+#include "keyboardconfig.h"
+#include "spellmanager.h"
#include "gui/chatwindow.h"
@@ -38,17 +41,14 @@
#include "gui/widgets/radiobutton.h"
#include "gui/widgets/guitable.h"
-#include "configuration.h"
-#include "item.h"
-#include "localplayer.h"
-#include "main.h"
-#include "keyboardconfig.h"
-#include "spellmanager.h"
-
#include "utils/gettext.h"
#include "resources/iteminfo.h"
+#include <SDL.h>
+#include <SDL_thread.h>
+#include <algorithm>
+
#include "debug.h"
class IconsModal final : public gcn::ListModel
@@ -68,7 +68,7 @@ public:
continue;
const ItemInfo &info = (*i->second);
- std::string name = info.getName();
+ const std::string name = info.getName();
if (name != "unnamed" && !info.getName().empty()
&& info.getName() != "unnamed")
{
@@ -86,12 +86,12 @@ public:
virtual ~IconsModal()
{ }
- virtual int getNumberOfElements()
+ virtual int getNumberOfElements() override
{
return static_cast<int>(mStrings.size());
}
- virtual std::string getElementAt(int i)
+ virtual std::string getElementAt(int i) override
{
if (i < 0 || i >= getNumberOfElements())
return "???";
@@ -134,12 +134,12 @@ public:
virtual ~TargetTypeModel()
{ }
- virtual int getNumberOfElements()
+ virtual int getNumberOfElements() override
{
return 3;
}
- virtual std::string getElementAt(int i)
+ virtual std::string getElementAt(int i) override
{
if (i >= getNumberOfElements() || i < 0)
return "???";
@@ -153,12 +153,12 @@ public:
virtual ~MagicSchoolModel()
{ }
- virtual int getNumberOfElements()
+ virtual int getNumberOfElements() override
{
return 6;
}
- virtual std::string getElementAt(int i)
+ virtual std::string getElementAt(int i) override
{
if (i >= getNumberOfElements() || i < 0)
return "???";
@@ -325,7 +325,6 @@ TextCommandEditor::~TextCommandEditor()
void TextCommandEditor::action(const gcn::ActionEvent &event)
{
const std::string &eventId = event.getId();
-
if (eventId == "magic")
{
mIsMagicCommand = true;
@@ -352,18 +351,6 @@ void TextCommandEditor::action(const gcn::ActionEvent &event)
}
}
-void TextCommandEditor::update()
-{
-}
-
-void TextCommandEditor::updateList()
-{
-}
-
-void TextCommandEditor::reset()
-{
-}
-
void TextCommandEditor::showControls(const bool show)
{
mManaField->setVisible(show);