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

Improved the tiling feature #378

Merged
merged 5 commits into from
Nov 13, 2020
Merged

Improved the tiling feature #378

merged 5 commits into from
Nov 13, 2020

Conversation

IsotoxalDev
Copy link
Contributor

I have added more tiling options like tile in x axis, y axis and both axis together.

Copy link
Member

@OverloadedOrama OverloadedOrama left a comment

Choose a reason for hiding this comment

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

Overall it looks good, but there is a bug when selecting a cel on the timeline, while one of the tile modes is active. The transparent background gets resized and it only fills the first square. To fix it, we could add this piece of code in TransparentChecker's _ready() method, under the if statement.

		match Global.tile_mode:
			Global.Tile_Mode.NONE:
				set_size(Global.current_project.size)
				set_position(Vector2.ZERO)
			Global.Tile_Mode.BOTH:
				set_size(Global.current_project.size*3)
				set_position(-Global.current_project.size)
			Global.Tile_Mode.XAXIS:
				set_size(Vector2(Global.current_project.size.x*3, Global.current_project.size.y*1))
				set_position(Vector2(-Global.current_project.size.x, 0))
			Global.Tile_Mode.YAXIS:
				set_size(Vector2(Global.current_project.size.x*1, Global.current_project.size.y*3))
				set_position(Vector2(0, -Global.current_project.size.x))

This basically checks the tile mode option and resizes the checker accordingly. There are also issues with the grid, especially with the isometric grid, but I will look into that later.

src/UI/TopMenuContainer.gd Show resolved Hide resolved
Copy link
Member

@OverloadedOrama OverloadedOrama left a comment

Choose a reason for hiding this comment

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

Much better now. I left 2 more comments, if you could also solve these small issues, I think the PR will be ready to get merged!

src/UI/TransparentChecker.gd Outdated Show resolved Hide resolved
src/UI/TopMenuContainer.gd Show resolved Hide resolved
@IsotoxalDev
Copy link
Contributor Author

ready for another review

@@ -36,7 +36,7 @@ func _init_position(id : int):
2:
Global.tile_mode = Global.Tile_Mode.XAXIS
Global.transparent_checker.set_size(Vector2(Global.current_project.size.x*3, Global.current_project.size.y*1))
Global.transparent_checker.set_position(Vector2(-Global.current_project.size.x, 0))
Global.transparent_checker.set_position(Vector2(-Global.current_project.size.y, 0))
Copy link
Member

Choose a reason for hiding this comment

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

This line was fine as it was, my comment was about YAXIS, line 43.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed it

Copy link
Member

@OverloadedOrama OverloadedOrama left a comment

Choose a reason for hiding this comment

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

Okay I think it's ready to get merged now. Thank you!

(Also, don't worry about the failed checks, they are unrelated to the PR)

@OverloadedOrama OverloadedOrama merged commit de4634e into Orama-Interactive:master Nov 13, 2020
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