-
Notifications
You must be signed in to change notification settings - Fork 53
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
Conversation
Hello @weadsy 👋 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 ❤️ |
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?"
…On Sat, Jul 29, 2023 at 1:11 PM VegeTato ***@***.***> wrote:
Hello @weadsy
<https://urldefense.com/v3/__https://github.com/weadsy__;!!IKRxdwAv5BmarQ!cx7tsAPqWx-UKVfZ2RQCGMTYwfPWYqJc3D8Wwcp7-re4pCIC0eDKu2AsA2ibxfBCTMwtfPQ_y8RsXRC2asm7rvIW$>
👋
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 ❤️
—
Reply to this email directly, view it on GitHub
<https://urldefense.com/v3/__https://github.com/GDevelopApp/GDevelop-extensions/pull/946*issuecomment-1656867415__;Iw!!IKRxdwAv5BmarQ!cx7tsAPqWx-UKVfZ2RQCGMTYwfPWYqJc3D8Wwcp7-re4pCIC0eDKu2AsA2ibxfBCTMwtfPQ_y8RsXRC2aoOVaPNz$>,
or unsubscribe
<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/BBN32FJL34ED4L4WAEZHABLXSVU7NANCNFSM6AAAAAA2T3DILY__;!!IKRxdwAv5BmarQ!cx7tsAPqWx-UKVfZ2RQCGMTYwfPWYqJc3D8Wwcp7-re4pCIC0eDKu2AsA2ibxfBCTMwtfPQ_y8RsXRC2aoRp4F9P$>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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 ?
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. So if you implement 3, you fix everything 💪 |
Sounds good, I will get back to you when I finish :)
…On Sat, Jul 29, 2023 at 2:42 PM VegeTato ***@***.***> wrote:
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 💪
—
Reply to this email directly, view it on GitHub
<https://urldefense.com/v3/__https://github.com/GDevelopApp/GDevelop-extensions/pull/946*issuecomment-1656916185__;Iw!!IKRxdwAv5BmarQ!d-T9bVkrlsYONe2DcaJYyTTE7eEcaLLWMMj9EiWN5UrnFVwMO0HZaRX0jRdgMf8XcYsSOM2rJu_F_nYm-4LitwTG$>,
or unsubscribe
<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/BBN32FMBB4FHLLBOE2N2WOTXSV7S3ANCNFSM6AAAAAA2T3DILY__;!!IKRxdwAv5BmarQ!d-T9bVkrlsYONe2DcaJYyTTE7eEcaLLWMMj9EiWN5UrnFVwMO0HZaRX0jRdgMf8XcYsSOM2rJu_F_nYm-5emZFYJ$>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Since this PR has been inactive for almost a year, I'm closing this PR. Related PR: |
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
What tier of review do you aim for your extension?
Community (Unreviewed)
Example file
Grid Overlay Demo.zip
Extension file
ToggleGridOverlay.zip