Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapentity.cc')
-rw-r--r--src/mapentity.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mapentity.cc b/src/mapentity.cc
index 55bb501..0a17e63 100644
--- a/src/mapentity.cc
+++ b/src/mapentity.cc
@@ -50,6 +50,20 @@ void MapEntity::set_location(const float x, const float y, const float z)
entity_location[2] = z;
}
+void MapEntity::set_properties(const QString &properties)
+{
+ entity_properties = properties;
+}
+void MapEntity::add_property(const QString &key, const QString &value)
+{
+ if (entity_properties.size()) {
+ entity_properties += '\n';
+ }
+ entity_properties += key;
+ entity_properties += '=';
+ entity_properties += value;
+}
+
void MapEntity::paintEvent(QPaintEvent *event)
{
QPen pen(Qt::black, 1, Qt::SolidLine);
@@ -57,6 +71,7 @@ void MapEntity::paintEvent(QPaintEvent *event)
if (is_selected) {
pen.setColor(Qt::red);
+ painter.setPen(pen);
}
painter.setPen(pen);