Hi, I’m just starting to use Aseprite moving over from GraphicsGale and as a programmer I was looking to help add a couple of the features I miss the most.
One simple thing I’d like to do is add more cursor types depending on the current tool. So if you’re using the Paint Bucket, for example, the cursor would become a Paint Bucket sprite. I’ve tried a few things in the code that haven’t worked, so I’d just like a few clues on:
- What routine should I look to change? StandbyState::onSetCursor seems to trigger a few custom cursors, and I can see how to add more of those.
- How do I check the current tool? In StandbyState::onSetCursor, I tried to do something like:
tools::Tool* tool = editor->getCurrentEditorTool();
…
if(tool && tool->getId() == tools::WellKnownTools::RectangularMarquee) {
editor->showMouseCursor(
kCustomCursor, skin::SkinTheme::instance()->cursors.eyedropper());
return true;
}
but it didn’t do anything in the program (just using the existing eyedropper in order to test it). I assume the ID check isn’t the right way to check the tool, or maybe this is the wrong the place to set this?
Appreciate any hints on where/how I should start on this. Thanks!