summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-21 00:03:11 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-21 00:03:11 +0000
commitf741c14337dd0850a7201f5aa2185e40a625353a (patch)
treedd1dd0cf95b6117e4a8aea96317f6301eaa078ed /src/gui
parentf7214b33bf5cbb85df57e8d0035af7a25826e985 (diff)
downloadmana-f741c14337dd0850a7201f5aa2185e40a625353a.tar.gz
mana-f741c14337dd0850a7201f5aa2185e40a625353a.tar.bz2
mana-f741c14337dd0850a7201f5aa2185e40a625353a.tar.xz
mana-f741c14337dd0850a7201f5aa2185e40a625353a.zip
Updates to change log, file lists, lots of doxygen comments and small changes.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itemcontainer.h2
-rw-r--r--src/gui/newskill.cpp30
-rw-r--r--src/gui/newskill.h2
-rw-r--r--src/gui/window.cpp14
-rw-r--r--src/gui/window.h3
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);