diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-11-16 23:25:14 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-11-16 23:25:14 +0100 |
commit | d87d926d52721f6d8bd766025b8c1944a3366ca9 (patch) | |
tree | c78b594564374780d4b3ea0341f20539183f7438 /src/gui | |
parent | ff61662640c4053220464f34413568f06f51154a (diff) | |
download | mana-client-d87d926d52721f6d8bd766025b8c1944a3366ca9.tar.gz mana-client-d87d926d52721f6d8bd766025b8c1944a3366ca9.tar.bz2 mana-client-d87d926d52721f6d8bd766025b8c1944a3366ca9.tar.xz mana-client-d87d926d52721f6d8bd766025b8c1944a3366ca9.zip |
Whitespace and indentation fixes
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/inventorywindow.cpp | 5 | ||||
-rw-r--r-- | src/gui/inventorywindow.h | 5 | ||||
-rw-r--r-- | src/gui/itempopup.cpp | 44 | ||||
-rw-r--r-- | src/gui/itempopup.h | 26 | ||||
-rw-r--r-- | src/gui/speechbubble.cpp | 8 | ||||
-rw-r--r-- | src/gui/speechbubble.h | 15 | ||||
-rw-r--r-- | src/gui/viewport.cpp | 4 |
7 files changed, 47 insertions, 60 deletions
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() - |