diff options
author | Mateusz Kaduk <mateusz.kaduk@gmail.com> | 2004-12-27 23:03:55 +0000 |
---|---|---|
committer | Mateusz Kaduk <mateusz.kaduk@gmail.com> | 2004-12-27 23:03:55 +0000 |
commit | 1c390bc80c21461b77d83c889af786123da9005d (patch) | |
tree | cc732b58d1b5bb49d33bade0a63299feb866aa93 /src | |
parent | 6b37586c309017c6ba0c3cd7b9c551cfd8de731a (diff) | |
download | mana-1c390bc80c21461b77d83c889af786123da9005d.tar.gz mana-1c390bc80c21461b77d83c889af786123da9005d.tar.bz2 mana-1c390bc80c21461b77d83c889af786123da9005d.tar.xz mana-1c390bc80c21461b77d83c889af786123da9005d.zip |
Added radiobutton class and aqua graphic for it.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/gui/gui.cpp | 7 | ||||
-rw-r--r-- | src/gui/setup.cpp | 3 | ||||
-rw-r--r-- | src/gui/setup.h | 2 |
4 files changed, 13 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 3a98f468..4d4f514f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -9,6 +9,7 @@ tmw_SOURCES = sound/sound.cpp \ gui/char_select.cpp \ gui/chat.cpp \ gui/checkbox.cpp \ + gui/radiobutton.cpp \ gui/gui.cpp \ gui/inventory.cpp \ gui/login.cpp \ diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 45599520..24069cda 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -360,6 +360,12 @@ blit(temp2, gui_skin.bar.bg.grid[3], 0, 0, 0, 0, 3, 11); blit(temp2, gui_skin.bar.bg.grid[4], 4, 0, 0, 0, 1, 11); blit(temp2, gui_skin.bar.bg.grid[5], 13, 0, 0, 0, 3, 11); } +void loadRadioSkin() { +gui_skin.radiobutton.normal = load_bitmap("data/Skin/radioout.bmp", NULL); +gui_skin.radiobutton.checked = load_bitmap("data/Skin/radioin.bmp", NULL); +gui_skin.radiobutton.disabled = load_bitmap("data/Skin/radioout.bmp", NULL); +gui_skin.radiobutton.disabled_checked = load_bitmap("data/Skin/radioin.bmp", NULL); +} void loadPlusSkin() { //BITMAP *temp1 = load_bitmap("data/bar.bmp", NULL); //BITMAP *temp2 = load_bitmap("data/bar_filled.bmp", NULL); @@ -447,6 +453,7 @@ int gui_load_skin(const char* skinname) { loadButtonSkin(); loadSliderSkin(); loadCheckboxSkin(); + loadRadioSkin(); loadTextboxSkin(); loadListboxSkin(); loadDialogSkin(); diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp index 3cc465f2..233a36a5 100644 --- a/src/gui/setup.cpp +++ b/src/gui/setup.cpp @@ -67,6 +67,7 @@ Setup::Setup(gcn::Container *parent) fsCheckBox = new CheckBox("Full screen", false); soundLabel = new gcn::Label("Sound settings"); soundCheckBox = new CheckBox("Sound", false); + disabledRadio = new RadioButton("Disabled", "Modes", false); applyButton = new Button("Apply"); cancelButton = new Button("Cancel"); @@ -87,6 +88,7 @@ Setup::Setup(gcn::Container *parent) soundLabel->setPosition(10,110); fsCheckBox->setPosition(120,36); soundCheckBox->setPosition(10,130); + disabledRadio->setPosition(10,140); applyButton->setPosition(10,190); cancelButton->setPosition(150,190); @@ -100,6 +102,7 @@ Setup::Setup(gcn::Container *parent) add(fsCheckBox); add(soundLabel); add(soundCheckBox); + add(disabledRadio); add(applyButton); add(cancelButton); diff --git a/src/gui/setup.h b/src/gui/setup.h index c32dcccd..55343229 100644 --- a/src/gui/setup.h +++ b/src/gui/setup.h @@ -28,6 +28,7 @@ #include "button.h" #include "checkbox.h" #include "scrollarea.h" +#include "radiobutton.h" #include "../graphic/graphic.h" #include <allegro.h> #ifdef WIN32 @@ -55,6 +56,7 @@ class Setup : public Window, public gcn::ActionListener { CheckBox *fsCheckBox; gcn::Label *soundLabel; CheckBox *soundCheckBox; + RadioButton *disabledRadio; ScrollArea *scrollArea; gcn::ListBox *modesList; Button *applyButton; |