summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/listbox.cpp6
-rw-r--r--src/gui/widgets/listbox.h15
4 files changed, 3 insertions, 22 deletions
diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp
index f4a5449f..4df0c4b9 100644
--- a/src/gui/widgets/emoteshortcutcontainer.cpp
+++ b/src/gui/widgets/emoteshortcutcontainer.cpp
@@ -75,7 +75,7 @@ void EmoteShortcutContainer::draw(gcn::Graphics *graphics)
// Draw emote keyboard shortcut.
const char *key = SDL_GetKeyName(
- (SDL_Scancode) keyboard.getKeyValue(KeyboardConfig::KEY_EMOTE_1 + i));
+ keyboard.getKeyValue(KeyboardConfig::KEY_EMOTE_1 + i));
graphics->setColor(Theme::getThemeColor(Theme::TEXT));
g->drawText(key, emoteX + 2, emoteY + 2, gcn::Graphics::LEFT);
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index 6c57bd00..e6db7a0b 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -81,7 +81,7 @@ void ItemShortcutContainer::draw(gcn::Graphics *graphics)
// Draw item keyboard shortcut.
const char *key = SDL_GetKeyName(
- (SDL_Scancode) keyboard.getKeyValue(KeyboardConfig::KEY_SHORTCUT_1 + i));
+ keyboard.getKeyValue(KeyboardConfig::KEY_SHORTCUT_1 + i));
graphics->setColor(Theme::getThemeColor(Theme::TEXT));
g->drawText(key, itemX + 2, itemY + 2, gcn::Graphics::LEFT);
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp
index 8e2c8311..fc4d8a8e 100644
--- a/src/gui/widgets/listbox.cpp
+++ b/src/gui/widgets/listbox.cpp
@@ -39,10 +39,6 @@ ListBox::ListBox(gcn::ListModel *listModel):
{
}
-ListBox::~ListBox()
-{
-}
-
void ListBox::updateAlpha()
{
float alpha = std::max(config.getFloatValue("guialpha"),
@@ -81,7 +77,7 @@ void ListBox::draw(gcn::Graphics *graphics)
void ListBox::keyPressed(gcn::KeyEvent& keyEvent)
{
- gcn::Key key = keyEvent.getKey();
+ const gcn::Key key = keyEvent.getKey();
if (key.getValue() == Key::ENTER || key.getValue() == Key::SPACE)
{
diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h
index a453b618..d16256b1 100644
--- a/src/gui/widgets/listbox.h
+++ b/src/gui/widgets/listbox.h
@@ -38,18 +38,6 @@ class ListBox : public gcn::ListBox
public:
ListBox(gcn::ListModel *listModel);
- ~ListBox() override;
-
- /**
- * Sets the font to render the text in.
- *
- * @param font the font to use.
- */
- void setFont(gcn::Font *font)
- {
- mFont = font;
- }
-
/**
* Draws the list box.
*/
@@ -74,9 +62,6 @@ class ListBox : public gcn::ListBox
void mouseDragged(gcn::MouseEvent &event) override;
- private:
- gcn::Font *mFont;
-
protected:
static float mAlpha;
};