mirror of https://github.com/aseprite/aseprite.git
Show tile value in the status bar
This commit is contained in:
parent
92b794d457
commit
dfaf01ced4
|
|
@ -599,6 +599,16 @@ bool StandbyState::onUpdateStatusBar(Editor* editor)
|
|||
if (!grid.isEmpty()) {
|
||||
gfx::Point pt = grid.canvasToTile(gfx::Point(spritePos));
|
||||
sprintf(buf+std::strlen(buf), " :grid: %d %d", pt.x, pt.y);
|
||||
|
||||
// Show the tile index of this specific tile
|
||||
if (site.layer() &&
|
||||
site.layer()->isTilemap() &&
|
||||
site.image()) {
|
||||
if (site.image()->bounds().contains(pt)) {
|
||||
sprintf(buf+std::strlen(buf), " [%d]",
|
||||
site.image()->getPixel(pt.x, pt.y));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue