From 1a7c96f2dde0e584bed8e51b75444a9466a339e1 Mon Sep 17 00:00:00 2001 From: Oongus-Boongus Date: Fri, 7 Jul 2023 15:25:19 +0000 Subject: [PATCH] Automated Extension submission for issue #923 --- extensions/community/CornerPositioning.json | 190 ++++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 extensions/community/CornerPositioning.json diff --git a/extensions/community/CornerPositioning.json b/extensions/community/CornerPositioning.json new file mode 100644 index 000000000..368d3a6a1 --- /dev/null +++ b/extensions/community/CornerPositioning.json @@ -0,0 +1,190 @@ +{ + "author": "", + "category": "General", + "extensionNamespace": "", + "fullName": "Corner Positioning", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFuZ2xlLXJpZ2h0IiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTUsNEg3VjExSDEzVjE3SDIwVjE5SDVWNE03LDE3SDExVjEzSDdWMTdaIiAvPjwvc3ZnPg==", + "name": "CornerPositioning", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/8d68b10cb3fb79ea0e0a35880e38587324f78d09866060738c2d0d83a8ee1537_angle-right.svg", + "shortDescription": "Position objects in the corner of the screen. Useful when camera is zoomed in. (Made for 2D).", + "version": "1.0.0", + "description": [ + "Position objects in the corner of the screen. Useful when camera is zoomed in. (Made for 2D).", + "", + "Want to place something in the top left, bottom right, etc corners? This extension makes it easy to do so, even when the camera is zoomed in!", + "", + "**Two Expressions:**", + "X: Specify whether you want to the **left** or **right** side of the screen.", + "Y: Specify whether you want to the **top** or **bottom** side of the screen.", + "", + "Make sure to specify the camera layer and number! *(Assumes base layer and camera 0 by default!)*." + ], + "tags": [ + "position", + "positioning", + "corner" + ], + "authorIds": [ + "J2SaQql6EAMYgmodNOo36YTsouI3" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Change the X position of the object to either the left or right corner(s).", + "fullName": "Corner X", + "functionType": "Expression", + "name": "X", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"Corner\"", + "=", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "(SceneWindowWidth() / 2) - ((SceneWindowWidth() / CameraZoom()) / 2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"Corner\"", + "=", + "\"Right\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "(SceneWindowWidth() / 2) - ((SceneWindowWidth() / CameraZoom()) / 2) + (SceneWindowWidth() / CameraZoom())" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"Left Corner\",\"Right Corner\"]", + "type": "expression" + }, + "parameters": [ + { + "description": "Corner Type", + "name": "Corner", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + }, + { + "description": "Camera Layer", + "name": "Layer", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "description": "Change the Y position of the object to either the top or bottom corner(s).", + "fullName": "Corner Y", + "functionType": "Expression", + "name": "Y", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"Corner\"", + "=", + "\"Top\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "(SceneWindowHeight() / 2) - ((SceneWindowHeight() / CameraZoom()) / 2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"Corner\"", + "=", + "\"Bottom\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "(SceneWindowHeight() / 2) - ((SceneWindowHeight() / CameraZoom()) / 2) + (SceneWindowHeight() / CameraZoom())" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"Top Corner\",\"Bottom Corner\"]", + "type": "expression" + }, + "parameters": [ + { + "description": "Corner Type", + "name": "Corner", + "supplementaryInformation": "[\"Top\",\"Bottom\"]", + "type": "stringWithSelector" + }, + { + "description": "Camera Layer", + "name": "Layer", + "type": "layer" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] +} \ No newline at end of file