[aseprite] 32/128: Show current grid tile in status bar when the grid is visible (fix #1075)

Tobias Hansen thansen at moszumanska.debian.org
Mon May 9 21:24:20 UTC 2016


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit 33003fb6f9837a1c1f6e8cf84eccb588d3a364ee
Author: David Capello <davidcapello at gmail.com>
Date:   Tue Apr 19 15:51:34 2016 -0300

    Show current grid tile in status bar when the grid is visible (fix #1075)
---
 data/skins/default/sheet.png        | Bin 14159 -> 14189 bytes
 data/skins/default/skin.xml         |   1 +
 src/app/ui/editor/standby_state.cpp |   9 +++++++++
 3 files changed, 10 insertions(+)

diff --git a/data/skins/default/sheet.png b/data/skins/default/sheet.png
index 3c61728..bc0ab7a 100644
Binary files a/data/skins/default/sheet.png and b/data/skins/default/sheet.png differ
diff --git a/data/skins/default/skin.xml b/data/skins/default/skin.xml
index bc81e38..022d9cb 100644
--- a/data/skins/default/skin.xml
+++ b/data/skins/default/skin.xml
@@ -410,6 +410,7 @@
     <part id="icon_angle"                       x="200" y="264" w="8" h="8" />
     <part id="icon_key"                         x="208" y="264" w="8" h="8" />
     <part id="icon_distance"                    x="216" y="264" w="8" h="8" />
+    <part id="icon_grid"                        x="224" y="264" w="8" h="8" />
   </parts>
 
   <stylesheet>
diff --git a/src/app/ui/editor/standby_state.cpp b/src/app/ui/editor/standby_state.cpp
index 288d47b..22d2b55 100644
--- a/src/app/ui/editor/standby_state.cpp
+++ b/src/app/ui/editor/standby_state.cpp
@@ -462,6 +462,7 @@ bool StandbyState::onUpdateStatusBar(Editor* editor)
       (mask ? "selsize": "size"),
       (mask ? mask->bounds().w: sprite->width()),
       (mask ? mask->bounds().h: sprite->height()));
+
     if (sprite->totalFrames() > 1) {
       sprintf(
         buf+std::strlen(buf), " :frame: %d :clock: %d",
@@ -469,6 +470,14 @@ bool StandbyState::onUpdateStatusBar(Editor* editor)
         sprite->frameDuration(editor->frame()));
     }
 
+    if (editor->docPref().show.grid()) {
+      auto gb = editor->docPref().grid.bounds();
+      int col = (spritePos.x - (gb.x % gb.w)) / gb.w;
+      int row = (spritePos.y - (gb.y % gb.h)) / gb.h;
+      sprintf(
+        buf+std::strlen(buf), " :grid: %d %d", col, row);
+    }
+
     StatusBar::instance()->setStatusText(0, buf);
   }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list