diff options
author | 2024-03-16 10:56:34 -0400 | |
---|---|---|
committer | 2024-03-16 10:56:34 -0400 | |
commit | dc611d41c2a9b3a9f59dba601296a4f08f2f8d51 (patch) | |
tree | 6e2cb191d510f32b55b479a094f3e5e77567c70e | |
parent | a7f493366ac78cfdb426dd77ad272ae9d360da49 (diff) | |
download | meteor-trashy-addon-dc611d41c2a9b3a9f59dba601296a4f08f2f8d51.tar.xz |
Add tooltips for map art display.
-rw-r--r-- | mapman/src/painter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mapman/src/painter.cpp b/mapman/src/painter.cpp index 5b3ad3b..3dafee6 100644 --- a/mapman/src/painter.cpp +++ b/mapman/src/painter.cpp @@ -105,6 +105,11 @@ void map_painter::set_map_id(int pos, bool populated, int id, bool user_input) QPixmapCache::insert(QString("map_%1").arg(id), pm); } auto p = s->addPixmap(pm); + auto m = l->get_map(id); + p->setToolTip(QString("%1\nId #%2%3") + .arg(m.custom_name.empty() ? QString("Map") : QString::fromStdString(m.custom_name)) + .arg(m.id) + .arg(m.locked ? "\nLocked" : "")); int x = pos / hc; int y = pos % hc; p->setPos(y * 128, x * 128); |