diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-07-15 02:55:31 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-09-28 18:35:44 +0200 |
commit | 1012c6edeffc4a220c7151a7a1a55f12abf2fa9c (patch) | |
tree | 1f8688f8c4afe5a58ce2d022d793661adf1516ff | |
parent | eb5d34756588ca95003094bc910efcb5c832390f (diff) | |
download | Mana-1012c6edeffc4a220c7151a7a1a55f12abf2fa9c.tar.gz Mana-1012c6edeffc4a220c7151a7a1a55f12abf2fa9c.tar.bz2 Mana-1012c6edeffc4a220c7151a7a1a55f12abf2fa9c.tar.xz Mana-1012c6edeffc4a220c7151a7a1a55f12abf2fa9c.zip |
Added icons to the confirm and cancel button of the quit dialog.
This a good example of use for the new graphics and button
functionalities.
-rw-r--r-- | data/graphics/gui/CMakeLists.txt | 2 | ||||
-rw-r--r-- | data/graphics/gui/button-icon-cancel.png | bin | 0 -> 641 bytes | |||
-rw-r--r-- | data/graphics/gui/button-icon-confirm.png | bin | 0 -> 540 bytes | |||
-rw-r--r-- | src/gui/quitdialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/quitdialog.h | 6 |
5 files changed, 8 insertions, 2 deletions
diff --git a/data/graphics/gui/CMakeLists.txt b/data/graphics/gui/CMakeLists.txt index d3f29210..d1a025f6 100644 --- a/data/graphics/gui/CMakeLists.txt +++ b/data/graphics/gui/CMakeLists.txt @@ -1,6 +1,8 @@ SET (FILES bubble.png button.png + button-icon-confirm.png + button-icon-cancel.png button-icon-equipment.png button-icon-inventory.png button-icon-setup.png diff --git a/data/graphics/gui/button-icon-cancel.png b/data/graphics/gui/button-icon-cancel.png Binary files differnew file mode 100644 index 00000000..f85a2c4e --- /dev/null +++ b/data/graphics/gui/button-icon-cancel.png diff --git a/data/graphics/gui/button-icon-confirm.png b/data/graphics/gui/button-icon-confirm.png Binary files differnew file mode 100644 index 00000000..c674662b --- /dev/null +++ b/data/graphics/gui/button-icon-confirm.png diff --git a/src/gui/quitdialog.cpp b/src/gui/quitdialog.cpp index 6ecc62a6..3da07206 100644 --- a/src/gui/quitdialog.cpp +++ b/src/gui/quitdialog.cpp @@ -44,7 +44,9 @@ QuitDialog::QuitDialog(QuitDialog** pointerToMe): mSwitchAccountServer = new RadioButton(_("Switch server"), "quitdialog"); mSwitchCharacter = new RadioButton(_("Switch character"), "quitdialog"); mOkButton = new Button(_("OK"), "ok", this); + mOkButton->setButtonIcon("button-icon-confirm.png"); mCancelButton = new Button(_("Cancel"), "cancel", this); + mCancelButton->setButtonIcon("button-icon-cancel.png"); addKeyListener(this); diff --git a/src/gui/quitdialog.h b/src/gui/quitdialog.h index 65a325b8..21fe2f8a 100644 --- a/src/gui/quitdialog.h +++ b/src/gui/quitdialog.h @@ -29,6 +29,8 @@ #include <vector> +class Button; + /** * The quit dialog. * @@ -62,8 +64,8 @@ class QuitDialog : public Window, public gcn::ActionListener, gcn::RadioButton *mForceQuit; gcn::RadioButton *mSwitchAccountServer; gcn::RadioButton *mSwitchCharacter; - gcn::Button *mOkButton; - gcn::Button *mCancelButton; + Button *mOkButton; + Button *mCancelButton; QuitDialog **mMyPointer; }; |