Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change cursor based on tool selected #69

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

garakmon
Copy link
Contributor

This should resolve Issue #7 .

*This changes the cursor only over the editable part of the map.

@garakmon
Copy link
Contributor Author

gif

Adds:
- View Menu with keyboard shortcuts > Zoom In (+) / Zoom Out (-)
- Map ‘+’ cursor drag and move edit mode that can also be toggled with
M key
Add map zoom and drag mode
@garakmon
Copy link
Contributor Author

garakmon commented Aug 13, 2018

Latest commit addresses #51 and #33
Adds:

  • View Menu with keyboard shortcuts > Zoom In (+) / Zoom Out (-)
    • default scaling is 5/4 - 4/5
  • Map ‘+’ cursor drag and move edit mode that can also be toggled with M key

Not implemented: scroll wheel zooming in drag mode (but keyboard shortcuts should be sufficient at least for now).

@garakmon
Copy link
Contributor Author

garakmon commented Aug 13, 2018

Demo:
Alt text

mainwindow.cpp Outdated
ui->graphicsView_Objects_Map->scale(0.8,0.8);//scale(0.5,0.5);
editor->map->scale *= 0.8;//0.5;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what a good default value for scaling an image would be. A factor of 2 seems a little high to me but other numbers can get a little wonky when displaying scale.

fixed bug that wouldn’t fig graphicsView_Map to scroll box
use exponents rather than what I used before for easier changing of
scale factor
@huderlem
Copy link
Contributor

huderlem commented Sep 6, 2018

The icons you're using seem jarring to me because their base coordinate is different. The pencil's is bottom-left, the bucket's is bottom-right, etc. I think this cursor style is easier to use:

pretmap-cursors

@garakmon
Copy link
Contributor Author

garakmon commented Sep 7, 2018

I did it the way I did just because I wanted the tools to work from the tip (like, the pencil shouldn't draw from the middle, etc.), but this is also a good solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants