Skip to content

Commit c3eda1b

Browse files
committed
[Community] [Screen orientation checker] Handle hot-reload
1 parent 9877358 commit c3eda1b

File tree

1 file changed

+145
-17
lines changed

1 file changed

+145
-17
lines changed

extensions/community/ScreenOrientationChecker.json

Lines changed: 145 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "ScreenOrientationChecker",
1010
"previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/0126888931a4a4f82bb2824df9f096347ace1c47f510c44df42aa8dc9e49e24a_screen-rotation.svg",
1111
"shortDescription": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.",
12-
"version": "0.1.2",
12+
"version": "0.1.3",
1313
"description": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.",
1414
"origin": {
1515
"identifier": "ScreenOrientationChecker",
@@ -296,6 +296,7 @@
296296
"ambientLightColorB": 200,
297297
"ambientLightColorG": 200,
298298
"ambientLightColorR": 200,
299+
"camera2DPlaneMaxDrawingDistance": 5000,
299300
"camera3DFarPlaneDistance": 10000,
300301
"camera3DFieldOfView": 45,
301302
"camera3DNearPlaneDistance": 3,
@@ -372,13 +373,53 @@
372373
"initialVariables": []
373374
}
374375
],
376+
"editionSettings": {
377+
"grid": false,
378+
"gridType": "rectangular",
379+
"gridWidth": 32,
380+
"gridHeight": 32,
381+
"gridDepth": 32,
382+
"gridOffsetX": 0,
383+
"gridOffsetY": 0,
384+
"gridOffsetZ": 0,
385+
"gridColor": 10401023,
386+
"gridAlpha": 0.8,
387+
"snap": false,
388+
"zoomFactor": 1.75,
389+
"windowMask": false
390+
},
375391
"eventsFunctions": [
376392
{
377393
"fullName": "",
378394
"functionType": "Action",
379395
"name": "doStepPostEvents",
380396
"sentence": "",
381397
"events": [
398+
{
399+
"type": "BuiltinCommonInstructions::Standard",
400+
"conditions": [
401+
{
402+
"type": {
403+
"value": "ScreenOrientationChecker::IsInGameEdition"
404+
},
405+
"parameters": [
406+
"",
407+
""
408+
]
409+
}
410+
],
411+
"actions": [
412+
{
413+
"type": {
414+
"value": "ScreenOrientationChecker::ScreenOrientationChecker::DrawBackground"
415+
},
416+
"parameters": [
417+
"Object",
418+
""
419+
]
420+
}
421+
]
422+
},
382423
{
383424
"type": "BuiltinCommonInstructions::Standard",
384425
"conditions": [
@@ -612,24 +653,11 @@
612653
"actions": [
613654
{
614655
"type": {
615-
"value": "PrimitiveDrawing::FillColor"
616-
},
617-
"parameters": [
618-
"BackgroundPainter",
619-
"BackgroundColor"
620-
]
621-
},
622-
{
623-
"type": {
624-
"value": "PrimitiveDrawing::RoundedRectangle"
656+
"value": "ScreenOrientationChecker::ScreenOrientationChecker::DrawBackground"
625657
},
626658
"parameters": [
627-
"BackgroundPainter",
628-
"Padding",
629-
"Padding",
630-
"Object.Width()-Padding",
631-
"Object.Height()-Padding",
632-
"CornerRadius"
659+
"Object",
660+
""
633661
]
634662
},
635663
{
@@ -846,6 +874,87 @@
846874
],
847875
"objectGroups": []
848876
},
877+
{
878+
"description": "Draw the background.",
879+
"fullName": "Draw the background",
880+
"functionType": "Action",
881+
"name": "DrawBackground",
882+
"private": true,
883+
"sentence": "Draw the background of _PARAM0_",
884+
"events": [
885+
{
886+
"type": "BuiltinCommonInstructions::Standard",
887+
"conditions": [],
888+
"actions": [
889+
{
890+
"type": {
891+
"value": "PrimitiveDrawing::FillColor"
892+
},
893+
"parameters": [
894+
"BackgroundPainter",
895+
"BackgroundColor"
896+
]
897+
},
898+
{
899+
"type": {
900+
"value": "PrimitiveDrawing::RoundedRectangle"
901+
},
902+
"parameters": [
903+
"BackgroundPainter",
904+
"Padding",
905+
"Padding",
906+
"Object.Width()-Padding",
907+
"Object.Height()-Padding",
908+
"CornerRadius"
909+
]
910+
}
911+
]
912+
}
913+
],
914+
"parameters": [
915+
{
916+
"description": "Object",
917+
"name": "Object",
918+
"supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker",
919+
"type": "object"
920+
}
921+
],
922+
"objectGroups": []
923+
},
924+
{
925+
"fullName": "",
926+
"functionType": "Action",
927+
"name": "onHotReloading",
928+
"sentence": "",
929+
"events": [
930+
{
931+
"type": "BuiltinCommonInstructions::Standard",
932+
"conditions": [],
933+
"actions": [
934+
{
935+
"type": {
936+
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
937+
},
938+
"parameters": [
939+
"Text",
940+
"Text",
941+
"=",
942+
"Message"
943+
]
944+
}
945+
]
946+
}
947+
],
948+
"parameters": [
949+
{
950+
"description": "Object",
951+
"name": "Object",
952+
"supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker",
953+
"type": "object"
954+
}
955+
],
956+
"objectGroups": []
957+
},
849958
{
850959
"description": "Check if the screen should be forced to be shown. Use this to test the screen in your game.",
851960
"fullName": "Force show the screen",
@@ -1010,6 +1119,25 @@
10101119
"label": "Background color",
10111120
"group": "Appearance",
10121121
"name": "BackgroundColor"
1122+
},
1123+
{
1124+
"value": "Rotate screen to play",
1125+
"type": "String",
1126+
"label": "Message",
1127+
"name": "Message"
1128+
},
1129+
{
1130+
"value": "",
1131+
"type": "Choice",
1132+
"label": "",
1133+
"choices": [
1134+
{
1135+
"label": "",
1136+
"value": "Text.Text=Message"
1137+
}
1138+
],
1139+
"hidden": true,
1140+
"name": "_PropertyMapping"
10131141
}
10141142
]
10151143
}

0 commit comments

Comments
 (0)