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

Tilemap scroll #687

Merged
merged 7 commits into from Oct 13, 2018
Merged

Tilemap scroll #687

merged 7 commits into from Oct 13, 2018

Conversation

helle253
Copy link
Contributor

@helle253 helle253 commented Oct 3, 2018

Related to #630
Added shift+click functionality:
Allows the user to continue editing the selection rectangle in the tile palette after un-clicking. This lets the user modify the selection rectangle at will, without the need to constantly select an 'anchor point' if they want to add a row or column.

Added middle mouse scrolling:
Pressing the middle mouse button now allows the user to dynamically pan around the tile palette window.

These two additional functionalities are atomic. One cannot occur while the other is occurring and vice versa. (this also applies to just left clicking and attempting to scroll)

@helle253
Copy link
Contributor Author

helle253 commented Oct 3, 2018

In addition to updating the shift + click to no longer need to move, also fixed a bug that prevented the user from 'clearing' the selection rectangle via a right click.
It should be noted that the shift + click functionality ALWAYS uses the last 'left click' anchor point, even if no rectangle is present. e.g.

  1. select a rectangle normally
  2. right click to clear the selection rectangle
  3. shift + click on a different spot, note that a new selection anchor point is not generated, it uses the one generated on step 1.

I don't know if this qualifies as a bug or something where either behavior would be acceptable, but I would certainly be happy to hear input.

This has been fixed. I realized shift+click prior to ANY selection rectangle used (0,0) as the anchor, which I felt wasn't appropriate.

@ilexp ilexp added Feature It doesn't exist yet, but I want it Editor Area: Duality editor or support libraries Plugin Area: Misc. core / editor plugins labels Oct 3, 2018
@ilexp ilexp added this to the General milestone Oct 3, 2018
@ilexp ilexp requested a review from a team October 3, 2018 07:05
@ilexp
Copy link
Member

ilexp commented Oct 3, 2018

Thanks for the PR! I'll leave this open for community review and will join in shortly.

Copy link
Contributor

@mfep mfep left a comment

Choose a reason for hiding this comment

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

Thanks @helle253 for the PR. I had a look at it, seems pretty solid.
On the functional side:

  • New shift-click multi-tile selection - ✔️
  • Original multi-tile selection by mouse drag - ✔️
  • New scrolling holding the middle mouse button - ✔️
  • Original breakup of the tileset when it fits better horizontally - ✔️

The code is clean and compliant with the style guidelines.

@helle253
Copy link
Contributor Author

helle253 commented Oct 5, 2018

I did notice another minor bug w/ the selection rectangle in the tile palette. When resizing, if tiles within the selection are moved, the rectangle does not reset. It appears to use the first item in the next row as whatever it is pasting for the 'blank' rectangles.

This occurs in the master branch, so I don't think it's an issue introduced by me. I'll file an issue when I get a chance to record footage.

@ilexp
Copy link
Member

ilexp commented Oct 6, 2018

@mfep Thanks for reviewing! Sounds like we'll be ready for merge.

I'll have a brief second look, hopefully soon, so we can wrap this up.

This occurs in the master branch, so I don't think it's an issue introduced by me. I'll file an issue when I get a chance to record footage.

👍

@ilexp ilexp merged commit 4f19c4c into AdamsLair:master Oct 13, 2018
@ilexp
Copy link
Member

ilexp commented Oct 13, 2018

Merged as per review by @mfep. Thanks everyone! 🙂

@ilexp ilexp added Tilemaps Area: Tilemaps core / editor plugins and removed Plugin Area: Misc. core / editor plugins labels Jul 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Editor Area: Duality editor or support libraries Feature It doesn't exist yet, but I want it Tilemaps Area: Tilemaps core / editor plugins
Development

Successfully merging this pull request may close these issues.

None yet

3 participants