summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-11-16 23:25:14 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-11-16 23:25:14 +0100
commitd87d926d52721f6d8bd766025b8c1944a3366ca9 (patch)
treec78b594564374780d4b3ea0341f20539183f7438
parentff61662640c4053220464f34413568f06f51154a (diff)
downloadmana-client-d87d926d52721f6d8bd766025b8c1944a3366ca9.tar.gz
mana-client-d87d926d52721f6d8bd766025b8c1944a3366ca9.tar.bz2
mana-client-d87d926d52721f6d8bd766025b8c1944a3366ca9.tar.xz
mana-client-d87d926d52721f6d8bd766025b8c1944a3366ca9.zip
Whitespace and indentation fixes
-rw-r--r--src/effectmanager.h7
-rw-r--r--src/gui/inventorywindow.cpp5
-rw-r--r--src/gui/inventorywindow.h5
-rw-r--r--src/gui/itempopup.cpp44
-rw-r--r--src/gui/itempopup.h26
-rw-r--r--src/gui/speechbubble.cpp8
-rw-r--r--src/gui/speechbubble.h15
-rw-r--r--src/gui/viewport.cpp4
8 files changed, 49 insertions, 65 deletions
diff --git a/src/effectmanager.h b/src/effectmanager.h
index 1ae82caf..4b349471 100644
--- a/src/effectmanager.h
+++ b/src/effectmanager.h
@@ -27,24 +27,21 @@
class EffectManager
{
-
- public:
+ public:
struct EffectDescription {
int id;
std::string GFX;
std::string SFX;
};
-
EffectManager();
-
~EffectManager();
/**
* Triggers a effect with the id, at x,y
* returns true if ID exists
*/
- bool trigger(int id, int x = 0, int y = 0);
+ bool trigger(int id, int x = 0, int y = 0);
private:
std::list<EffectDescription> mEffects;
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 82b36aef..0fda7945 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -83,7 +83,6 @@ InventoryWindow::InventoryWindow():
layout.setRowHeight(0, Layout::AUTO_SET);
loadWindowState("Inventory");
-
}
void InventoryWindow::logic()
@@ -212,7 +211,3 @@ void InventoryWindow::keyReleased(gcn::KeyEvent &event)
mSplit = false;
}
}
-InventoryWindow::~InventoryWindow()
-{
-
-}
diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h
index a7130b65..ad1c8f38 100644
--- a/src/gui/inventorywindow.h
+++ b/src/gui/inventorywindow.h
@@ -82,11 +82,6 @@ class InventoryWindow : public Window,
*/
void valueChanged(const gcn::SelectionEvent &event);
- /**
- * Tracks when the mouse exits the window
- */
- ~InventoryWindow();
-
private:
void updateButtons(); /**< Updates button states. */
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index 02d35570..3f2df2d6 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -37,8 +37,8 @@ ItemPopup::ItemPopup()
{
setResizable(false);
- setTitleBarHeight(0);
- loadSkin("graphics/gui/gui.xml");
+ setTitleBarHeight(0);
+ loadSkin("graphics/gui/gui.xml");
// Item Name
mItemName = new gcn::Label("Label");
@@ -54,31 +54,31 @@ ItemPopup::ItemPopup()
mItemDescScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mItemDescScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mItemDescScroll->setDimension(gcn::Rectangle(0, 0, 196, 14));
- mItemDescScroll->setOpaque(false);
- mItemDescScroll->setPosition(2, 15);
+ mItemDescScroll->setOpaque(false);
+ mItemDescScroll->setPosition(2, 15);
// Item Effect
- mItemEffect = new TextBox();
- mItemEffect->setEditable(false);
- mItemEffectScroll = new ScrollArea(mItemEffect);
+ mItemEffect = new TextBox();
+ mItemEffect->setEditable(false);
+ mItemEffectScroll = new ScrollArea(mItemEffect);
- mItemEffectScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ mItemEffectScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mItemEffectScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
- mItemEffectScroll->setDimension(gcn::Rectangle(0, 0, 196, 14));
- mItemEffectScroll->setOpaque(false);
- mItemEffectScroll->setPosition(2, 35);
+ mItemEffectScroll->setDimension(gcn::Rectangle(0, 0, 196, 14));
+ mItemEffectScroll->setOpaque(false);
+ mItemEffectScroll->setPosition(2, 35);
- add(mItemName);
- add(mItemDescScroll);
- add(mItemEffectScroll);
+ add(mItemName);
+ add(mItemDescScroll);
+ add(mItemEffectScroll);
- setLocationRelativeTo(getParent());
+ setLocationRelativeTo(getParent());
// LEEOR / TODO: This causes an exception error.
//moveToBottom(getParent());
mItemDesc->setTextWrapped( "" );
- mItemEffect->setTextWrapped( "" );
+ mItemEffect->setTextWrapped( "" );
}
void ItemPopup::setItem(Item *item)
@@ -87,11 +87,11 @@ void ItemPopup::setItem(Item *item)
ItemInfo const *info = item ? &item->getInfo() : NULL;
mItemName->setCaption(info->getName());
- mItemDesc->setTextWrapped( info->getDescription() );
- mItemEffect->setTextWrapped( info->getEffect() );
+ mItemDesc->setTextWrapped( info->getDescription() );
+ mItemEffect->setTextWrapped( info->getEffect() );
int numRowsDesc = mItemDesc->getNumberOfRows();
- int numRowsEffect = mItemEffect->getNumberOfRows();
+ int numRowsEffect = mItemEffect->getNumberOfRows();
if(info->getEffect() == "")
{
@@ -102,10 +102,10 @@ void ItemPopup::setItem(Item *item)
mItemDescScroll->setDimension(gcn::Rectangle(2, 0, 196, numRowsDesc * 14));
- mItemEffectScroll->setDimension(gcn::Rectangle(2, 0, 196, numRowsEffect * 14));
+ mItemEffectScroll->setDimension(gcn::Rectangle(2, 0, 196, numRowsEffect * 14));
- mItemDescScroll->setPosition(2, 20);
- mItemEffectScroll->setPosition(2, (numRowsDesc * 15) + 25);
+ mItemDescScroll->setPosition(2, 20);
+ mItemEffectScroll->setPosition(2, (numRowsDesc * 15) + 25);
}
unsigned int ItemPopup::getNumRows()
diff --git a/src/gui/itempopup.h b/src/gui/itempopup.h
index cb55296c..dba9903d 100644
--- a/src/gui/itempopup.h
+++ b/src/gui/itempopup.h
@@ -30,21 +30,19 @@
#include "../item.h"
class ItemPopup : public Window
- {
+{
public:
+ ItemPopup();
- ItemPopup();
-
- void setItem(Item *item);
- unsigned int getNumRows();
+ void setItem(Item *item);
+ unsigned int getNumRows();
private:
- gcn::Label *mItemName;
- TextBox *mItemDesc;
- TextBox *mItemEffect;
- ScrollArea *mItemDescScroll;
- ScrollArea *mItemEffectScroll;
-
- };
-
-#endif
+ gcn::Label *mItemName;
+ TextBox *mItemDesc;
+ TextBox *mItemEffect;
+ ScrollArea *mItemDescScroll;
+ ScrollArea *mItemEffectScroll;
+};
+
+#endif // _LOM_ITEMPOPUP_H__
diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp
index d3ef7bbe..4168134a 100644
--- a/src/gui/speechbubble.cpp
+++ b/src/gui/speechbubble.cpp
@@ -29,19 +29,19 @@ SpeechBubble::SpeechBubble()
{
mSpeechBox = new TextBox();
mSpeechBox->setEditable(false);
- mSpeechBox->setOpaque(false);
+ mSpeechBox->setOpaque(false);
mSpeechArea = new ScrollArea(mSpeechBox);
// Height == Top Graphic (14px) + 1 Row of Text (15px) + Bottom Graphic (17px)
setContentSize(135, 46);
- setTitleBarHeight(0);
- loadSkin("graphics/gui/speechbubble.xml");
+ setTitleBarHeight(0);
+ loadSkin("graphics/gui/speechbubble.xml");
mSpeechArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mSpeechArea->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mSpeechArea->setDimension(gcn::Rectangle(4, 15, 130, 28));
- mSpeechArea->setOpaque(false);
+ mSpeechArea->setOpaque(false);
add(mSpeechArea);
diff --git a/src/gui/speechbubble.h b/src/gui/speechbubble.h
index ed69a8d2..aac6e3d7 100644
--- a/src/gui/speechbubble.h
+++ b/src/gui/speechbubble.h
@@ -30,16 +30,15 @@
class SpeechBubble : public Window
{
public:
+ SpeechBubble();
- SpeechBubble();
-
- void setText(const std::string mText);
- void setLocation(int x, int y);
- unsigned int getNumRows();
+ void setText(const std::string mText);
+ void setLocation(int x, int y);
+ unsigned int getNumRows();
private:
- TextBox *mSpeechBox;
- ScrollArea *mSpeechArea;
+ TextBox *mSpeechBox;
+ ScrollArea *mSpeechArea;
};
-#endif
+#endif // _LOM_SPEECHBUBBLE_H__
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 1795836d..a6092c7a 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -296,9 +296,9 @@ void Viewport::drawTargetCursor(Graphics *graphics)
Being::TargetCursorSize cursorSize = target->getTargetCursorSize();
Image* targetCursor;
if (rangeX > attackRange || rangeY > attackRange)
- targetCursor = mTargetCursorOutRange[cursorSize]->getCurrentImage();
+ targetCursor = mTargetCursorOutRange[cursorSize]->getCurrentImage();
else
- targetCursor = mTargetCursorInRange[cursorSize]->getCurrentImage();
+ targetCursor = mTargetCursorInRange[cursorSize]->getCurrentImage();
// Draw the target cursor at the correct position
int posX = target->getPixelX() -