diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/itemcontainer.h | 2 | ||||
-rw-r--r-- | src/gui/newskill.cpp | 30 | ||||
-rw-r--r-- | src/gui/newskill.h | 2 | ||||
-rw-r--r-- | src/gui/window.cpp | 14 | ||||
-rw-r--r-- | src/gui/window.h | 3 |
5 files changed, 26 insertions, 25 deletions
diff --git a/src/gui/itemcontainer.h b/src/gui/itemcontainer.h index 5f7b6cbe..dc88655a 100644 --- a/src/gui/itemcontainer.h +++ b/src/gui/itemcontainer.h @@ -55,8 +55,6 @@ class ItemContainer : public gcn::Widget public: /** * Constructor. Initializes the graphic. - * - * @param path The file containing item images. */ ItemContainer(); diff --git a/src/gui/newskill.cpp b/src/gui/newskill.cpp index 341fe046..c3c16f2b 100644 --- a/src/gui/newskill.cpp +++ b/src/gui/newskill.cpp @@ -20,7 +20,7 @@ * * $Id$ */ - + /* This file implements the new skill dialog for use under the latest * version of the skill system as of 2005/02/20 */ @@ -45,41 +45,41 @@ char *skill_name[] = { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; - + NewSkillDialog::NewSkillDialog(): Window("Skills") { // the window setSize(400, 300); - + // the skill labels skillLabel = new gcn::Label[N_SKILL]; - for(int a=0;a<N_SKILL;a++) { + for (int a = 0; a < N_SKILL; a++) { skillLabel[a].setCaption(skill_name[a]); skillLabel[a].setDimension(gcn::Rectangle(8, 190, 200, 16)); } - + // the close button closeButton = new Button("Close"); closeButton->setEventId("close"); closeButton->setPosition(160, 210); add(closeButton); - + // setting up the container skillList = new gcn::Container(); - skillList->setDimension(gcn::Rectangle(0,0,230,600)); - for(int b=0;b<N_SKILL;b++) { - skillList->add(&skillLabel[b],20,20*b); + skillList->setDimension(gcn::Rectangle(0, 0, 230, 600)); + for (int b = 0; b < N_SKILL; b++) { + skillList->add(&skillLabel[b], 20, 20 * b); } // the scroll area (content = container) - skillScrollArea = new gcn::ScrollArea(); - skillScrollArea->setDimension(gcn::Rectangle(5, 5, 229, 300)); + skillScrollArea = new ScrollArea(); + skillScrollArea->setDimension(gcn::Rectangle(5, 5, 229, 290)); skillScrollArea->setContent(skillList); add(skillScrollArea); - - + + closeButton->addActionListener(this); @@ -89,7 +89,7 @@ NewSkillDialog::NewSkillDialog(): NewSkillDialog::~NewSkillDialog() { delete skillScrollArea; - delete skillLabel; + delete[] skillLabel; delete closeButton; } @@ -99,4 +99,4 @@ void NewSkillDialog::action(const std::string& eventId) { setVisible(false); } -}
\ No newline at end of file +} diff --git a/src/gui/newskill.h b/src/gui/newskill.h index 203a686e..a3cf6c04 100644 --- a/src/gui/newskill.h +++ b/src/gui/newskill.h @@ -60,4 +60,4 @@ class NewSkillDialog : public Window, public gcn::ActionListener void action(const std::string&); }; -#endif _TMW_NSKILL_H
\ No newline at end of file +#endif diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 399cb73f..77cdec03 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -56,12 +56,12 @@ Window::Window(const std::string& text, bool modal, Window *parent): dRightBorder = dBorders->getSubImage(7, 4, 4, 10); dLowerBorder = dBorders->getSubImage(4, 15, 3, 4); - dBackground->setAlpha(0.7f); - dBorders->setAlpha(0.7f); - dUpperBorder->setAlpha(0.7f); - dLeftBorder->setAlpha(0.7f); - dRightBorder->setAlpha(0.7f); - dLowerBorder->setAlpha(0.7f); + dBackground->setAlpha(0.8f); + dBorders->setAlpha(0.8f); + dUpperBorder->setAlpha(0.8f); + dLeftBorder->setAlpha(0.8f); + dRightBorder->setAlpha(0.8f); + dLowerBorder->setAlpha(0.8f); // Register mouse listener addMouseListener(this); @@ -190,7 +190,7 @@ void Window::add(gcn::Widget *w) chrome->add(w); } -void Window::add(Widget *w, int x, int y) +void Window::add(gcn::Widget *w, int x, int y) { chrome->add(w, x, y); } diff --git a/src/gui/window.h b/src/gui/window.h index 25403851..c78de2f4 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -67,6 +67,9 @@ class Window : public gcn::Container, public gcn::MouseListener * * @param text The initial window title, "Window" by default. * @param modal Block input to other windows. + * @param parent The parent window. This is the window standing above + * this one in the window hiearchy. When reordering, + * a window will never go below its parent window. */ Window(const std::string& text = "Window", bool modal = false, Window *parent = NULL); |