summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/graphics/gui/Makefile.am1
-rw-r--r--data/graphics/gui/emotions.pngbin19386 -> 0 bytes
-rw-r--r--po/POTFILES.in1
-rw-r--r--src/Makefile.am20
-rw-r--r--src/being.cpp5
-rw-r--r--src/gui/smileycontainer.cpp26
-rw-r--r--src/gui/smileycontainer.h8
-rw-r--r--src/gui/smileyshortcutcontainer.cpp6
-rw-r--r--src/gui/smileywindow.cpp14
-rw-r--r--src/gui/smileywindow.h2
10 files changed, 42 insertions, 41 deletions
diff --git a/data/graphics/gui/Makefile.am b/data/graphics/gui/Makefile.am
index 32028bfd..b2c499f0 100644
--- a/data/graphics/gui/Makefile.am
+++ b/data/graphics/gui/Makefile.am
@@ -11,7 +11,6 @@ gui_DATA = \
close_button.png \
deepbox.png \
default.png \
- emotions.png \
gui.xml \
hits_blue.png \
hits_red.png \
diff --git a/data/graphics/gui/emotions.png b/data/graphics/gui/emotions.png
deleted file mode 100644
index 146f2d24..00000000
--- a/data/graphics/gui/emotions.png
+++ /dev/null
Binary files differ
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 11bb6aa0..1816a886 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -38,5 +38,6 @@ src/gui/trade.cpp
src/gui/updatewindow.cpp
src/net/playerhandler.cpp
src/resources/itemdb.cpp
+src/being.cpp
src/game.cpp
src/main.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index d267022b..e189b793 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -47,20 +47,10 @@ aethyra_SOURCES = gui/widgets/dropdown.cpp \
gui/inttextbox.cpp \
gui/inventorywindow.cpp \
gui/inventorywindow.h \
- gui/smileywindow.cpp \
- gui/smileywindow.h \
- gui/smileycontainer.cpp \
- gui/smileycontainer.h \
gui/itemcontainer.cpp \
gui/itemcontainer.h \
gui/itemshortcutcontainer.cpp \
gui/itemshortcutcontainer.h \
- gui/shortcutwindow.cpp \
- gui/shortcutwindow.h \
- gui/smileyshortcutcontainer.cpp \
- gui/smileyshortcutcontainer.h \
- gui/shortcutcontainer.cpp \
- gui/shortcutcontainer.h \
gui/item_amount.cpp \
gui/item_amount.h \
gui/linkhandler.h \
@@ -119,10 +109,20 @@ aethyra_SOURCES = gui/widgets/dropdown.cpp \
gui/shop.h \
gui/shoplistbox.cpp \
gui/shoplistbox.h \
+ gui/shortcutwindow.cpp \
+ gui/shortcutwindow.h \
+ gui/shortcutcontainer.cpp \
+ gui/shortcutcontainer.h \
gui/skill.cpp \
gui/skill.h \
gui/slider.cpp \
gui/slider.h \
+ gui/smileycontainer.cpp \
+ gui/smileycontainer.h \
+ gui/smileyshortcutcontainer.cpp \
+ gui/smileyshortcutcontainer.h \
+ gui/smileywindow.cpp \
+ gui/smileywindow.h \
gui/speechbubble.cpp \
gui/speechbubble.h \
gui/status.cpp \
diff --git a/src/being.cpp b/src/being.cpp
index ba3107db..5eb62b2d 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -44,6 +44,7 @@
#include "gui/speechbubble.h"
#include "utils/dtor.h"
+#include "utils/gettext.h"
#include "utils/tostring.h"
#include "utils/xml.h"
@@ -91,8 +92,8 @@ Being::Being(int id, int job, Map *map):
{
// Load the emotion set
ResourceManager *rm = ResourceManager::getInstance();
- emotionSet = rm->getImageSet("graphics/gui/emotions.png", 30, 32);
- if (!emotionSet) logger->error("Unable to load emotions!");
+ emotionSet = rm->getImageSet("graphics/sprites/emotions.png", 30, 32);
+ if (!emotionSet) logger->error(_("Unable to load emotions"));
// Hairstyles are encoded as negative numbers. Count how far negative we can go.
int hairstyles = 1;
diff --git a/src/gui/smileycontainer.cpp b/src/gui/smileycontainer.cpp
index d221f55c..f8f57c45 100644
--- a/src/gui/smileycontainer.cpp
+++ b/src/gui/smileycontainer.cpp
@@ -36,17 +36,17 @@
#include "../utils/gettext.h"
#include "../utils/tostring.h"
-const int SmileyContainer::gridWidth = 34; // item icon width + 4
-const int SmileyContainer::gridHeight = 36; // item icon height + 4
+const int SmileyContainer::gridWidth = 34; // emote icon width + 4
+const int SmileyContainer::gridHeight = 36; // emote icon height + 4
-static const int NO_ITEM = -1;
+static const int NO_EMOTE = -1;
SmileyContainer::SmileyContainer():
- mSelectedItemIndex(NO_ITEM)
+ mSelectedEmoteIndex(NO_EMOTE)
{
ResourceManager *resman = ResourceManager::getInstance();
- mSmileyImg = resman->getImageSet("graphics/gui/emotions.png",30,32);
+ mSmileyImg = resman->getImageSet("graphics/sprites/emotions.png", 30, 32);
if (!mSmileyImg) logger->error(_("Unable to load emotions"));
mSelImg = resman->getImage("graphics/gui/selection.png");
@@ -95,7 +95,7 @@ void SmileyContainer::draw(gcn::Graphics *graphics)
mSmileyImg->get(i), itemX, itemY);
// Draw selection image below selected item
- if (mSelectedItemIndex == i)
+ if (mSelectedEmoteIndex == i)
{
static_cast<Graphics*>(graphics)->drawImage(
mSelImg, itemX, itemY);
@@ -123,23 +123,23 @@ void SmileyContainer::recalculateHeight()
int SmileyContainer::getSelectedSmiley()
{
- if (mSelectedItemIndex == NO_ITEM)
+ if (mSelectedEmoteIndex == NO_EMOTE)
return 0;
- return 1+mSelectedItemIndex;
+ return 1+mSelectedEmoteIndex;
}
void SmileyContainer::selectNone()
{
- setSelectedItemIndex(NO_ITEM);
+ setSelectedEmoteIndex(NO_EMOTE);
}
-void SmileyContainer::setSelectedItemIndex(int index)
+void SmileyContainer::setSelectedEmoteIndex(int index)
{
if (index < 0 || index >= mMaxSmiley )
- mSelectedItemIndex = NO_ITEM;
+ mSelectedEmoteIndex = NO_EMOTE;
else
- mSelectedItemIndex = index;
+ mSelectedEmoteIndex = index;
}
void SmileyContainer::distributeValueChangedEvent()
@@ -165,7 +165,7 @@ void SmileyContainer::mousePressed(gcn::MouseEvent &event)
int index = mx / gridWidth + ((my / gridHeight) * columns);
if (index <mMaxSmiley)
{
- setSelectedItemIndex(index);
+ setSelectedEmoteIndex(index);
smileyShortcut->setSmileySelected(index+1);
}
}
diff --git a/src/gui/smileycontainer.h b/src/gui/smileycontainer.h
index ddfe9ec5..88ca0b48 100644
--- a/src/gui/smileycontainer.h
+++ b/src/gui/smileycontainer.h
@@ -33,7 +33,7 @@
class Image;
class Inventory;
-class Item;
+class Emote;
namespace gcn {
class SelectionListener;
@@ -107,12 +107,12 @@ class SmileyContainer : public gcn::Widget,
* Sets the currently selected item. Invalid (e.g., negative) indices set `no item'.
*/
- void setSelectedItemIndex(int index);
+ void setSelectedEmoteIndex(int index);
/**
* Find the current item index by the most recently used item ID
*/
- void refindSelectedItem(void);
+ void refindSelectedEmote(void);
/**
* Determine and set the height of the container.
@@ -126,7 +126,7 @@ class SmileyContainer : public gcn::Widget,
ImageSet *mSmileyImg;
Image *mSelImg;
- int mSelectedItemIndex;
+ int mSelectedEmoteIndex;
int mMaxSmiley;
diff --git a/src/gui/smileyshortcutcontainer.cpp b/src/gui/smileyshortcutcontainer.cpp
index 6028939f..c3cd056d 100644
--- a/src/gui/smileyshortcutcontainer.cpp
+++ b/src/gui/smileyshortcutcontainer.cpp
@@ -41,15 +41,15 @@ SmileyShortcutContainer::SmileyShortcutContainer():
mSmileyClicked(false),
mSmileyMoved(0)
{
- mGridWidth=1,
- mGridHeight=1,
+ mGridWidth = 1,
+ mGridHeight = 1,
addMouseListener(this);
addWidgetListener(this);
ResourceManager *resman = ResourceManager::getInstance();
mBackgroundImg = resman->getImage("graphics/gui/item_shortcut_bgr.png");
- mSmileyImg = resman->getImageSet("graphics/gui/emotions.png",30,32);
+ mSmileyImg = resman->getImageSet("graphics/sprites/emotions.png", 30, 32);
if (!mSmileyImg) logger->error(_("Unable to load emotions"));
mMaxItems = smileyShortcut->getSmileyCount();
diff --git a/src/gui/smileywindow.cpp b/src/gui/smileywindow.cpp
index 570eb45c..e3e821ff 100644
--- a/src/gui/smileywindow.cpp
+++ b/src/gui/smileywindow.cpp
@@ -45,10 +45,10 @@ SmileyWindow::SmileyWindow():
mUseButton = new Button(_("Use"), "use", this);
- mItems = new SmileyContainer();
- mItems->addSelectionListener(this);
+ mEmotes = new SmileyContainer();
+ mEmotes->addSelectionListener(this);
- mInvenScroll = new ScrollArea(mItems);
+ mInvenScroll = new ScrollArea(mEmotes);
mInvenScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
draw();
@@ -63,12 +63,12 @@ SmileyWindow::SmileyWindow():
void SmileyWindow::action(const gcn::ActionEvent &event)
{
- int item = mItems->getSelectedSmiley();
+ int emote = mEmotes->getSelectedSmiley();
- if (!item)
+ if (!emote)
return;
- player_node->emote(item);
+ player_node->emote(emote);
}
@@ -95,5 +95,5 @@ void SmileyWindow::widgetResized(const gcn::Event &event)
int SmileyWindow::getSelectedSmiley() const
{
- return mItems->getSelectedSmiley();
+ return mEmotes->getSelectedSmiley();
}
diff --git a/src/gui/smileywindow.h b/src/gui/smileywindow.h
index 81ec6663..db27fcbd 100644
--- a/src/gui/smileywindow.h
+++ b/src/gui/smileywindow.h
@@ -69,7 +69,7 @@ class SmileyWindow : public Window, gcn::ActionListener,
private:
- SmileyContainer *mItems;
+ SmileyContainer *mEmotes;
gcn::Button *mUseButton;
gcn::ScrollArea *mInvenScroll;