summaryrefslogtreecommitdiff
path: root/src/gui/windows/skilldialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows/skilldialog.cpp')
-rw-r--r--src/gui/windows/skilldialog.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index cfcf60b1b..f1c81e0bb 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -322,11 +322,16 @@ void SkillDialog::loadXmlFile(const std::string &fileName,
const std::string setTypeStr = XML::getProperty(set, "type", "");
SkillSetTypeT setType = SkillSetType::VerticalList;
- if (setTypeStr == "list" ||
+ if (setTypeStr == "" ||
+ setTypeStr == "list" ||
setTypeStr == "vertical")
{
setType = SkillSetType::VerticalList;
}
+ else if (setTypeStr == "rectangle")
+ {
+ setType = SkillSetType::Rectangle;
+ }
SkillModel *const model = new SkillModel;
if (!mDefaultModel)
@@ -370,6 +375,22 @@ void SkillDialog::loadXmlFile(const std::string &fileName,
break;
}
case SkillSetType::Rectangle:
+ {
+ SkillRectangleListBox *const listbox =
+ new SkillRectangleListBox(this,
+ model);
+ listbox->setActionEventId("sel");
+ listbox->addActionListener(this);
+ ScrollArea *const scroll = new ScrollArea(this,
+ listbox,
+ Opaque_false);
+ scroll->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
+ scroll->setVerticalScrollPolicy(ScrollArea::SHOW_ALWAYS);
+ SkillTab *const tab = new SkillTab(this, setName, listbox);
+ mDeleteTabs.push_back(tab);
+ mTabs->addTab(tab, scroll);
+ break;
+ }
default:
reportAlways("Unsupported skillset type: %s",
setTypeStr.c_str());
@@ -422,6 +443,10 @@ SkillInfo *SkillDialog::loadSkill(XmlNodePtr node,
"castingWaterAction", SpriteAction::CASTWATER);
skill->useTextParameter = XML::getBoolProperty(
node, "useTextParameter", false);
+ skill->x = XML::getProperty(node,
+ "x", 0);
+ skill->y = XML::getProperty(node,
+ "y", 0);
skill->visible = skill->alwaysVisible;
model->addSkill(skill);
mSkills[id] = skill;