From 52e80454ecefaf9be262169db3a366f623c5d7c7 Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Sun, 21 Aug 2005 18:40:50 +0000 Subject: Some updates and cleanups --- The Mana World.dev | 6 +++--- src/gui/skill.cpp | 23 ++++++++++++++++++++++- src/gui/skill.h | 1 + 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"); -- cgit v1.2.3-70-g09d2