Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 156 additions & 0 deletions extensions/community/ScreenOrientation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
{
"author": "",
"category": "Game mechanic",
"extensionNamespace": "",
"fullName": "Screen Orientation",
"gdevelopVersion": "",
"helpPath": "",
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggZD0iTTI3LDE0SDVjLTAuNCwwLTAuNywwLjEtMSwwLjJWOGgxMnY0YzAsMC42LDAuNCwxLDEsMXMxLTAuNCwxLTFWNWMwLTEuNy0xLjMtMy0zLTNINUMzLjMsMiwyLDMuMywyLDV2MTJ2MTANCgljMCwxLjcsMS4zLDMsMywzaDIyYzEuNywwLDMtMS4zLDMtM1YxN0MzMCwxNS4zLDI4LjcsMTQsMjcsMTR6IE03LDIzYzAsMC42LTAuNCwxLTEsMXMtMS0wLjQtMS0xdi0yYzAtMC42LDAuNC0xLDEtMXMxLDAuNCwxLDFWMjN6DQoJIE0yNCwyOEgxMFYxNmgxNFYyOHoiLz4NCjxwYXRoIGQ9Ik0xOS45LDUuMUMyMi44LDUuNSwyNSw4LDI1LDExYzAsMC40LDAuMywwLjgsMC43LDAuOWMwLjEsMCwwLjIsMC4xLDAuMywwLjFjMC4zLDAsMC42LTAuMSwwLjgtMC40bDMtNA0KCWMwLjMtMC40LDAuMi0xLjEtMC4yLTEuNGMtMC40LTAuMy0xLjEtMC4yLTEuNCwwLjJsLTEuNiwyLjFjLTAuOS0yLjgtMy40LTUtNi40LTUuNEMxOS42LDMsMTkuMSwzLjQsMTksMy45QzE5LDQuNSwxOS4zLDUsMTkuOSw1LjENCgl6Ii8+DQo8L3N2Zz4NCg==",
"name": "ScreenOrientation",
"previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Computers and Hardware/3b0c6e05075b0db18a2931d72d18e8aff2c613106b66af9d60717a308c0122ad_Computers and Hardware_phone_rotate_rotation_arrow.svg",
"shortDescription": "Screen Orientation\nUsed to force landscape, portrait or both.",
"version": "1.0.0",
"description": "Version 1.0.0",
"tags": [
"Orientation"
],
"authorIds": [
"mu1pKMrGmTTX98LMxHYJ62GzFyJ2"
],
"dependencies": [],
"globalVariables": [],
"sceneVariables": [],
"eventsFunctions": [
{
"description": "Screen Orientation \"Landscape, Portrait Or Both\").",
"fullName": "Screen Orientation",
"functionType": "Action",
"name": "ScreenOrientation",
"sentence": "_PARAM1_",
"events": [
{
"folded": true,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "StringVariable"
},
"parameters": [
"ScreenOrientation",
"=",
"\"Landscape\""
]
}
],
"actions": [
{
"type": {
"value": "SetFullScreen"
},
"parameters": [
"",
"yes",
"yes"
]
}
],
"events": [
{
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": " screen.orientation.lock('landscape');",
"parameterObjects": "",
"useStrict": true,
"eventsSheetExpanded": false
}
]
},
{
"folded": true,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "StringVariable"
},
"parameters": [
"ScreenOrientation",
"=",
"\"Portrait\""
]
}
],
"actions": [
{
"type": {
"value": "SetFullScreen"
},
"parameters": [
"",
"yes",
"yes"
]
}
],
"events": [
{
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": " screen.orientation.lock('portrait');",
"parameterObjects": "",
"useStrict": true,
"eventsSheetExpanded": false
}
]
},
{
"folded": true,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "StringVariable"
},
"parameters": [
"ScreenOrientation",
"=",
"\"Both\""
]
}
],
"actions": [
{
"type": {
"value": "SetFullScreen"
},
"parameters": [
"",
"yes",
"yes"
]
}
],
"events": [
{
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": " screen.orientation.unlock()",
"parameterObjects": "",
"useStrict": true,
"eventsSheetExpanded": false
}
]
}
],
"parameters": [
{
"description": "Screen Orientation",
"name": "ScreenOrientation",
"supplementaryInformation": "[\"Landscape \",\"Portrait\",\"Both\"]",
"type": "stringWithSelector"
}
],
"objectGroups": []
}
],
"eventsBasedBehaviors": [],
"eventsBasedObjects": []
}