From 1e7dba1ee2f90e927298d5f6a7856ad5006ff789 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Fri, 27 Mar 2009 01:59:35 +0100 Subject: Fixed name of "UpdateSliders" and reduced redundant docs --- src/gui/buy.cpp | 2 +- src/gui/char_select.cpp | 6 +++--- src/gui/char_select.h | 2 +- src/gui/popup.h | 48 ++++++++++++++---------------------------------- src/gui/setup_video.h | 2 -- src/gui/window.h | 24 ++++++------------------ 6 files changed, 25 insertions(+), 59 deletions(-) diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp index adf87175..2fc59aec 100644 --- a/src/gui/buy.cpp +++ b/src/gui/buy.cpp @@ -34,7 +34,7 @@ #include "units.h" #ifdef TMWSERV_SUPPORT -#include "../net/tmwserv/gameserver/player.h" +#include "net/tmwserv/gameserver/player.h" #else #include "net/messageout.h" #include "net/ea/protocol.h" diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index 7c0e2ab2..4ab3d9ef 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -491,7 +491,7 @@ CharCreateDialog::CharCreateDialog(Window *parent, int slot, Network *network, mAttributeLabel[i]->setPosition(5, 140 + i*20); }; mAttributesLeft->setPosition(15, 280); - UpdateSliders(); + updateSliders(); mCancelButton->setPosition( w - 5 - mCancelButton->getWidth(), h - 5 - mCancelButton->getHeight()); @@ -617,7 +617,7 @@ void CharCreateDialog::action(const gcn::ActionEvent &event) mPlayer->getHairColor()); #ifdef TMWSERV_SUPPORT else if (event.getId() == "statslider") { - UpdateSliders(); + updateSliders(); } else if (event.getId() == "gender"){ if (mMale->isSelected()) { @@ -637,7 +637,7 @@ std::string CharCreateDialog::getName() } #ifdef TMWSERV_SUPPORT -void CharCreateDialog::UpdateSliders() +void CharCreateDialog::updateSliders() { for (int i = 0; i < 6; i++) { diff --git a/src/gui/char_select.h b/src/gui/char_select.h index 0ff1d18f..7f376692 100644 --- a/src/gui/char_select.h +++ b/src/gui/char_select.h @@ -149,7 +149,7 @@ class CharCreateDialog : public Window, public gcn::ActionListener #ifdef TMWSERV_SUPPORT int getDistributedPoints(); - void UpdateSliders(); + void updateSliders(); #endif /** diff --git a/src/gui/popup.h b/src/gui/popup.h index fcecf4d4..a0a64069 100644 --- a/src/gui/popup.h +++ b/src/gui/popup.h @@ -35,8 +35,8 @@ class Window; class WindowContainer; /** - * A rather reduced down version of the Window class that is particularly suited - * for + * A rather reduced down version of the Window class that is particularly + * suited for ... * * \ingroup GUI */ @@ -89,39 +89,27 @@ class Popup : public gcn::Container */ void setMinWidth(int width); + int getMinWidth() const { return mMinWidth; } + /** * Sets the minimum height of the popup. */ void setMinHeight(int height); + int getMinHeight() const { return mMinHeight; } + /** * Sets the maximum width of the popup. */ void setMaxWidth(int width); + int getMaxWidth() const { return mMaxWidth; } + /** * Sets the minimum height of the popup. */ void setMaxHeight(int height); - /** - * Gets the minimum width of the popup. - */ - int getMinWidth() const { return mMinWidth; } - - /** - * Gets the minimum height of the popup. - */ - int getMinHeight() const { return mMinHeight; } - - /** - * Gets the maximum width of the popup. - */ - int getMaxWidth() const { return mMaxWidth; } - - /** - * Gets the minimum height of the popup. - */ int getMaxHeight() const { return mMaxHeight; } /** @@ -131,15 +119,8 @@ class Popup : public gcn::Container * @return The padding of the popup. * @see setPadding */ - unsigned int getPadding() const { return mPadding; } + int getPadding() const { return mPadding; } - /** - * Sets the padding of the popup. The padding is the distance between the - * popup border and the content. - * - * @param padding The padding of the popup. - * @see getPadding - */ void setPadding(int padding) { mPadding = padding; } /** @@ -152,12 +133,11 @@ class Popup : public gcn::Container /** * Sets the name of the popup. This is only useful for debug purposes. */ - void setPopupName(const std::string &name) { mPopupName = name; } + void setPopupName(const std::string &name) + { mPopupName = name; } - /** - * Returns the name of the popup. This is only useful for debug purposes. - */ - const std::string &getPopupName() const { return mPopupName; } + const std::string &getPopupName() const + { return mPopupName; } /** * Schedule this popup for deletion. It will be deleted at the start @@ -188,7 +168,7 @@ class Popup : public gcn::Container static int instances; /**< Number of Popup instances */ - Skin* mSkin; /**< Skin in use by this Popup */ + Skin *mSkin; /**< Skin in use by this Popup */ }; #endif diff --git a/src/gui/setup_video.h b/src/gui/setup_video.h index d2680fa8..62b46646 100644 --- a/src/gui/setup_video.h +++ b/src/gui/setup_video.h @@ -42,8 +42,6 @@ class Setup_Video : public SetupTab, public gcn::ActionListener, void keyPressed(gcn::KeyEvent &event); private: - void updateSliders(bool originalValues); - int updateSlider(gcn::Slider *slider, gcn::TextField *field, const std::string &configName); diff --git a/src/gui/window.h b/src/gui/window.h index 530caf1f..46744699 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -119,39 +119,27 @@ class Window : public gcn::Window, gcn::WidgetListener */ void setMinWidth(int width); + int getMinWidth() const { return mMinWinWidth; } + /** * Sets the minimum height of the window. */ void setMinHeight(int height); + int getMinHeight() const { return mMinWinHeight; } + /** * Sets the maximum width of the window. */ void setMaxWidth(int width); + int getMaxWidth() const { return mMaxWinWidth; } + /** * Sets the minimum height of the window. */ void setMaxHeight(int height); - /** - * Gets the minimum width of the window. - */ - int getMinWidth() const { return mMinWinWidth; } - - /** - * Gets the minimum height of the window. - */ - int getMinHeight() const { return mMinWinHeight; } - - /** - * Gets the maximum width of the window. - */ - int getMaxWidth() const { return mMaxWinWidth; } - - /** - * Gets the minimum height of the window. - */ int getMaxHeight() const { return mMaxWinHeight; } /** -- cgit v1.2.3-60-g2f50