diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-11-01 04:22:50 +0100 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-11-01 04:22:50 +0100 |
commit | a1e61f8446b7928d854a062f6494e75fe3fec9ab (patch) | |
tree | 953cba5593a49f818612f38de1149a2763a36aa8 /src/gui | |
parent | 79cb8fa1ca81440e21bcb186785d47c50a608e8e (diff) | |
parent | 8954a7ca0f70bbf167c9119d26c7bca8407e8da6 (diff) | |
download | mana-a1e61f8446b7928d854a062f6494e75fe3fec9ab.tar.gz mana-a1e61f8446b7928d854a062f6494e75fe3fec9ab.tar.bz2 mana-a1e61f8446b7928d854a062f6494e75fe3fec9ab.tar.xz mana-a1e61f8446b7928d854a062f6494e75fe3fec9ab.zip |
Merge github.com:mana/mana
Conflicts:
src/localplayer.cpp
src/net/manaserv/beinghandler.cpp
src/net/manaserv/charhandler.cpp
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/palette.h | 16 | ||||
-rw-r--r-- | src/gui/quitdialog.h | 4 | ||||
-rw-r--r-- | src/gui/setup_players.cpp | 7 | ||||
-rw-r--r-- | src/gui/setup_video.cpp | 4 | ||||
-rw-r--r-- | src/gui/specialswindow.h | 5 | ||||
-rw-r--r-- | src/gui/widgets/chattab.h | 1 | ||||
-rw-r--r-- | src/gui/widgets/dropdown.h | 4 | ||||
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 5 | ||||
-rw-r--r-- | src/gui/widgets/itemcontainer.h | 8 | ||||
-rw-r--r-- | src/gui/widgets/shopitems.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/spacer.h | 12 |
11 files changed, 30 insertions, 38 deletions
diff --git a/src/gui/palette.h b/src/gui/palette.h index 51cf7d5f..fcee670f 100644 --- a/src/gui/palette.h +++ b/src/gui/palette.h @@ -70,9 +70,9 @@ class Palette * * @return the requested color */ - inline const gcn::Color &getColor(int type, int alpha = 255) + const gcn::Color &getColor(int type, int alpha = 255) { - gcn::Color* col = &mColors[type].color; + gcn::Color *col = &mColors[type].color; col->a = alpha; return *col; } @@ -84,7 +84,7 @@ class Palette * * @return the gradient type of the color with the given index */ - inline GradientType getGradientType(int type) + GradientType getGradientType(int type) const { return mColors[type].grad; } @@ -96,7 +96,7 @@ class Palette * * @return the color char of the color with the given index */ - inline char getColorChar(int type) + char getColorChar(int type) const { return mColors[type].ch; } @@ -108,8 +108,8 @@ class Palette * * @return the gradient delay of the color with the given index */ - inline int getGradientDelay(int type) - { return mColors[type].delay; } + int getGradientDelay(int type) const + { return mColors[type].delay; } /** * Updates all colors, that are non-static. @@ -147,7 +147,7 @@ class Palette int delay; int committedDelay; - void set(int type, gcn::Color& color, GradientType grad, int delay) + void set(int type, gcn::Color &color, GradientType grad, int delay) { ColorElem::type = type; ColorElem::color = color; @@ -157,7 +157,7 @@ class Palette ColorElem::gradientIndex = rand(); } - inline int getRGB() + int getRGB() const { return (committedColor.r << 16) | (committedColor.g << 8) | committedColor.b; diff --git a/src/gui/quitdialog.h b/src/gui/quitdialog.h index 21fe2f8a..1571c7d1 100644 --- a/src/gui/quitdialog.h +++ b/src/gui/quitdialog.h @@ -41,9 +41,9 @@ class QuitDialog : public Window, public gcn::ActionListener, { public: /** - * Constructor + * Constructor. * - * @pointerToMe will be set to NULL when the QuitDialog is destroyed + * @param pointerToMe will be set to NULL when the QuitDialog is destroyed */ QuitDialog(QuitDialog **pointerToMe); diff --git a/src/gui/setup_players.cpp b/src/gui/setup_players.cpp index 6fab8bd2..e9faaf3a 100644 --- a/src/gui/setup_players.cpp +++ b/src/gui/setup_players.cpp @@ -131,15 +131,14 @@ public: signalBeforeUpdate(); freeWidgets(); - std::vector<std::string> *player_names = player_relations.getPlayers(); if (mPlayers) delete mPlayers; - mPlayers = player_names; + mPlayers = player_relations.getPlayers(); // set up widgets - for (unsigned int r = 0; r < player_names->size(); ++r) + for (unsigned int r = 0; r < mPlayers->size(); ++r) { - std::string name = (*player_names)[r]; + std::string name = (*mPlayers)[r]; gcn::Widget *widget = new Label(name); mWidgets.push_back(widget); diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index d72b402b..ea5dc140 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -301,7 +301,7 @@ void Setup_Video::apply() * See http://libsdl.org/cgi/docwiki.cgi/SDL_SetVideoMode */ -#if defined(WIN32) || defined(__APPLE__) +#if defined(_WIN32) || defined(__APPLE__) // checks for opengl usage if (!config.getBoolValue("opengl")) { @@ -327,7 +327,7 @@ void Setup_Video::apply() logger->error(errorMessage.str()); } } -#if defined(WIN32) || defined(__APPLE__) +#if defined(_WIN32) || defined(__APPLE__) } else { diff --git a/src/gui/specialswindow.h b/src/gui/specialswindow.h index b440ce13..9917acc2 100644 --- a/src/gui/specialswindow.h +++ b/src/gui/specialswindow.h @@ -38,7 +38,8 @@ class TabbedArea; struct SpecialEntry; -class SpecialsWindow : public Window, public gcn::ActionListener { +class SpecialsWindow : public Window, public gcn::ActionListener +{ public: SpecialsWindow(); @@ -51,7 +52,7 @@ class SpecialsWindow : public Window, public gcn::ActionListener { void draw(gcn::Graphics *graphics); - bool hasSpecials() + bool hasSpecials() const { return !mEntries.empty(); } private: diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h index 6d262e11..bc139079 100644 --- a/src/gui/widgets/chattab.h +++ b/src/gui/widgets/chattab.h @@ -45,7 +45,6 @@ class ChatTab : public Tab, public AutoCompleteLister * * @param line Text message. * @param own Type of message (usually the owner-type). - * @param channelName which channel to send the message to. * @param ignoreRecord should this not be recorded? */ void chatLog(std::string line, Own own = BY_SERVER, diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h index e0cfd0d7..c7b3cdb1 100644 --- a/src/gui/widgets/dropdown.h +++ b/src/gui/widgets/dropdown.h @@ -41,9 +41,7 @@ class DropDown : public gcn::DropDown * Contructor. * * @param listModel the ListModel to use. - * @param scrollArea the ScrollArea to use. - * @param listBox the listBox to use. - * @see ListModel, ScrollArea, ListBox. + * @see ListModel */ DropDown(gcn::ListModel *listModel = 0); diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 546a16d2..d88a5747 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -52,7 +52,7 @@ static const int BOX_WIDTH = 35; static const int BOX_HEIGHT = 43; -ItemContainer::ItemContainer(Inventory *inventory, bool forceQuantity): +ItemContainer::ItemContainer(Inventory *inventory): mInventory(inventory), mGridColumns(1), mGridRows(1), @@ -60,7 +60,6 @@ ItemContainer::ItemContainer(Inventory *inventory, bool forceQuantity): mHighlightedIndex(-1), mLastUsedSlot(-1), mSelectionStatus(SEL_NONE), - mForceQuantity(forceQuantity), mSwapItems(false), mDescItems(false) { @@ -159,7 +158,7 @@ void ItemContainer::draw(gcn::Graphics *graphics) } // Draw item caption std::string caption; - if (item->getQuantity() > 1 || mForceQuantity) + if (item->getQuantity() > 1) caption = toString(item->getQuantity()); else if (item->isEquipped()) caption = "Eq."; diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h index 4d5afde2..0da894ea 100644 --- a/src/gui/widgets/itemcontainer.h +++ b/src/gui/widgets/itemcontainer.h @@ -54,11 +54,8 @@ class ItemContainer : public gcn::Widget, * Constructor. Initializes the graphic. * * @param inventory - * @param gridColumns Amount of columns in grid. - * @param gridRows Amount of rows in grid. - * @param offset Index offset */ - ItemContainer(Inventory *inventory, bool forceQuantity = false); + ItemContainer(Inventory *inventory); virtual ~ItemContainer(); @@ -184,7 +181,6 @@ class ItemContainer : public gcn::Widget, int mSelectedIndex, mHighlightedIndex; int mLastUsedSlot; SelectionState mSelectionStatus; - bool mForceQuantity; bool mSwapItems; bool mDescItems; int mDragPosX, mDragPosY; @@ -201,4 +197,4 @@ class ItemContainer : public gcn::Widget, SelectionListenerList mSelectionListeners; }; -#endif +#endif // ITEMCONTAINER_H diff --git a/src/gui/widgets/shopitems.h b/src/gui/widgets/shopitems.h index 0e95d9a0..f3e774aa 100644 --- a/src/gui/widgets/shopitems.h +++ b/src/gui/widgets/shopitems.h @@ -62,7 +62,7 @@ class ShopItems : public gcn::ListModel * * @param inventoryIndex the inventory index of the item * @param id the id of the item - * @param quantity number of available copies of the item + * @param amount number of available copies of the item * @param price price of the item */ void addItem(int inventoryIndex, int id, int amount, int price); diff --git a/src/gui/widgets/spacer.h b/src/gui/widgets/spacer.h index cc171890..4756b452 100644 --- a/src/gui/widgets/spacer.h +++ b/src/gui/widgets/spacer.h @@ -37,17 +37,17 @@ class Spacer : public gcn::Widget /** * Constructor. * - * @note Can be called empty, will default to a 5x5 px space + * @note Can be called empty, will default to a space of 5x5 pixels. * - * @param w - width in px. - * @param h - height in px. + * @param w width in pixels. + * @param h height in pixels. */ - Spacer(int x = 5, int y = 5); + Spacer(int w = 5, int h = 5); /** - * Draws the Space. + * Draws nothing. */ - void draw(gcn::Graphics *g){} + void draw(gcn::Graphics *g) {} }; #endif // SPACER_H |