diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-09 02:02:57 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-09 02:02:57 +0000 |
commit | 81cf85e9ec1d37dc6e8dd9883f42bb50dace9135 (patch) | |
tree | 585415bbb85c48fc8fb83cd5f54e1cfe8e988ee7 /src/gui/setup.cpp | |
parent | 78ab0ec914d3c5a97f162905afb3dede53f8b9ed (diff) | |
download | mana-81cf85e9ec1d37dc6e8dd9883f42bb50dace9135.tar.gz mana-81cf85e9ec1d37dc6e8dd9883f42bb50dace9135.tar.bz2 mana-81cf85e9ec1d37dc6e8dd9883f42bb50dace9135.tar.xz mana-81cf85e9ec1d37dc6e8dd9883f42bb50dace9135.zip |
Made the Button ctor accept eventId and action listener.
Diffstat (limited to 'src/gui/setup.cpp')
-rw-r--r-- | src/gui/setup.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp index c73d1de0..dade13eb 100644 --- a/src/gui/setup.cpp +++ b/src/gui/setup.cpp @@ -119,20 +119,16 @@ Setup::Setup(): sfxLabel = new gcn::Label("Sfx volume"); musicLabel = new gcn::Label("Music volume"); calibrateLabel = new gcn::Label("Press the button to start calibration"); - calibrateButton = new Button("Calibrate"); - applyButton = new Button("Apply"); - cancelButton = new Button("Cancel"); - resetWinsToDefault = new Button("Reset Windows"); + calibrateButton = new Button("Calibrate", "calibrate", this); + applyButton = new Button("Apply", "apply", this); + cancelButton = new Button("Cancel", "cancel", this); + resetWinsToDefault = new Button("Reset Windows", "winsToDefault", this); // Set events - applyButton->setEventId("apply"); - cancelButton->setEventId("cancel"); - resetWinsToDefault->setEventId("winsToDefault"); alphaSlider->setEventId("guialpha"); sfxSlider->setEventId("sfx"); musicSlider->setEventId("music"); customCursorCheckBox->setEventId("customcursor"); - calibrateButton->setEventId("calibrate"); // Set dimensions/positions int width = 230; @@ -167,14 +163,10 @@ Setup::Setup(): applyButton->getY()); // Listen for actions - applyButton->addActionListener(this); - cancelButton->addActionListener(this); - resetWinsToDefault->addActionListener(this); alphaSlider->addActionListener(this); sfxSlider->addActionListener(this); musicSlider->addActionListener(this); customCursorCheckBox->addActionListener(this); - calibrateButton->addActionListener(this); // Assemble dialog gcn::Container *video = new gcn::Container(); |