Skip to content

New extension: Align to Screen #1582

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

Open
3 tasks done
Atikksh opened this issue Mar 13, 2025 · 3 comments
Open
3 tasks done

New extension: Align to Screen #1582

Atikksh opened this issue Mar 13, 2025 · 3 comments
Labels
✨ New extension A new extension

Comments

@Atikksh
Copy link

Atikksh commented Mar 13, 2025

Description

This extension adds four behaviours:

Align to Screen:

  • Move the instance of an object to a certain distance away from a chosen edge
  • Keep the object centered

Expand with Screen (For 9-Patches):

  • Without moving the object, resize it to be a certain distance from any edge or all edges

Space objects evenly (Multiple instances of an object):

  • Space the objects evenly with a margin from the edges
  • Space the objects evenly with a given spacing between them and center the group
  • Works only from left to right as of version 1

Space objects evenly:

  • A seperate behaviour for text objects.

How to use the extension

If you put behaviour Align to Screen on an object, five new actions are added. There are four actions that place it a certain distance from a given edge. The 5th action centers the object on the screen.

If you put behaviour Expand with Screen on a 9-Patch, one new action is added. This action can be used to resize it such that it is a certain distance from a given edge or all edges.

If you put behaviour Space objects evenly on a sprite or a text (there are two seperate functions for these), it adds two new actions. The first action spaces the objects evenly with the first and last touching the left and right edges or a specified distance from those edges. The second action spaces the objects evenly with a given spacing and aligns them to the center.

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

Extension file

AlignToScreen.zip

@Atikksh Atikksh added the ✨ New extension A new extension label Mar 13, 2025
Copy link
Contributor

👋 Thanks for your submission! We are kind of confused; Your zip file contained more than one JSON file, and only one extension can be submitted at a time. Please update your original submission post with a new zip file containing only one extension file 🙏

Copy link
Contributor

👋 Thanks for your submission! We are sorry, but the filename of the extension has unrecognized characters. Since filenames with non latin characters ("ASCII") can cause issues, our system won't allow file names with other characters than latin upper- and lowercase characters or numbers. Additionally, the first character must be an uppercase character. Please update your original submission post with a new zip file containing your extension with another file name following those guidelines 🙏

Copy link
Contributor

👋 Thanks for your submission! Unfortunately, all submitted extensions have to meet some minimal quality standard - the extension best practices - and our system has found that your extension does not fully comply 😔. You can find all of those rules on the GDevelop wiki.

The following issues have been found by the system concerning the respect of those best practices by your extension:

  ⟶ ❌ [Dots in sentences]: Field 'fullName' of the extension description has a dot, but it is forbidden there!
  ⟶ ❌ [Dots in sentences]: Field 'description' of the function 'From_left_edge' misses a dot at the end of the sentence!
  ⟶ ❌ [Dots in sentences]: Field 'description' of the function 'From_top_edge' misses a dot at the end of the sentence!
  ⟶ ❌ [Dots in sentences]: Field 'description' of the function 'From_right_edge' misses a dot at the end of the sentence!
  ⟶ ❌ [Dots in sentences]: Field 'description' of the function 'From_bottom_edge' misses a dot at the end of the sentence!
  ⟶ ❌ [Dots in sentences]: Field 'description' of the function 'Expand_to_Left' misses a dot at the end of the sentence!
  ⟶ ❌ [Dots in sentences]: Field 'description' of the function 'Left_Right parameter 'Instance_ID' has a dot, but it is forbidden there!
  ⟶ ❌ [Dots in sentences]: Field 'sentence' of the function 'Left_Right_Sp' has a dot, but it is forbidden there!
  ⟶ ❌ [Dots in sentences]: Field 'description' of the function 'Left_Right_Sp parameter 'Instance_ID' has a dot, but it is forbidden there!
  ⟶ ❌ [Dots in sentences]: Field 'description' of the function 'Left_Right parameter 'Instance_ID' has a dot, but it is forbidden there!
  ⟶ ❌ [Dots in sentences]: Field 'sentence' of the function 'Left_Right_Sp' has a dot, but it is forbidden there!
  ⟶ ❌ [Dots in sentences]: Field 'description' of the function 'Left_Right_Sp parameter 'Instance_ID' has a dot, but it is forbidden there!
  ⟶ ❌ [Dots in sentences]: Field 'description' of the behavior 'Align_Single_Item' misses a dot at the end of the sentence!
  ⟶ ❌ [Dots in sentences]: Field 'description' of the behavior 'Expand_with_screen' misses a dot at the end of the sentence!
  ⟶ ❌ [Dots in sentences]: Field 'description' of the behavior 'Space_Evenly' misses a dot at the end of the sentence!
  ⟶ ❌ [Dots in sentences]: Field 'description' of the behavior 'Space_Evenly_Text' misses a dot at the end of the sentence!
  ⟶ ❌ [Filled out names and descriptions]: Required field 'description' of the function 'Expand_to_Left parameter 'Distance' is not filled out!
  ⟶ ❌ [Filled out names and descriptions]: Required field 'description' of the function 'Expand_to_Left parameter 'Edge' is not filled out!
  ⟶ ❌ [Semantic versioning]: Version '1' is not a semantic versioning compliant version number!

Please update your original submission post with a new zip file containing your extensions updated to follow those guidelines 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ New extension A new extension
Projects
None yet
Development

No branches or pull requests

1 participant