diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-08-21 18:40:50 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-08-21 18:40:50 +0000 |
commit | 52e80454ecefaf9be262169db3a366f623c5d7c7 (patch) | |
tree | 0ba2f62ea79fc469e90a81146e01879f284215a2 | |
parent | 3a8cd47ab1bcb1bd3b97160b8ca59c30a2077f05 (diff) | |
download | mana-52e80454ecefaf9be262169db3a366f623c5d7c7.tar.gz mana-52e80454ecefaf9be262169db3a366f623c5d7c7.tar.bz2 mana-52e80454ecefaf9be262169db3a366f623c5d7c7.tar.xz mana-52e80454ecefaf9be262169db3a366f623c5d7c7.zip |
Some updates and cleanups
-rw-r--r-- | The Mana World.dev | 6 | ||||
-rw-r--r-- | src/gui/skill.cpp | 23 | ||||
-rw-r--r-- | src/gui/skill.h | 1 | ||||
-rw-r--r-- | src/gui/status.cpp | 2 |
4 files changed, 27 insertions, 5 deletions
diff --git a/The Mana World.dev b/The Mana World.dev index 4fa9ee10..16533f8d 100644 --- a/The Mana World.dev +++ b/The Mana World.dev @@ -32,19 +32,19 @@ CompilerSettings=0010001001001001001001 [VersionInfo] Major=0 Minor=0 -Release=15 +Release=16 Build=0 LanguageID=1033 CharsetID=1252 CompanyName=The Mana World Development Team -FileVersion=0.0.15 +FileVersion=0.0.16 FileDescription=The Mana World InternalName=tmw.exe LegalCopyright=2004-2005 (C) LegalTrademarks= OriginalFilename=tmw.exe ProductName=The Mana World MMORPG -ProductVersion=0.0.15 +ProductVersion=0.0.16 AutoIncBuildNr=0 [Unit8] diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp index 064354cd..fc791cd5 100644 --- a/src/gui/skill.cpp +++ b/src/gui/skill.cpp @@ -80,7 +80,7 @@ SkillDialog::SkillDialog(): skillScrollArea->setDimension(gcn::Rectangle(5, 5, 230, 180)); pointsLabel->setDimension(gcn::Rectangle(8, 190, 200, 16)); incButton->setPosition(skillScrollArea->getX(), 210); - useButton->setPosition(incButton->getX() + incButton->getWidth() + 10, + useButton->setPosition(incButton->getX() + incButton->getWidth() + 5, 210); closeButton->setPosition( skillScrollArea->getX() + skillScrollArea->getWidth() - closeButton->getWidth(), @@ -129,6 +129,18 @@ void SkillDialog::action(const std::string& eventId) WFIFOSET(4); } } + else if (eventId == "use") + { + // Use skill + int selectedSkill = skillListBox->getSelected(); + if (selectedSkill >= 0) + { + WFIFOW(0) = net_w_value(0x0113); + WFIFOW(2) = 0; + WFIFOW(4) = net_w_value(skillList[selectedSkill]->id); + WFIFOL(6) = net_l_value(0); + } + } else if (eventId == "skill") { incButton->setEnabled( @@ -202,3 +214,12 @@ void SkillDialog::setSkill(int id, int lv, int sp) } } } + +void SkillDialog::cleanList() +{ + for (int i = skillList.size() - 1; i >= 0; i--) + { + delete skillList[i]; + skillList.pop_back(); + } +} diff --git a/src/gui/skill.h b/src/gui/skill.h index a9111528..b4c2522f 100644 --- a/src/gui/skill.h +++ b/src/gui/skill.h @@ -78,6 +78,7 @@ class SkillDialog : public Window, public gcn::ActionListener, bool hasSkill(int id); void addSkill(int id, int lv, int sp); void setSkill(int id, int lv, int sp); + void cleanList(); }; extern SkillDialog *skillDialog; diff --git a/src/gui/status.cpp b/src/gui/status.cpp index eb20dcd5..c903261c 100644 --- a/src/gui/status.cpp +++ b/src/gui/status.cpp @@ -43,7 +43,7 @@ StatusWindow::StatusWindow(): Window("%s Lvl: % 2i Job: % 2i GP: % 2i") { hp = new gcn::Label("HP"); - sp = new gcn::Label("SP"); + sp = new gcn::Label("MP"); hpValue = new gcn::Label(); spValue = new gcn::Label(); expLabel = new gcn::Label("Exp"); |