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

New extension: ToggleGridOverlay #946

Closed
wants to merge 1 commit into from
Closed

Conversation

github-actions[bot]
Copy link
Contributor

Description

Use this action to toggle a grid overlay on the screen using a button

-Mainly intended to be used with the snap to grid extension, but can be used for anything that requires a grid.
-You can change the size of the squares and the offset on the X and Y axis
-Change line color and Z-Order
-Use a button with this action to toggle the grid on or off
-All this extension requires is an object for the button and a shape painter object, no prior setup is needed.

How to use the extension

Using a button and shape painter with this action you can toggle a grid overlay on and off. By specifying the cell width/height, any offsets on the x/y axis, the line color, and the z-order, you can make a perfect grid to your specifications. By setting the cell width/height to that of the snap to grid parameters, the grid overlay will show exactly where an object can be dragged/moved. The grid can also be useful when it comes to alignment of objects during runtime, especially if snap to grid is not used. For the best performance it is recommended to set the cell height and width to numbers that the screen width and height are divisible by. It is also recommended to use the "no changes to game size" option for the screen resolution.

Checklist

  • I've followed all of the best practices.
  • I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

What tier of review do you aim for your extension?

Community (Unreviewed)

Example file

Grid Overlay Demo.zip

Extension file

ToggleGridOverlay.zip

@github-actions github-actions bot requested a review from a team as a code owner July 22, 2023 13:40
@github-actions github-actions bot added the ✨ New extension A new extension label Jul 22, 2023
@github-actions github-actions bot mentioned this pull request Jul 22, 2023
3 tasks
@VegeTato VegeTato added the 👨‍👩‍👧‍👦 Community extension An extension submission to be merged ASAP with a lightweight review. label Jul 29, 2023
@VegeTato
Copy link
Contributor

Hello @weadsy 👋
Thanks for submitting this amazing extension ! ❤️
I found few things you need to fix 🛠️ :
1- The example you provided is .json.autosave, it should be .json
2- The example is missing assets inside.
3- Why the extension is depending on the button ? It would be cool if you can make it independent, leave this option open for the users to choose how they want to draw the grid.
4- The description (Toggle a grid overlay on and off with a button (This action must be run every frame).)
should be (Toggle a grid overlay on and off with a button (This action must run in every frame).)
5- Parameter names must follow the extension best practices:
gridButton → GridButton
cellWidth → CellWidth
cellHeight → CellHeight
thickness → Thickness
offsetX → OffsetX
offsetY → OffsetY
lineColor → LineColor
zOrder → ZOrder

6- Why are you using (wait 0.2 seconds) action ? Is it possible to not use it ? It's better to let the user decide such cases.

Fix them and let me know, so I can review the extension ❤️

@weadsy
Copy link

weadsy commented Jul 29, 2023 via email

@VegeTato
Copy link
Contributor

Thank you for the feedback VegeTato! I will implement those first 5 fixes right away. As for the 6th, it was used to combat the instant flip between toggles like how if you press a button that sets a boolean to false, but another button executes upon false that then flips the boolean to true, etc. Do you think I should just change it to a boolean variable and use the boolean toggle event, or should I keep it and add another parameter for the "cooldown?"

I think it's better to not get into any of this at all, since you said you will fix the first 5, it means you are going to fix 3 right ?

3- Why the extension is depending on the button ? It would be cool if you can make it independent, leave this option open for the users to choose how they want to draw the grid.

If so, then there is no need for the Wait action anymore because there is no button needed, which mean no need for the button boolean or variable.
And as for cooldown parameter, no need for it as well if you applied 3, because the user will be able to make his own cooldown if he wants or just make it instant draw.

So if you implement 3, you fix everything 💪

@weadsy
Copy link

weadsy commented Jul 30, 2023 via email

@D8H
Copy link
Contributor

D8H commented Mar 19, 2024

Since this PR has been inactive for almost a year, I'm closing this PR.
Feel free to open it back if you still want to continue working on this extension.

Related PR:

@D8H D8H closed this Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👨‍👩‍👧‍👦 Community extension An extension submission to be merged ASAP with a lightweight review. ✨ New extension A new extension
Projects
Status: Rejected
Development

Successfully merging this pull request may close these issues.

3 participants