-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
Conversation
There was a problem hiding this 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.
There was a problem hiding this 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!
ready for another review |
src/UI/TransparentChecker.gd
Outdated
@@ -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)) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed it
There was a problem hiding this 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)
I have added more tiling options like tile in x axis, y axis and both axis together.