Skip to content

Change cursor based on tool selected#69

Open
garakmon wants to merge 6 commits intoyenatch:masterfrom
garakmon:cursors
Open

Change cursor based on tool selected#69
garakmon wants to merge 6 commits intoyenatch:masterfrom
garakmon:cursors

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

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