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

Enhancement : Easy way to move the viewport #189

Closed
juliandescottes opened this issue Jun 24, 2014 · 7 comments
Closed

Enhancement : Easy way to move the viewport #189

juliandescottes opened this issue Jun 24, 2014 · 7 comments
Assignees

Comments

@juliandescottes
Copy link
Collaborator

From suggestion on http://www.reddit.com/r/gamedev/comments/28uxd9/piskel_new_online_pixel_art_app_for_creating/

When zoomed in, have a convenient way of moving the viewport, such as :

  • hold middle button + move
  • (something else for touchpads ? keyboard key to hold while doing a mouse move ?)
@captainbrosset
Copy link
Contributor

For what it's worth, photoshop has a hand/move tool, easily accessed via the 'H' shortcut. I use it all the time when zoomed in. Middle-click sounds good too, if it's not needed for other tools.

@grahammutter
Copy link

I'm going to try to implement this on monday+tuesday

@juliandescottes
Copy link
Collaborator Author

@gdot5 Cool !

You can start looking at pskl.controller.DrawingController, that's where all mouse events for the drawing zone are handled.

Let us know if you need help !

@grahammutter
Copy link

I like having the middle mouse button for the color-picker. Maybe holding both mouse_buttons down while moving the mouse the mouse would be a good alternative?

@juliandescottes
Copy link
Collaborator Author

I also want to keep the middle button click for the color picker, I use it all the time.
Technically I think we could support both.

Right now the color-picking is bound to a mousedown event I think. We could move it to the mouseup and have the following logic :

  • if mousedown + mouseup occured on the same pixel : colorpicker
  • if the user drags the mouse after the mousedown and leaves the pixel of the mousedown : start moving the viewport

So it's feasible, a prototype to see if it's easy to use would be nice.

Otherwise, we can :

  • create a new tool to move the viewport.Would only be useful when zoomed in, not sure it's worth the extra UI
  • use a metakey + primary/secondary button, but we already have several tools using ctrl or shift ... this leaves only alt available, but I want to keep it for tools in the future
  • use a metakey + middle button : at least there's no conflict with anything else, quite easy to prototype

From this list I like two options :

  • support both color picker + move viewport on middle button, with the logic I described above
  • use a metakey + middle button

@je2mz
Copy link

je2mz commented Jul 17, 2014

Yes, I think this is a must!

@juliandescottes juliandescottes self-assigned this Nov 23, 2014
juliandescottes added a commit that referenced this issue Nov 23, 2014
@juliandescottes
Copy link
Collaborator Author

Implemented via middle mouse button in 0.4.0

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

No branches or pull requests

4 participants