Skip to content

Commit

Permalink
Improve the tile debugger UI
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoureaux committed Sep 12, 2021
1 parent 5ddba34 commit bed608e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions client/gui-qt/tileset_debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

#include "tileset_debugger.h"

// client/include
#include "dialogs_g.h"

// common
#include "map.h"
#include "tile.h"
Expand Down Expand Up @@ -64,15 +67,17 @@ tileset_debugger::~tileset_debugger() {}
void tileset_debugger::set_tile(const ::tile *t)
{
m_tile = t;
m_pick_action->setChecked(false);

// Update the GUI
if (!t) {
m_label->setText(_("Select a tile to start debugging."));
return;
}

m_label->setText(QStringLiteral("%1 %2").arg(
index_to_map_pos_x(tile_index(t)), index_to_map_pos_y(tile_index(t))));
m_label->setText(QStringLiteral("%1 %2")
.arg(index_to_map_pos_x(tile_index(t)))
.arg(index_to_map_pos_y(tile_index(t))));
}

/**
Expand Down

0 comments on commit bed608e

Please sign in to comment.