Skip to content

Commit d8a2e2b

Browse files
authored
[Community] [Screen orientation checker] Remove the background color property (#1855)
- The color can be set on the shape painter directly from the variant editor
1 parent 77d2127 commit d8a2e2b

File tree

1 file changed

+185
-26
lines changed

1 file changed

+185
-26
lines changed

extensions/community/ScreenOrientationChecker.json

Lines changed: 185 additions & 26 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.2.0",
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,85 @@
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": [
392+
{
393+
"fullName": "",
394+
"functionType": "Action",
395+
"name": "onCreated",
396+
"sentence": "",
397+
"events": [
398+
{
399+
"type": "BuiltinCommonInstructions::Standard",
400+
"conditions": [],
401+
"actions": [
402+
{
403+
"type": {
404+
"value": "PrimitiveDrawing::ClearBetweenFrames"
405+
},
406+
"parameters": [
407+
"BackgroundPainter",
408+
""
409+
]
410+
}
411+
]
412+
}
413+
],
414+
"parameters": [
415+
{
416+
"description": "Object",
417+
"name": "Object",
418+
"supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker",
419+
"type": "object"
420+
}
421+
],
422+
"objectGroups": []
423+
},
376424
{
377425
"fullName": "",
378426
"functionType": "Action",
379427
"name": "doStepPostEvents",
380428
"sentence": "",
381429
"events": [
430+
{
431+
"type": "BuiltinCommonInstructions::Standard",
432+
"conditions": [
433+
{
434+
"type": {
435+
"value": "ScreenOrientationChecker::IsInGameEdition"
436+
},
437+
"parameters": [
438+
"",
439+
""
440+
]
441+
}
442+
],
443+
"actions": [
444+
{
445+
"type": {
446+
"value": "ScreenOrientationChecker::ScreenOrientationChecker::DrawBackground"
447+
},
448+
"parameters": [
449+
"Object",
450+
""
451+
]
452+
}
453+
]
454+
},
382455
{
383456
"type": "BuiltinCommonInstructions::Standard",
384457
"conditions": [
@@ -612,24 +685,11 @@
612685
"actions": [
613686
{
614687
"type": {
615-
"value": "PrimitiveDrawing::FillColor"
688+
"value": "ScreenOrientationChecker::ScreenOrientationChecker::DrawBackground"
616689
},
617690
"parameters": [
618-
"BackgroundPainter",
619-
"BackgroundColor"
620-
]
621-
},
622-
{
623-
"type": {
624-
"value": "PrimitiveDrawing::RoundedRectangle"
625-
},
626-
"parameters": [
627-
"BackgroundPainter",
628-
"Padding",
629-
"Padding",
630-
"Object.Width()-Padding",
631-
"Object.Height()-Padding",
632-
"CornerRadius"
691+
"Object",
692+
""
633693
]
634694
},
635695
{
@@ -846,11 +906,48 @@
846906
],
847907
"objectGroups": []
848908
},
909+
{
910+
"description": "Draw the background.",
911+
"fullName": "Draw the background",
912+
"functionType": "Action",
913+
"name": "DrawBackground",
914+
"private": true,
915+
"sentence": "Draw the background of _PARAM0_",
916+
"events": [
917+
{
918+
"type": "BuiltinCommonInstructions::Standard",
919+
"conditions": [],
920+
"actions": [
921+
{
922+
"type": {
923+
"value": "PrimitiveDrawing::RoundedRectangle"
924+
},
925+
"parameters": [
926+
"BackgroundPainter",
927+
"Padding",
928+
"Padding",
929+
"Object.Width()-Padding",
930+
"Object.Height()-Padding",
931+
"CornerRadius"
932+
]
933+
}
934+
]
935+
}
936+
],
937+
"parameters": [
938+
{
939+
"description": "Object",
940+
"name": "Object",
941+
"supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker",
942+
"type": "object"
943+
}
944+
],
945+
"objectGroups": []
946+
},
849947
{
850948
"description": "Check if the screen should be forced to be shown. Use this to test the screen in your game.",
851949
"fullName": "Force show the screen",
852950
"functionType": "Condition",
853-
"group": "Screen Orientation Checker configuration",
854951
"name": "IsForceShown",
855952
"sentence": "_PARAM0_ is forced to be shown",
856953
"events": [
@@ -894,7 +991,6 @@
894991
"description": "Change if the screen should be forced to be shown. Use this to test the screen in your game.",
895992
"fullName": "Force show the screen",
896993
"functionType": "Action",
897-
"group": "Screen Orientation Checker configuration",
898994
"name": "SetIsForceShown",
899995
"sentence": "Force _PARAM0_ to be shown: _PARAM1_",
900996
"events": [
@@ -970,6 +1066,76 @@
9701066
}
9711067
],
9721068
"objectGroups": []
1069+
},
1070+
{
1071+
"description": "the message of the object.",
1072+
"fullName": "Message",
1073+
"functionType": "ExpressionAndCondition",
1074+
"name": "Message",
1075+
"sentence": "the message",
1076+
"events": [
1077+
{
1078+
"type": "BuiltinCommonInstructions::Standard",
1079+
"conditions": [],
1080+
"actions": [
1081+
{
1082+
"type": {
1083+
"value": "SetReturnString"
1084+
},
1085+
"parameters": [
1086+
"Text.Text::Value()"
1087+
]
1088+
}
1089+
]
1090+
}
1091+
],
1092+
"expressionType": {
1093+
"type": "string"
1094+
},
1095+
"parameters": [
1096+
{
1097+
"description": "Object",
1098+
"name": "Object",
1099+
"supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker",
1100+
"type": "object"
1101+
}
1102+
],
1103+
"objectGroups": []
1104+
},
1105+
{
1106+
"fullName": "",
1107+
"functionType": "ActionWithOperator",
1108+
"getterName": "Message",
1109+
"name": "SetMessage",
1110+
"sentence": "",
1111+
"events": [
1112+
{
1113+
"type": "BuiltinCommonInstructions::Standard",
1114+
"conditions": [],
1115+
"actions": [
1116+
{
1117+
"type": {
1118+
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
1119+
},
1120+
"parameters": [
1121+
"Text",
1122+
"Text",
1123+
"=",
1124+
"Value"
1125+
]
1126+
}
1127+
]
1128+
}
1129+
],
1130+
"parameters": [
1131+
{
1132+
"description": "Object",
1133+
"name": "Object",
1134+
"supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker",
1135+
"type": "object"
1136+
}
1137+
],
1138+
"objectGroups": []
9731139
}
9741140
],
9751141
"propertyDescriptors": [
@@ -1003,13 +1169,6 @@
10031169
"description": "Corner radius for the background",
10041170
"group": "Appearance",
10051171
"name": "CornerRadius"
1006-
},
1007-
{
1008-
"value": "0;0;0",
1009-
"type": "Color",
1010-
"label": "Background color",
1011-
"group": "Appearance",
1012-
"name": "BackgroundColor"
10131172
}
10141173
]
10151174
}

0 commit comments

Comments
 (0)