Files
Clément Pasteau ce77414f85 Allow assigning variable owners for multiplayer games (#6651)
* Actions can be used at the beginning of the game or a scene, to define scene and global variables as synchronised by another player, or not synchronised at all
2024-06-14 15:37:37 +02:00

4888 lines
158 KiB
JSON

{
"firstLayout": "",
"gdVersion": {
"build": 99,
"major": 4,
"minor": 0,
"revision": 0
},
"properties": {
"adaptGameResolutionAtRuntime": true,
"antialiasingMode": "MSAA",
"antialisingEnabledOnMobile": false,
"folderProject": false,
"orientation": "landscape",
"packageName": "com.example.gamename",
"pixelsRounding": false,
"projectUuid": "654a1731-3cd7-4bb8-8092-e765e333cffd",
"scaleMode": "linear",
"sizeOnStartupMode": "adaptWidth",
"templateSlug": "",
"useExternalSourceFiles": false,
"version": "1.0.0",
"name": "Variables Sync",
"description": "",
"author": "",
"windowWidth": 1280,
"windowHeight": 720,
"latestCompilationDirectory": "",
"maxFPS": 60,
"minFPS": 20,
"verticalSync": false,
"platformSpecificAssets": {},
"loadingScreen": {
"backgroundColor": 0,
"backgroundFadeInDuration": 0.2,
"backgroundImageResourceName": "",
"gdevelopLogoStyle": "light",
"logoAndProgressFadeInDuration": 0.2,
"logoAndProgressLogoFadeInDelay": 0,
"minDuration": 1.5,
"progressBarColor": 16777215,
"progressBarHeight": 20,
"progressBarMaxWidth": 200,
"progressBarMinWidth": 40,
"progressBarWidthPercent": 30,
"showGDevelopSplash": true,
"showProgressBar": true
},
"watermark": {
"placement": "bottom-left",
"showWatermark": true
},
"authorIds": [],
"authorUsernames": [],
"categories": [],
"playableDevices": [],
"extensionProperties": [],
"platforms": [
{
"name": "GDevelop JS platform"
}
],
"currentPlatform": "GDevelop JS platform"
},
"resources": {
"resources": [
{
"alwaysLoaded": false,
"file": "assets/Blue Button_Hovered.png",
"kind": "image",
"metadata": "",
"name": "Blue Button_Hovered.png",
"smoothed": true,
"userAdded": false,
"origin": {
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/1ffd07cb739df2a909155dd3057f6def46b833ced6ef1a09527b6ea59e88e464_Blue Button_Hovered.png",
"name": "Blue Button_Hovered.png"
}
},
{
"alwaysLoaded": false,
"file": "assets/Blue Button_Idle.png",
"kind": "image",
"metadata": "",
"name": "Blue Button_Idle.png",
"smoothed": true,
"userAdded": false,
"origin": {
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/eeac55458b66fb84f756b38085fbf7d1e079c39363c942abd35ea9d0939465ce_Blue Button_Idle.png",
"name": "Blue Button_Idle.png"
}
},
{
"alwaysLoaded": false,
"file": "assets/Blue Button_Pressed.png",
"kind": "image",
"metadata": "",
"name": "Blue Button_Pressed.png",
"smoothed": true,
"userAdded": false,
"origin": {
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/f0ede8843d544f6e84bc09299a8aabffbce558966f25af98f7b47ab1648217ce_Blue Button_Pressed.png",
"name": "Blue Button_Pressed.png"
}
},
{
"alwaysLoaded": false,
"file": "assets/Red Button_Hovered.png",
"kind": "image",
"metadata": "",
"name": "Red Button_Hovered.png",
"smoothed": true,
"userAdded": false,
"origin": {
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/f1e231bf9ea89b842ac63e17cc41cab0dd3a5d88916ca3454d89872e85c239d7_Red Button_Hovered.png",
"name": "Red Button_Hovered.png"
}
},
{
"alwaysLoaded": false,
"file": "assets/Red Button_Idle.png",
"kind": "image",
"metadata": "",
"name": "Red Button_Idle.png",
"smoothed": true,
"userAdded": false,
"origin": {
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/673facf2cabe26813a9ac066e93c005e264c6222557999e56582a0fe73216f3f_Red Button_Idle.png",
"name": "Red Button_Idle.png"
}
},
{
"alwaysLoaded": false,
"file": "assets/Red Button_Pressed.png",
"kind": "image",
"metadata": "",
"name": "Red Button_Pressed.png",
"smoothed": true,
"userAdded": false,
"origin": {
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/e3269fc6a93f1d6083564069b4d14c7e31df6bfc96d27f82c791d2210242315a_Red Button_Pressed.png",
"name": "Red Button_Pressed.png"
}
},
{
"alwaysLoaded": false,
"file": "assets/Green Button_Hovered.png",
"kind": "image",
"metadata": "",
"name": "Green Button_Hovered.png",
"smoothed": true,
"userAdded": false,
"origin": {
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/bff6adc488c7379b21ceba34e9104e861791b2fbb54b4aae167fe90115b92fa3_Green Button_Hovered.png",
"name": "Green Button_Hovered.png"
}
},
{
"alwaysLoaded": false,
"file": "assets/Green Button_Idle.png",
"kind": "image",
"metadata": "",
"name": "Green Button_Idle.png",
"smoothed": true,
"userAdded": false,
"origin": {
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/f46d20e99495562ee66ee2f26defdb0788588184bd30b1f7b951ae728ce63d2a_Green Button_Idle.png",
"name": "Green Button_Idle.png"
}
},
{
"alwaysLoaded": false,
"file": "assets/Green Button_Pressed.png",
"kind": "image",
"metadata": "",
"name": "Green Button_Pressed.png",
"smoothed": true,
"userAdded": false,
"origin": {
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/ecb33703984d3107196efce7335025d7ec104351fe8cdeb581c73fe0b8038c34_Green Button_Pressed.png",
"name": "Green Button_Pressed.png"
}
},
{
"alwaysLoaded": false,
"file": "assets/Yellow Button_Hovered.png",
"kind": "image",
"metadata": "",
"name": "Yellow Button_Hovered.png",
"smoothed": true,
"userAdded": false,
"origin": {
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/c1e14acb64b9963341656c997853154dc4c86cd1c46fb12bfbe012d99712ef61_Yellow Button_Hovered.png",
"name": "Yellow Button_Hovered.png"
}
},
{
"alwaysLoaded": false,
"file": "assets/Yellow Button_Idle.png",
"kind": "image",
"metadata": "",
"name": "Yellow Button_Idle.png",
"smoothed": true,
"userAdded": false,
"origin": {
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/1cacfd123a1eb708837337c27982f6871f5127c5890dbf0775e0f411958fcbf1_Yellow Button_Idle.png",
"name": "Yellow Button_Idle.png"
}
},
{
"alwaysLoaded": false,
"file": "assets/Yellow Button_Pressed.png",
"kind": "image",
"metadata": "",
"name": "Yellow Button_Pressed.png",
"smoothed": true,
"userAdded": false,
"origin": {
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/928c3ea4db1da835c9f8cc5b7089a47228350209d2ff489e1484c31e5ce41b3d_Yellow Button_Pressed.png",
"name": "Yellow Button_Pressed.png"
}
}
],
"resourceFolders": []
},
"objects": [],
"objectsFolderStructure": {
"folderName": "__ROOT"
},
"objectsGroups": [],
"variables": [
{
"folded": true,
"name": "MyGlobalVar",
"type": "number",
"value": 0
},
{
"folded": true,
"name": "MyGlobalVarNotSynced",
"type": "number",
"value": 0
}
],
"layouts": [
{
"b": 209,
"disableInputWhenNotFocused": true,
"mangledName": "Menu",
"name": "Menu",
"r": 209,
"standardSortMethod": true,
"stopSoundsOnStartup": true,
"title": "",
"v": 209,
"uiSettings": {
"grid": false,
"gridType": "rectangular",
"gridWidth": 32,
"gridHeight": 32,
"gridOffsetX": 0,
"gridOffsetY": 0,
"gridColor": 10401023,
"gridAlpha": 0.8,
"snap": false,
"zoomFactor": 0.546875,
"windowMask": false
},
"objectsGroups": [],
"variables": [],
"instances": [
{
"angle": 0,
"customSize": false,
"height": 0,
"keepRatio": true,
"layer": "",
"name": "LobbyButton",
"persistentUuid": "f55b9e0b-a9b8-416e-9313-4703a4b3052a",
"width": 0,
"x": 485,
"y": 306,
"zOrder": 1,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
}
],
"objects": [
{
"assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d",
"name": "LobbyButton",
"type": "PanelSpriteButton::PanelSpriteButton",
"variables": [],
"effects": [],
"behaviors": [],
"content": {
"LeftPadding": 16,
"RightPadding": 16,
"PressedLabelOffsetY": 10,
"BottomPadding": 32,
"TopPadding": 16,
"HoveredFadeOutDuration": 0.25
},
"childrenContent": {
"Hovered": {
"bottomMargin": 32,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Blue Button_Hovered.png",
"tiled": true,
"topMargin": 16,
"width": 256
},
"Idle": {
"bottomMargin": 32,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Blue Button_Idle.png",
"tiled": true,
"topMargin": 16,
"width": 256
},
"Label": {
"bold": false,
"italic": false,
"smoothed": true,
"underlined": false,
"string": "Lobbies",
"font": "",
"textAlignment": "center",
"characterSize": 60,
"color": {
"b": 99,
"g": 69,
"r": 28
},
"content": {
"bold": false,
"isOutlineEnabled": false,
"isShadowEnabled": false,
"italic": false,
"outlineColor": "255;255;255",
"outlineThickness": 2,
"shadowAngle": 90,
"shadowBlurRadius": 2,
"shadowColor": "0;0;0",
"shadowDistance": 4,
"shadowOpacity": 127,
"smoothed": true,
"underlined": false,
"text": "Lobbies",
"font": "",
"textAlignment": "center",
"characterSize": 60,
"color": "28;69;99"
}
},
"Pressed": {
"bottomMargin": 16,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Blue Button_Pressed.png",
"tiled": true,
"topMargin": 32,
"width": 256
}
}
}
],
"objectsFolderStructure": {
"folderName": "__ROOT",
"children": [
{
"objectName": "LobbyButton"
}
]
},
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::IsClicked"
},
"parameters": [
"LobbyButton",
""
]
},
{
"type": {
"value": "BuiltinCommonInstructions::Once"
},
"parameters": []
}
],
"actions": [
{
"type": {
"value": "Multiplayer::OpenGameLobbies"
},
"parameters": [
""
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "Multiplayer::HasLobbyGameJustStarted"
},
"parameters": []
}
],
"actions": [
{
"type": {
"value": "Scene"
},
"parameters": [
"",
"\"Game\"",
""
]
}
]
}
],
"layers": [
{
"ambientLightColorB": 200,
"ambientLightColorG": 200,
"ambientLightColorR": 200,
"camera3DFarPlaneDistance": 10000,
"camera3DFieldOfView": 45,
"camera3DNearPlaneDistance": 3,
"cameraType": "",
"followBaseLayerCamera": false,
"isLightingLayer": false,
"isLocked": false,
"name": "",
"renderingType": "",
"visibility": true,
"cameras": [
{
"defaultSize": true,
"defaultViewport": true,
"height": 0,
"viewportBottom": 1,
"viewportLeft": 0,
"viewportRight": 1,
"viewportTop": 0,
"width": 0
}
],
"effects": [
{
"effectType": "Scene3D::HemisphereLight",
"name": "3D Light",
"doubleParameters": {
"elevation": 45,
"intensity": 1,
"rotation": 0
},
"stringParameters": {
"groundColor": "64;64;64",
"skyColor": "255;255;255",
"top": "Y-"
},
"booleanParameters": {}
}
]
}
],
"behaviorsSharedData": [
{
"name": "Effect",
"type": "EffectCapability::EffectBehavior"
},
{
"name": "Flippable",
"type": "FlippableCapability::FlippableBehavior"
},
{
"name": "Opacity",
"type": "OpacityCapability::OpacityBehavior"
},
{
"name": "Resizable",
"type": "ResizableCapability::ResizableBehavior"
},
{
"name": "Scale",
"type": "ScalableCapability::ScalableBehavior"
}
]
},
{
"b": 209,
"disableInputWhenNotFocused": true,
"mangledName": "Game",
"name": "Game",
"r": 209,
"standardSortMethod": true,
"stopSoundsOnStartup": true,
"title": "",
"v": 209,
"uiSettings": {
"grid": false,
"gridType": "rectangular",
"gridWidth": 32,
"gridHeight": 32,
"gridOffsetX": 0,
"gridOffsetY": 0,
"gridColor": 10401023,
"gridAlpha": 0.8,
"snap": false,
"zoomFactor": 0.546875,
"windowMask": false
},
"objectsGroups": [],
"variables": [
{
"name": "MySceneVar",
"type": "number",
"value": 0
},
{
"folded": true,
"name": "MySceneVarNotSynced",
"type": "number",
"value": 0
}
],
"instances": [
{
"angle": 0,
"customSize": true,
"depth": 48,
"height": 106,
"keepRatio": true,
"layer": "",
"name": "IncreaseSceneButton",
"persistentUuid": "0a2b4752-b713-4b92-af5b-03a86ba962a0",
"width": 311,
"x": 20,
"y": 307,
"zOrder": 1,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": true,
"depth": 48,
"height": 106,
"keepRatio": true,
"layer": "",
"name": "IncreaseGlobalButton",
"persistentUuid": "4ebee02c-fc9d-4418-8284-da92e123169d",
"width": 282,
"x": 363,
"y": 307,
"zOrder": 2,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"keepRatio": true,
"layer": "",
"name": "SceneVarValue",
"persistentUuid": "a6c97312-a08d-4a74-a658-2e802a5de1ac",
"width": 0,
"x": 43,
"y": 253,
"zOrder": 3,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"keepRatio": true,
"layer": "",
"name": "GlobalVarValue",
"persistentUuid": "dd4835f6-9c4c-407f-9ffb-affbbc2ebcf7",
"width": 0,
"x": 392,
"y": 253,
"zOrder": 4,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"keepRatio": true,
"layer": "",
"name": "TakeOwnershipSceneButton",
"persistentUuid": "ef564caa-d446-403b-8e2a-774a9ed27b38",
"width": 0,
"x": 40,
"y": 430,
"zOrder": 5,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"keepRatio": true,
"layer": "",
"name": "TakeOwnershipGlobalButton",
"persistentUuid": "6033e97a-a8cf-4a7a-804d-62328826dba0",
"width": 0,
"x": 372,
"y": 426,
"zOrder": 6,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"keepRatio": true,
"layer": "",
"name": "SceneVarOwnedBy",
"persistentUuid": "8d5f3574-4d24-45fa-a539-a3105068359f",
"width": 0,
"x": 44,
"y": 202,
"zOrder": 7,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"keepRatio": true,
"layer": "",
"name": "GlobalVarOwnedBy",
"persistentUuid": "7636ac20-aca7-4da6-9923-595bb5a14e48",
"width": 0,
"x": 391,
"y": 208,
"zOrder": 8,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": true,
"depth": 48,
"height": 106,
"keepRatio": true,
"layer": "",
"name": "IncreaseSceneNotSyncedButton",
"persistentUuid": "4a995fa6-b0b6-41ec-a903-664668118c11",
"width": 273,
"x": 682,
"y": 481,
"zOrder": 9,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"keepRatio": true,
"layer": "",
"name": "GlobalVarNotSyncedValue",
"persistentUuid": "f3d124c2-f1f1-440c-822e-b8e995814854",
"width": 0,
"x": 723,
"y": 252,
"zOrder": 10,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": true,
"depth": 48,
"height": 106,
"keepRatio": true,
"layer": "",
"name": "IncreaseGlobalNotSyncedButton",
"persistentUuid": "e3f705e2-bcff-4339-9b52-ba66763dfacc",
"width": 283,
"x": 682,
"y": 303,
"zOrder": 11,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"keepRatio": true,
"layer": "",
"name": "SceneVarNotSyncedValue",
"persistentUuid": "db795efd-d607-476d-9440-e77ac354a5d5",
"width": 0,
"x": 706,
"y": 443,
"zOrder": 12,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": true,
"depth": 48,
"height": 106,
"keepRatio": true,
"layer": "",
"name": "IncreaseExtensionVarButton",
"persistentUuid": "dd8c9e9d-2dd5-4a42-8fb0-68ab1374220c",
"width": 275,
"x": 973,
"y": 411,
"zOrder": 13,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"keepRatio": true,
"layer": "",
"name": "ExtensionVarValue",
"persistentUuid": "90fadd7b-a451-40e9-8743-e55cfc8c57bf",
"width": 0,
"x": 1034,
"y": 364,
"zOrder": 14,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
}
],
"objects": [
{
"assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d",
"name": "IncreaseSceneButton",
"type": "PanelSpriteButton::PanelSpriteButton",
"variables": [],
"effects": [],
"behaviors": [],
"content": {
"LeftPadding": 16,
"RightPadding": 16,
"PressedLabelOffsetY": 10,
"BottomPadding": 32,
"TopPadding": 16,
"HoveredFadeOutDuration": 0.25
},
"childrenContent": {
"Hovered": {
"bottomMargin": 32,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Blue Button_Hovered.png",
"tiled": true,
"topMargin": 16,
"width": 256
},
"Idle": {
"bottomMargin": 32,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Blue Button_Idle.png",
"tiled": true,
"topMargin": 16,
"width": 256
},
"Label": {
"bold": false,
"italic": false,
"smoothed": true,
"underlined": false,
"string": "Increase",
"font": "",
"textAlignment": "center",
"characterSize": 60,
"color": {
"b": 99,
"g": 69,
"r": 28
},
"content": {
"bold": false,
"isOutlineEnabled": false,
"isShadowEnabled": false,
"italic": false,
"outlineColor": "255;255;255",
"outlineThickness": 2,
"shadowAngle": 90,
"shadowBlurRadius": 2,
"shadowColor": "0;0;0",
"shadowDistance": 4,
"shadowOpacity": 127,
"smoothed": true,
"underlined": false,
"text": "Increase",
"font": "",
"textAlignment": "center",
"characterSize": 60,
"color": "28;69;99"
}
},
"Pressed": {
"bottomMargin": 16,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Blue Button_Pressed.png",
"tiled": true,
"topMargin": 32,
"width": 256
}
}
},
{
"assetStoreId": "0d3f4843e5ebb7af30fd80adf19a1c5a14164c1283f344991dc2aa14067a1262",
"name": "IncreaseGlobalButton",
"type": "PanelSpriteButton::PanelSpriteButton",
"variables": [],
"effects": [],
"behaviors": [],
"content": {
"LeftPadding": 16,
"RightPadding": 16,
"PressedLabelOffsetY": 10,
"BottomPadding": 32,
"TopPadding": 16,
"HoveredFadeOutDuration": 0.25
},
"childrenContent": {
"Hovered": {
"bottomMargin": 32,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Red Button_Hovered.png",
"tiled": true,
"topMargin": 16,
"width": 256
},
"Idle": {
"bottomMargin": 32,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Red Button_Idle.png",
"tiled": true,
"topMargin": 16,
"width": 256
},
"Label": {
"bold": false,
"italic": false,
"smoothed": true,
"underlined": false,
"string": "Increase",
"font": "",
"textAlignment": "center",
"characterSize": 60,
"color": {
"b": 16,
"g": 38,
"r": 111
},
"content": {
"bold": false,
"isOutlineEnabled": false,
"isShadowEnabled": false,
"italic": false,
"outlineColor": "255;255;255",
"outlineThickness": 2,
"shadowAngle": 90,
"shadowBlurRadius": 2,
"shadowColor": "0;0;0",
"shadowDistance": 4,
"shadowOpacity": 127,
"smoothed": true,
"underlined": false,
"text": "Increase",
"font": "",
"textAlignment": "center",
"characterSize": 60,
"color": "111;38;16"
}
},
"Pressed": {
"bottomMargin": 16,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Red Button_Pressed.png",
"tiled": true,
"topMargin": 32,
"width": 256
}
}
},
{
"assetStoreId": "",
"bold": false,
"italic": false,
"name": "SceneVarValue",
"smoothed": true,
"type": "TextObject::Text",
"underlined": false,
"variables": [],
"effects": [],
"behaviors": [],
"string": "Scene Variable",
"font": "",
"textAlignment": "left",
"characterSize": 20,
"color": {
"b": 0,
"g": 0,
"r": 0
},
"content": {
"bold": false,
"isOutlineEnabled": false,
"isShadowEnabled": false,
"italic": false,
"outlineColor": "255;255;255",
"outlineThickness": 2,
"shadowAngle": 90,
"shadowBlurRadius": 2,
"shadowColor": "0;0;0",
"shadowDistance": 4,
"shadowOpacity": 127,
"smoothed": true,
"underlined": false,
"text": "Scene Variable",
"font": "",
"textAlignment": "left",
"characterSize": 20,
"color": "0;0;0"
}
},
{
"assetStoreId": "",
"bold": false,
"italic": false,
"name": "GlobalVarValue",
"smoothed": true,
"type": "TextObject::Text",
"underlined": false,
"variables": [],
"effects": [],
"behaviors": [],
"string": "Global Variable",
"font": "",
"textAlignment": "left",
"characterSize": 20,
"color": {
"b": 0,
"g": 0,
"r": 0
},
"content": {
"bold": false,
"isOutlineEnabled": false,
"isShadowEnabled": false,
"italic": false,
"outlineColor": "255;255;255",
"outlineThickness": 2,
"shadowAngle": 90,
"shadowBlurRadius": 2,
"shadowColor": "0;0;0",
"shadowDistance": 4,
"shadowOpacity": 127,
"smoothed": true,
"underlined": false,
"text": "Global Variable",
"font": "",
"textAlignment": "left",
"characterSize": 20,
"color": "0;0;0"
}
},
{
"assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5",
"name": "TakeOwnershipSceneButton",
"type": "PanelSpriteButton::PanelSpriteButton",
"variables": [],
"effects": [],
"behaviors": [],
"content": {
"LeftPadding": 16,
"RightPadding": 16,
"PressedLabelOffsetY": 10,
"BottomPadding": 32,
"TopPadding": 16,
"HoveredFadeOutDuration": 0.25
},
"childrenContent": {
"Hovered": {
"bottomMargin": 32,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Green Button_Hovered.png",
"tiled": true,
"topMargin": 16,
"width": 256
},
"Idle": {
"bottomMargin": 32,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Green Button_Idle.png",
"tiled": true,
"topMargin": 16,
"width": 256
},
"Label": {
"bold": false,
"italic": false,
"smoothed": true,
"underlined": false,
"string": "Take",
"font": "",
"textAlignment": "center",
"characterSize": 60,
"color": {
"b": 29,
"g": 99,
"r": 62
},
"content": {
"bold": false,
"isOutlineEnabled": false,
"isShadowEnabled": false,
"italic": false,
"outlineColor": "255;255;255",
"outlineThickness": 2,
"shadowAngle": 90,
"shadowBlurRadius": 2,
"shadowColor": "0;0;0",
"shadowDistance": 4,
"shadowOpacity": 127,
"smoothed": true,
"underlined": false,
"text": "Take",
"font": "",
"textAlignment": "center",
"characterSize": 60,
"color": "62;99;29"
}
},
"Pressed": {
"bottomMargin": 16,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Green Button_Pressed.png",
"tiled": true,
"topMargin": 32,
"width": 256
}
}
},
{
"assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5",
"name": "TakeOwnershipGlobalButton",
"type": "PanelSpriteButton::PanelSpriteButton",
"variables": [],
"effects": [],
"behaviors": [],
"content": {
"LeftPadding": 16,
"RightPadding": 16,
"PressedLabelOffsetY": 10,
"BottomPadding": 32,
"TopPadding": 16,
"HoveredFadeOutDuration": 0.25
},
"childrenContent": {
"Hovered": {
"bottomMargin": 32,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Green Button_Hovered.png",
"tiled": true,
"topMargin": 16,
"width": 256
},
"Idle": {
"bottomMargin": 32,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Green Button_Idle.png",
"tiled": true,
"topMargin": 16,
"width": 256
},
"Label": {
"bold": false,
"italic": false,
"smoothed": true,
"underlined": false,
"string": "Take",
"font": "",
"textAlignment": "center",
"characterSize": 60,
"color": {
"b": 29,
"g": 99,
"r": 62
},
"content": {
"bold": false,
"isOutlineEnabled": false,
"isShadowEnabled": false,
"italic": false,
"outlineColor": "255;255;255",
"outlineThickness": 2,
"shadowAngle": 90,
"shadowBlurRadius": 2,
"shadowColor": "0;0;0",
"shadowDistance": 4,
"shadowOpacity": 127,
"smoothed": true,
"underlined": false,
"text": "Take",
"font": "",
"textAlignment": "center",
"characterSize": 60,
"color": "62;99;29"
}
},
"Pressed": {
"bottomMargin": 16,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Green Button_Pressed.png",
"tiled": true,
"topMargin": 32,
"width": 256
}
}
},
{
"assetStoreId": "",
"bold": false,
"italic": false,
"name": "SceneVarOwnedBy",
"smoothed": true,
"type": "TextObject::Text",
"underlined": false,
"variables": [],
"effects": [],
"behaviors": [],
"string": "Owned by Player 0",
"font": "",
"textAlignment": "left",
"characterSize": 20,
"color": {
"b": 0,
"g": 0,
"r": 0
},
"content": {
"bold": false,
"isOutlineEnabled": false,
"isShadowEnabled": false,
"italic": false,
"outlineColor": "255;255;255",
"outlineThickness": 2,
"shadowAngle": 90,
"shadowBlurRadius": 2,
"shadowColor": "0;0;0",
"shadowDistance": 4,
"shadowOpacity": 127,
"smoothed": true,
"underlined": false,
"text": "Owned by Player 0",
"font": "",
"textAlignment": "left",
"characterSize": 20,
"color": "0;0;0"
}
},
{
"assetStoreId": "",
"bold": false,
"italic": false,
"name": "GlobalVarOwnedBy",
"smoothed": true,
"type": "TextObject::Text",
"underlined": false,
"variables": [],
"effects": [],
"behaviors": [],
"string": "Owned by Player 0",
"font": "",
"textAlignment": "left",
"characterSize": 20,
"color": {
"b": 0,
"g": 0,
"r": 0
},
"content": {
"bold": false,
"isOutlineEnabled": false,
"isShadowEnabled": false,
"italic": false,
"outlineColor": "255;255;255",
"outlineThickness": 2,
"shadowAngle": 90,
"shadowBlurRadius": 2,
"shadowColor": "0;0;0",
"shadowDistance": 4,
"shadowOpacity": 127,
"smoothed": true,
"underlined": false,
"text": "Owned by Player 0",
"font": "",
"textAlignment": "left",
"characterSize": 20,
"color": "0;0;0"
}
},
{
"assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b",
"name": "IncreaseSceneNotSyncedButton",
"type": "PanelSpriteButton::PanelSpriteButton",
"variables": [],
"effects": [],
"behaviors": [],
"content": {
"LeftPadding": 16,
"RightPadding": 16,
"PressedLabelOffsetY": 10,
"BottomPadding": 32,
"TopPadding": 16,
"HoveredFadeOutDuration": 0.25
},
"childrenContent": {
"Hovered": {
"bottomMargin": 32,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Yellow Button_Hovered.png",
"tiled": true,
"topMargin": 16,
"width": 256
},
"Idle": {
"bottomMargin": 32,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Yellow Button_Idle.png",
"tiled": true,
"topMargin": 16,
"width": 256
},
"Label": {
"bold": false,
"italic": false,
"smoothed": true,
"underlined": false,
"string": "Increase",
"font": "",
"textAlignment": "center",
"characterSize": 60,
"color": {
"b": 42,
"g": 87,
"r": 139
},
"content": {
"bold": false,
"isOutlineEnabled": false,
"isShadowEnabled": false,
"italic": false,
"outlineColor": "255;255;255",
"outlineThickness": 2,
"shadowAngle": 90,
"shadowBlurRadius": 2,
"shadowColor": "0;0;0",
"shadowDistance": 4,
"shadowOpacity": 127,
"smoothed": true,
"underlined": false,
"text": "Increase",
"font": "",
"textAlignment": "center",
"characterSize": 60,
"color": "139;87;42"
}
},
"Pressed": {
"bottomMargin": 16,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Yellow Button_Pressed.png",
"tiled": true,
"topMargin": 32,
"width": 256
}
}
},
{
"assetStoreId": "",
"bold": false,
"italic": false,
"name": "GlobalVarNotSyncedValue",
"smoothed": true,
"type": "TextObject::Text",
"underlined": false,
"variables": [],
"effects": [],
"behaviors": [],
"string": "Global Variable",
"font": "",
"textAlignment": "left",
"characterSize": 20,
"color": {
"b": 0,
"g": 0,
"r": 0
},
"content": {
"bold": false,
"isOutlineEnabled": false,
"isShadowEnabled": false,
"italic": false,
"outlineColor": "255;255;255",
"outlineThickness": 2,
"shadowAngle": 90,
"shadowBlurRadius": 2,
"shadowColor": "0;0;0",
"shadowDistance": 4,
"shadowOpacity": 127,
"smoothed": true,
"underlined": false,
"text": "Global Variable",
"font": "",
"textAlignment": "left",
"characterSize": 20,
"color": "0;0;0"
}
},
{
"assetStoreId": "",
"bold": false,
"italic": false,
"name": "SceneVarNotSyncedValue",
"smoothed": true,
"type": "TextObject::Text",
"underlined": false,
"variables": [],
"effects": [],
"behaviors": [],
"string": "Global Variable",
"font": "",
"textAlignment": "left",
"characterSize": 20,
"color": {
"b": 0,
"g": 0,
"r": 0
},
"content": {
"bold": false,
"isOutlineEnabled": false,
"isShadowEnabled": false,
"italic": false,
"outlineColor": "255;255;255",
"outlineThickness": 2,
"shadowAngle": 90,
"shadowBlurRadius": 2,
"shadowColor": "0;0;0",
"shadowDistance": 4,
"shadowOpacity": 127,
"smoothed": true,
"underlined": false,
"text": "Global Variable",
"font": "",
"textAlignment": "left",
"characterSize": 20,
"color": "0;0;0"
}
},
{
"assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b",
"name": "IncreaseGlobalNotSyncedButton",
"type": "PanelSpriteButton::PanelSpriteButton",
"variables": [],
"effects": [],
"behaviors": [],
"content": {
"LeftPadding": 16,
"RightPadding": 16,
"PressedLabelOffsetY": 10,
"BottomPadding": 32,
"TopPadding": 16,
"HoveredFadeOutDuration": 0.25
},
"childrenContent": {
"Hovered": {
"bottomMargin": 32,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Yellow Button_Hovered.png",
"tiled": true,
"topMargin": 16,
"width": 256
},
"Idle": {
"bottomMargin": 32,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Yellow Button_Idle.png",
"tiled": true,
"topMargin": 16,
"width": 256
},
"Label": {
"bold": false,
"italic": false,
"smoothed": true,
"underlined": false,
"string": "Increase",
"font": "",
"textAlignment": "center",
"characterSize": 60,
"color": {
"b": 42,
"g": 87,
"r": 139
},
"content": {
"bold": false,
"isOutlineEnabled": false,
"isShadowEnabled": false,
"italic": false,
"outlineColor": "255;255;255",
"outlineThickness": 2,
"shadowAngle": 90,
"shadowBlurRadius": 2,
"shadowColor": "0;0;0",
"shadowDistance": 4,
"shadowOpacity": 127,
"smoothed": true,
"underlined": false,
"text": "Increase",
"font": "",
"textAlignment": "center",
"characterSize": 60,
"color": "139;87;42"
}
},
"Pressed": {
"bottomMargin": 16,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Yellow Button_Pressed.png",
"tiled": true,
"topMargin": 32,
"width": 256
}
}
},
{
"assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b",
"name": "IncreaseExtensionVarButton",
"type": "PanelSpriteButton::PanelSpriteButton",
"variables": [],
"effects": [],
"behaviors": [],
"content": {
"LeftPadding": 16,
"RightPadding": 16,
"PressedLabelOffsetY": 10,
"BottomPadding": 32,
"TopPadding": 16,
"HoveredFadeOutDuration": 0.25
},
"childrenContent": {
"Hovered": {
"bottomMargin": 32,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Yellow Button_Hovered.png",
"tiled": true,
"topMargin": 16,
"width": 256
},
"Idle": {
"bottomMargin": 32,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Yellow Button_Idle.png",
"tiled": true,
"topMargin": 16,
"width": 256
},
"Label": {
"bold": false,
"italic": false,
"smoothed": true,
"underlined": false,
"string": "Increase",
"font": "",
"textAlignment": "center",
"characterSize": 60,
"color": {
"b": 42,
"g": 87,
"r": 139
},
"content": {
"bold": false,
"isOutlineEnabled": false,
"isShadowEnabled": false,
"italic": false,
"outlineColor": "255;255;255",
"outlineThickness": 2,
"shadowAngle": 90,
"shadowBlurRadius": 2,
"shadowColor": "0;0;0",
"shadowDistance": 4,
"shadowOpacity": 127,
"smoothed": true,
"underlined": false,
"text": "Increase",
"font": "",
"textAlignment": "center",
"characterSize": 60,
"color": "139;87;42"
}
},
"Pressed": {
"bottomMargin": 16,
"height": 106,
"leftMargin": 16,
"rightMargin": 16,
"texture": "Yellow Button_Pressed.png",
"tiled": true,
"topMargin": 32,
"width": 256
}
}
},
{
"assetStoreId": "",
"bold": false,
"italic": false,
"name": "ExtensionVarValue",
"smoothed": true,
"type": "TextObject::Text",
"underlined": false,
"variables": [],
"effects": [],
"behaviors": [],
"string": "Extension Variable",
"font": "",
"textAlignment": "left",
"characterSize": 20,
"color": {
"b": 0,
"g": 0,
"r": 0
},
"content": {
"bold": false,
"isOutlineEnabled": false,
"isShadowEnabled": false,
"italic": false,
"outlineColor": "255;255;255",
"outlineThickness": 2,
"shadowAngle": 90,
"shadowBlurRadius": 2,
"shadowColor": "0;0;0",
"shadowDistance": 4,
"shadowOpacity": 127,
"smoothed": true,
"underlined": false,
"text": "Extension Variable",
"font": "",
"textAlignment": "left",
"characterSize": 20,
"color": "0;0;0"
}
}
],
"objectsFolderStructure": {
"folderName": "__ROOT",
"children": [
{
"objectName": "IncreaseSceneButton"
},
{
"objectName": "IncreaseGlobalButton"
},
{
"objectName": "IncreaseSceneNotSyncedButton"
},
{
"objectName": "IncreaseGlobalNotSyncedButton"
},
{
"objectName": "IncreaseExtensionVarButton"
},
{
"objectName": "SceneVarValue"
},
{
"objectName": "GlobalVarValue"
},
{
"objectName": "GlobalVarNotSyncedValue"
},
{
"objectName": "SceneVarNotSyncedValue"
},
{
"objectName": "ExtensionVarValue"
},
{
"objectName": "TakeOwnershipSceneButton"
},
{
"objectName": "TakeOwnershipGlobalButton"
},
{
"objectName": "SceneVarOwnedBy"
},
{
"objectName": "GlobalVarOwnedBy"
}
]
},
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "DepartScene"
},
"parameters": [
""
]
}
],
"actions": [
{
"type": {
"value": "Multiplayer::DisableVariableSynchronization"
},
"parameters": [
"",
"MyGlobalVarNotSynced"
]
},
{
"type": {
"value": "Multiplayer::DisableVariableSynchronization"
},
"parameters": [
"",
"MySceneVarNotSynced"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
},
"parameters": [
"SceneVarValue",
"Text",
"=",
"\"Scene Variable: \" + MySceneVar"
]
},
{
"type": {
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
},
"parameters": [
"GlobalVarValue",
"Text",
"=",
"\"Global Variable: \" + MyGlobalVar"
]
},
{
"type": {
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
},
"parameters": [
"SceneVarNotSyncedValue",
"Text",
"=",
"\"Scene Variable: \" + MySceneVarNotSynced"
]
},
{
"type": {
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
},
"parameters": [
"GlobalVarNotSyncedValue",
"Text",
"=",
"\"Scene Variable: \" + MyGlobalVarNotSynced"
]
},
{
"type": {
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
},
"parameters": [
"ExtensionVarValue",
"Text",
"=",
"\"Extension Variable: \" + ToString(MyExt::ExtVar())"
]
},
{
"type": {
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
},
"parameters": [
"SceneVarOwnedBy",
"Text",
"=",
"\"Owned by Player \" + ToString(Multiplayer::PlayerVariableOwnership(MySceneVar))"
]
},
{
"type": {
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
},
"parameters": [
"GlobalVarOwnedBy",
"Text",
"=",
"\"Owned by Player \" + ToString(Multiplayer::PlayerVariableOwnership(MyGlobalVar))"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::IsClicked"
},
"parameters": [
"IncreaseSceneButton",
""
]
},
{
"type": {
"value": "BuiltinCommonInstructions::Once"
},
"parameters": []
}
],
"actions": [
{
"type": {
"value": "SetNumberVariable"
},
"parameters": [
"MySceneVar",
"+",
"1"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::IsClicked"
},
"parameters": [
"IncreaseGlobalButton",
""
]
},
{
"type": {
"value": "BuiltinCommonInstructions::Once"
},
"parameters": []
}
],
"actions": [
{
"type": {
"value": "SetNumberVariable"
},
"parameters": [
"MyGlobalVar",
"+",
"1"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::IsClicked"
},
"parameters": [
"IncreaseExtensionVarButton",
""
]
},
{
"type": {
"value": "BuiltinCommonInstructions::Once"
},
"parameters": []
}
],
"actions": [
{
"type": {
"value": "MyExt::Function"
},
"parameters": [
"",
""
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::IsClicked"
},
"parameters": [
"IncreaseGlobalNotSyncedButton",
""
]
},
{
"type": {
"value": "BuiltinCommonInstructions::Once"
},
"parameters": []
}
],
"actions": [
{
"type": {
"value": "SetNumberVariable"
},
"parameters": [
"MyGlobalVarNotSynced",
"+",
"1"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::IsClicked"
},
"parameters": [
"IncreaseSceneNotSyncedButton",
""
]
},
{
"type": {
"value": "BuiltinCommonInstructions::Once"
},
"parameters": []
}
],
"actions": [
{
"type": {
"value": "SetNumberVariable"
},
"parameters": [
"MySceneVarNotSynced",
"+",
"1"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::IsClicked"
},
"parameters": [
"TakeOwnershipSceneButton",
""
]
},
{
"type": {
"value": "BuiltinCommonInstructions::Once"
},
"parameters": []
}
],
"actions": [
{
"type": {
"value": "Multiplayer::TakeVariableOwnership"
},
"parameters": [
"",
"MySceneVar"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::IsClicked"
},
"parameters": [
"TakeOwnershipGlobalButton",
""
]
},
{
"type": {
"value": "BuiltinCommonInstructions::Once"
},
"parameters": []
}
],
"actions": [
{
"type": {
"value": "Multiplayer::TakeVariableOwnership"
},
"parameters": [
"",
"MyGlobalVar"
]
}
]
}
],
"layers": [
{
"ambientLightColorB": 200,
"ambientLightColorG": 200,
"ambientLightColorR": 200,
"camera3DFarPlaneDistance": 10000,
"camera3DFieldOfView": 45,
"camera3DNearPlaneDistance": 3,
"cameraType": "",
"followBaseLayerCamera": false,
"isLightingLayer": false,
"isLocked": false,
"name": "",
"renderingType": "",
"visibility": true,
"cameras": [
{
"defaultSize": true,
"defaultViewport": true,
"height": 0,
"viewportBottom": 1,
"viewportLeft": 0,
"viewportRight": 1,
"viewportTop": 0,
"width": 0
}
],
"effects": [
{
"effectType": "Scene3D::HemisphereLight",
"name": "3D Light",
"doubleParameters": {
"elevation": 45,
"intensity": 1,
"rotation": 0
},
"stringParameters": {
"groundColor": "64;64;64",
"skyColor": "255;255;255",
"top": "Y-"
},
"booleanParameters": {}
}
]
}
],
"behaviorsSharedData": [
{
"name": "Effect",
"type": "EffectCapability::EffectBehavior"
},
{
"name": "Flippable",
"type": "FlippableCapability::FlippableBehavior"
},
{
"name": "Opacity",
"type": "OpacityCapability::OpacityBehavior"
},
{
"name": "Resizable",
"type": "ResizableCapability::ResizableBehavior"
},
{
"name": "Scale",
"type": "ScalableCapability::ScalableBehavior"
},
{
"name": "Text",
"type": "TextContainerCapability::TextContainerBehavior"
}
]
}
],
"externalEvents": [],
"eventsFunctionsExtensions": [
{
"author": "",
"category": "User interface",
"extensionNamespace": "",
"fullName": "Panel sprite button",
"helpPath": "/objects/button",
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K",
"name": "PanelSpriteButton",
"previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg",
"shortDescription": "A button that can be customized.",
"version": "1.4.4",
"description": [
"The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.",
"",
"There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)."
],
"origin": {
"identifier": "PanelSpriteButton",
"name": "gdevelop-extension-store"
},
"tags": [
"button",
"ui"
],
"authorIds": [
"IWykYNRvhCZBN3vEgKEbBPOR3Oc2"
],
"dependencies": [],
"globalVariables": [],
"sceneVariables": [],
"eventsFunctions": [],
"eventsBasedBehaviors": [
{
"description": "The finite state machine used internally by the button object.",
"fullName": "Button finite state machine",
"name": "ButtonFSM",
"objectType": "",
"private": true,
"eventsFunctions": [
{
"fullName": "",
"functionType": "Action",
"name": "doStepPostEvents",
"sentence": "",
"events": [
{
"colorB": 228,
"colorG": 176,
"colorR": 74,
"creationTime": 0,
"name": "Finite state machine",
"source": "",
"type": "BuiltinCommonInstructions::Group",
"events": [
{
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "The \"Validated\" state only last one frame."
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"Validated\""
]
}
],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"Idle\""
]
}
]
},
{
"colorB": 228,
"colorG": 176,
"colorR": 74,
"creationTime": 0,
"name": "Check position",
"source": "",
"type": "BuiltinCommonInstructions::Group",
"events": [
{
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Make sure the cursor position is only checked once per frame."
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside"
},
"parameters": [
"Object",
"Behavior",
"no"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering"
},
"parameters": [
"Object",
"Behavior"
]
},
{
"type": {
"value": "CollisionPoint"
},
"parameters": [
"Object",
"MouseOnlyCursorX(Object.Layer(), 0)",
"MouseOnlyCursorY(Object.Layer(), 0)"
]
}
],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside"
},
"parameters": [
"Object",
"Behavior",
"yes"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter."
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside"
},
"parameters": [
"Object",
"Behavior",
"no"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyTouchId"
},
"parameters": [
"Object",
"Behavior",
"!=",
"0"
]
},
{
"type": {
"value": "CollisionPoint"
},
"parameters": [
"Object",
"TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)",
"TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)"
]
}
],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside"
},
"parameters": [
"Object",
"Behavior",
"yes"
]
}
]
}
],
"parameters": []
},
{
"colorB": 228,
"colorG": 176,
"colorR": 74,
"creationTime": 0,
"name": "Handle touch start",
"source": "",
"type": "BuiltinCommonInstructions::Group",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "HasAnyTouchOrMouseStarted"
},
"parameters": [
""
]
}
],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex"
},
"parameters": [
"Object",
"Behavior",
"=",
"0"
]
}
],
"events": [
{
"type": "BuiltinCommonInstructions::Repeat",
"repeatExpression": "StartedTouchOrMouseCount()",
"conditions": [],
"actions": [],
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "CollisionPoint"
},
"parameters": [
"Object",
"TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)",
"TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)"
]
}
],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId"
},
"parameters": [
"Object",
"Behavior",
"=",
"StartedTouchOrMouseId(Object.Behavior::PropertyIndex())"
]
},
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside"
},
"parameters": [
"Object",
"Behavior",
"yes"
]
}
],
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "BuiltinCommonInstructions::Or"
},
"parameters": [],
"subInstructions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"Hovered\""
]
},
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"Idle\""
]
}
]
}
],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"PressedInside\""
]
}
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex"
},
"parameters": [
"Object",
"Behavior",
"+",
"1"
]
}
]
}
]
}
]
}
],
"parameters": []
},
{
"colorB": 228,
"colorG": 176,
"colorR": 74,
"creationTime": 0,
"name": "Apply position changes",
"source": "",
"type": "BuiltinCommonInstructions::Group",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": true,
"value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside"
},
"parameters": [
"Object",
"Behavior"
]
},
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"Hovered\""
]
}
],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"Idle\""
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside"
},
"parameters": [
"Object",
"Behavior"
]
},
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"Idle\""
]
}
],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"Hovered\""
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": true,
"value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside"
},
"parameters": [
"Object",
"Behavior"
]
},
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"PressedInside\""
]
}
],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"PressedOutside\""
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside"
},
"parameters": [
"Object",
"Behavior"
]
},
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"PressedOutside\""
]
}
],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"PressedInside\""
]
}
]
}
],
"parameters": []
},
{
"colorB": 228,
"colorG": 176,
"colorR": 74,
"creationTime": 0,
"name": "Handle touch end",
"source": "",
"type": "BuiltinCommonInstructions::Group",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "HasTouchEnded"
},
"parameters": [
"",
"Object.Behavior::PropertyTouchId()"
]
}
],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId"
},
"parameters": [
"Object",
"Behavior",
"=",
"0"
]
}
],
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"PressedInside\""
]
}
],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"Validated\""
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": true,
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"PressedInside\""
]
},
{
"type": {
"inverted": true,
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"Validated\""
]
}
],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"Idle\""
]
}
]
}
]
}
],
"parameters": []
}
],
"parameters": []
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"type": "object"
},
{
"description": "Behavior",
"name": "Behavior",
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
"type": "behavior"
}
],
"objectGroups": []
},
{
"fullName": "",
"functionType": "Action",
"name": "onDeActivate",
"sentence": "",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::ResetState"
},
"parameters": [
"Object",
"Behavior",
""
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"type": "object"
},
{
"description": "Behavior",
"name": "Behavior",
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
"type": "behavior"
}
],
"objectGroups": []
},
{
"description": "Reset the state of the button.",
"fullName": "Reset state",
"functionType": "Action",
"name": "ResetState",
"private": true,
"sentence": "Reset the button state of _PARAM0_",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"Idle\""
]
},
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId"
},
"parameters": [
"Object",
"Behavior",
"=",
"0"
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"type": "object"
},
{
"description": "Behavior",
"name": "Behavior",
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
"type": "behavior"
}
],
"objectGroups": []
},
{
"description": "Check if the button is not used.",
"fullName": "Is idle",
"functionType": "Condition",
"name": "IsIdle",
"sentence": "_PARAM0_ is idle",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"Idle\""
]
}
],
"actions": [
{
"type": {
"value": "SetReturnBoolean"
},
"parameters": [
"True"
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"type": "object"
},
{
"description": "Behavior",
"name": "Behavior",
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
"type": "behavior"
}
],
"objectGroups": []
},
{
"description": "Check if the button was just clicked.",
"fullName": "Is clicked",
"functionType": "Condition",
"name": "IsClicked",
"sentence": "_PARAM0_ is clicked",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"Validated\""
]
}
],
"actions": [
{
"type": {
"value": "SetReturnBoolean"
},
"parameters": [
"True"
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"type": "object"
},
{
"description": "Behavior",
"name": "Behavior",
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
"type": "behavior"
}
],
"objectGroups": []
},
{
"description": "Check if the cursor is hovered over the button.",
"fullName": "Is hovered",
"functionType": "Condition",
"name": "IsHovered",
"sentence": "_PARAM0_ is hovered",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"Hovered\""
]
}
],
"actions": [
{
"type": {
"value": "SetReturnBoolean"
},
"parameters": [
"True"
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"type": "object"
},
{
"description": "Behavior",
"name": "Behavior",
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
"type": "behavior"
}
],
"objectGroups": []
},
{
"description": "Check if the button is either hovered or pressed but not hovered.",
"fullName": "Is focused",
"functionType": "Condition",
"name": "IsFocused",
"sentence": "_PARAM0_ is focused",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"Hovered\""
]
}
],
"actions": [
{
"type": {
"value": "SetReturnBoolean"
},
"parameters": [
"True"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"PressedOutside\""
]
}
],
"actions": [
{
"type": {
"value": "SetReturnBoolean"
},
"parameters": [
"True"
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"type": "object"
},
{
"description": "Behavior",
"name": "Behavior",
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
"type": "behavior"
}
],
"objectGroups": []
},
{
"description": "Check if the button is currently being pressed with mouse or touch.",
"fullName": "Is pressed",
"functionType": "Condition",
"name": "IsPressed",
"sentence": "_PARAM0_ is pressed",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"PressedInside\""
]
}
],
"actions": [
{
"type": {
"value": "SetReturnBoolean"
},
"parameters": [
"True"
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"type": "object"
},
{
"description": "Behavior",
"name": "Behavior",
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
"type": "behavior"
}
],
"objectGroups": []
},
{
"description": "Check if the button is currently being pressed outside with mouse or touch.",
"fullName": "Is held outside",
"functionType": "Condition",
"name": "IsPressedOutside",
"sentence": "_PARAM0_ is held outside",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
},
"parameters": [
"Object",
"Behavior",
"=",
"\"PressedOutside\""
]
}
],
"actions": [
{
"type": {
"value": "SetReturnBoolean"
},
"parameters": [
"True"
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"type": "object"
},
{
"description": "Behavior",
"name": "Behavior",
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
"type": "behavior"
}
],
"objectGroups": []
},
{
"description": "the touch id that is using the button or 0 if none.",
"fullName": "Touch id",
"functionType": "ExpressionAndCondition",
"name": "TouchId",
"sentence": "the touch id",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "SetReturnNumber"
},
"parameters": [
"Object.Behavior::PropertyTouchId()"
]
}
]
}
],
"expressionType": {
"type": "expression"
},
"parameters": [
{
"description": "Object",
"name": "Object",
"type": "object"
},
{
"description": "Behavior",
"name": "Behavior",
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
"type": "behavior"
}
],
"objectGroups": []
}
],
"propertyDescriptors": [
{
"value": "true",
"type": "Boolean",
"label": "",
"description": "Should check hovering",
"group": "",
"extraInformation": [],
"hidden": true,
"name": "ShouldCheckHovering"
},
{
"value": "Idle",
"type": "Choice",
"label": "State",
"description": "",
"group": "",
"extraInformation": [
"Idle",
"Hovered",
"PressedInside",
"PressedOutside",
"Validated"
],
"hidden": true,
"name": "State"
},
{
"value": "0",
"type": "Number",
"label": "Touch id",
"description": "",
"group": "",
"extraInformation": [],
"hidden": true,
"name": "TouchId"
},
{
"value": "",
"type": "Boolean",
"label": "Touch is inside",
"description": "",
"group": "",
"extraInformation": [],
"hidden": true,
"name": "TouchIsInside"
},
{
"value": "",
"type": "Boolean",
"label": "Mouse is inside",
"description": "",
"group": "",
"extraInformation": [],
"hidden": true,
"name": "MouseIsInside"
},
{
"value": "",
"type": "Number",
"label": "",
"description": "",
"group": "",
"extraInformation": [],
"hidden": true,
"name": "Index"
}
],
"sharedPropertyDescriptors": []
}
],
"eventsBasedObjects": [
{
"defaultName": "Button",
"description": "A button that can be customized.",
"fullName": "Button (panel sprite)",
"name": "PanelSpriteButton",
"eventsFunctions": [
{
"fullName": "",
"functionType": "Action",
"name": "onCreated",
"sentence": "",
"events": [
{
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown."
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "Create"
},
"parameters": [
"",
"Idle",
"0",
"0",
""
]
},
{
"type": {
"value": "Create"
},
"parameters": [
"",
"Hovered",
"0",
"0",
""
]
},
{
"type": {
"value": "Create"
},
"parameters": [
"",
"Pressed",
"0",
"0",
""
]
},
{
"type": {
"value": "Cache"
},
"parameters": [
"Hovered"
]
},
{
"type": {
"value": "Cache"
},
"parameters": [
"Pressed"
]
},
{
"type": {
"value": "ChangePlan"
},
"parameters": [
"Hovered",
"=",
"1"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Place the label over the backgrounds."
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "Create"
},
"parameters": [
"",
"Label",
"0",
"0",
""
]
},
{
"type": {
"value": "ChangePlan"
},
"parameters": [
"Label",
"=",
"2"
]
},
{
"type": {
"value": "TextObject::SetWrapping"
},
"parameters": [
"Label",
"yes"
]
},
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::CenterLabel"
},
"parameters": [
"Object",
""
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
"type": "object"
}
],
"objectGroups": [
{
"name": "Background",
"objects": [
{
"name": "Idle"
},
{
"name": "Hovered"
},
{
"name": "Pressed"
}
]
}
]
},
{
"fullName": "",
"functionType": "Action",
"name": "onHotReloading",
"sentence": "",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::CenterLabel"
},
"parameters": [
"Object",
""
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
"type": "object"
}
],
"objectGroups": []
},
{
"fullName": "",
"functionType": "Action",
"name": "doStepPostEvents",
"sentence": "",
"events": [
{
"colorB": 228,
"colorG": 176,
"colorR": 74,
"creationTime": 0,
"name": "Apply states",
"source": "",
"type": "BuiltinCommonInstructions::Group",
"events": [
{
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Show the right background accordingly to the new state."
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::IsIdle"
},
"parameters": [
"Object",
"ButtonFSM"
]
},
{
"type": {
"value": "BuiltinCommonInstructions::Once"
},
"parameters": []
}
],
"actions": [
{
"type": {
"value": "SetCenterY"
},
"parameters": [
"Label",
"=",
"Object.CenterWithPaddingY()"
]
},
{
"type": {
"value": "Montre"
},
"parameters": [
"Idle",
""
]
},
{
"type": {
"value": "Cache"
},
"parameters": [
"Pressed"
]
}
],
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "Visible"
},
"parameters": [
"Hovered"
]
},
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration"
},
"parameters": [
"Object",
">",
"0"
]
}
],
"actions": [
{
"type": {
"value": "Tween::AddObjectOpacityTween"
},
"parameters": [
"Hovered",
"Tween",
"\"Fadeout\"",
"0",
"\"linear\"",
"Object.PropertyHoveredFadeOutDuration() * 1000",
""
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration"
},
"parameters": [
"Object",
"=",
"0"
]
}
],
"actions": [
{
"type": {
"value": "Cache"
},
"parameters": [
"Hovered"
]
}
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteObject::Opacity"
},
"parameters": [
"Hovered",
"=",
"0"
]
}
],
"actions": [
{
"type": {
"value": "Cache"
},
"parameters": [
"Hovered"
]
},
{
"type": {
"value": "PanelSpriteObject::SetOpacity"
},
"parameters": [
"Hovered",
"=",
"255"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::IsHovered"
},
"parameters": [
"Object",
"ButtonFSM"
]
},
{
"type": {
"value": "BuiltinCommonInstructions::Once"
},
"parameters": []
}
],
"actions": [
{
"type": {
"value": "SetCenterY"
},
"parameters": [
"Label",
"=",
"Object.CenterWithPaddingY()"
]
},
{
"type": {
"value": "Cache"
},
"parameters": [
"Idle"
]
},
{
"type": {
"value": "Montre"
},
"parameters": [
"Hovered",
""
]
},
{
"type": {
"value": "Cache"
},
"parameters": [
"Pressed"
]
},
{
"type": {
"value": "Tween::RemoveTween"
},
"parameters": [
"Hovered",
"Tween",
"\"Fadeout\""
]
},
{
"type": {
"value": "PanelSpriteObject::SetOpacity"
},
"parameters": [
"Hovered",
"=",
"255"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::IsPressed"
},
"parameters": [
"Object",
"ButtonFSM"
]
},
{
"type": {
"value": "BuiltinCommonInstructions::Once"
},
"parameters": []
}
],
"actions": [
{
"type": {
"value": "SetCenterY"
},
"parameters": [
"Label",
"=",
"Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()"
]
},
{
"type": {
"value": "Cache"
},
"parameters": [
"Idle"
]
},
{
"type": {
"value": "Cache"
},
"parameters": [
"Hovered"
]
},
{
"type": {
"value": "Montre"
},
"parameters": [
"Pressed",
""
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::IsFocused"
},
"parameters": [
"Object",
"ButtonFSM"
]
},
{
"type": {
"value": "BuiltinCommonInstructions::Once"
},
"parameters": []
}
],
"actions": [
{
"type": {
"value": "SetCenterY"
},
"parameters": [
"Label",
"=",
"Object.CenterWithPaddingY()"
]
},
{
"type": {
"value": "Cache"
},
"parameters": [
"Idle"
]
},
{
"type": {
"value": "Montre"
},
"parameters": [
"Hovered",
""
]
},
{
"type": {
"value": "Cache"
},
"parameters": [
"Pressed"
]
}
]
}
],
"parameters": []
},
{
"colorB": 228,
"colorG": 176,
"colorR": 74,
"creationTime": 0,
"name": "Resize",
"source": "",
"type": "BuiltinCommonInstructions::Group",
"events": [
{
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances."
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "BuiltinCommonInstructions::Or"
},
"parameters": [],
"subInstructions": [
{
"type": {
"value": "BuiltinCommonInstructions::CompareNumbers"
},
"parameters": [
"Object.Width()",
"!=",
"max(Idle.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Idle.BoundingBoxLeft(), Label.BoundingBoxLeft())"
]
},
{
"type": {
"value": "BuiltinCommonInstructions::CompareNumbers"
},
"parameters": [
"Object.Height()",
"!=",
"max(Idle.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Idle.BoundingBoxTop(), Label.BoundingBoxTop())"
]
}
]
}
],
"actions": [
{
"type": {
"value": "ModVarObjet"
},
"parameters": [
"Idle",
"Width",
"=",
"Object.Width()"
]
},
{
"type": {
"value": "ModVarObjet"
},
"parameters": [
"Idle",
"Height",
"=",
"Object.Height()"
]
},
{
"type": {
"value": "PanelSpriteButton::Scale"
},
"parameters": [
"Object",
"=",
"1"
]
},
{
"type": {
"value": "PanelSpriteObject::Width"
},
"parameters": [
"Background",
"=",
"Idle.Variable(Width)"
]
},
{
"type": {
"value": "PanelSpriteObject::Height"
},
"parameters": [
"Background",
"=",
"Idle.Variable(Height)"
]
},
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::CenterLabel"
},
"parameters": [
"Object",
""
]
}
]
}
],
"parameters": []
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
"type": "object"
}
],
"objectGroups": [
{
"name": "Background",
"objects": [
{
"name": "Idle"
},
{
"name": "Hovered"
},
{
"name": "Pressed"
}
]
}
]
},
{
"description": "Check if the button is not used.",
"fullName": "Is idle",
"functionType": "Condition",
"name": "IsIdle",
"sentence": "_PARAM0_ is idle",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::IsIdle"
},
"parameters": [
"Idle",
"ButtonFSM",
""
]
}
],
"actions": [
{
"type": {
"value": "SetReturnBoolean"
},
"parameters": [
"True"
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
"type": "object"
}
],
"objectGroups": []
},
{
"description": "Check if the button was just clicked.",
"fullName": "Is clicked",
"functionType": "Condition",
"name": "IsClicked",
"sentence": "_PARAM0_ is clicked",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::IsClicked"
},
"parameters": [
"Idle",
"ButtonFSM",
""
]
}
],
"actions": [
{
"type": {
"value": "SetReturnBoolean"
},
"parameters": [
"True"
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
"type": "object"
}
],
"objectGroups": []
},
{
"description": "Check if the cursor is hovered over the button.",
"fullName": "Is hovered",
"functionType": "Condition",
"name": "IsHovered",
"sentence": "_PARAM0_ is hovered",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::IsHovered"
},
"parameters": [
"Idle",
"ButtonFSM",
""
]
}
],
"actions": [
{
"type": {
"value": "SetReturnBoolean"
},
"parameters": [
"True"
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
"type": "object"
}
],
"objectGroups": []
},
{
"description": "Check if the button is either hovered or pressed but not hovered.",
"fullName": "Is focused",
"functionType": "Condition",
"name": "IsFocused",
"sentence": "_PARAM0_ is focused",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::IsFocused"
},
"parameters": [
"Idle",
"ButtonFSM",
""
]
}
],
"actions": [
{
"type": {
"value": "SetReturnBoolean"
},
"parameters": [
"True"
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
"type": "object"
}
],
"objectGroups": []
},
{
"description": "Check if the button is currently being pressed with mouse or touch.",
"fullName": "Is pressed",
"functionType": "Condition",
"name": "IsPressed",
"sentence": "_PARAM0_ is pressed",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::ButtonFSM::IsPressed"
},
"parameters": [
"Idle",
"ButtonFSM",
""
]
}
],
"actions": [
{
"type": {
"value": "SetReturnBoolean"
},
"parameters": [
"True"
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
"type": "object"
}
],
"objectGroups": []
},
{
"description": "Change the text of the button label.",
"fullName": "Label text",
"functionType": "Action",
"name": "SetLabelText",
"sentence": "Change the text of _PARAM0_ to _PARAM1_",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "TextObject::String"
},
"parameters": [
"Label",
"=",
"GetArgumentAsString(\"LabelText\")"
]
},
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::CenterLabel"
},
"parameters": [
"Object",
""
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
"type": "object"
},
{
"description": "Text",
"name": "LabelText",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Return the label text.",
"fullName": "Label text",
"functionType": "StringExpression",
"name": "LabelText",
"sentence": "",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "SetReturnString"
},
"parameters": [
"Label.String()"
]
}
]
}
],
"expressionType": {
"type": "string"
},
"parameters": [
{
"description": "Object",
"name": "Object",
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
"type": "object"
}
],
"objectGroups": []
},
{
"description": "Return the label center Y according to the button configuration. This expression is used in doStepPostEvents when the button is pressed or released.",
"fullName": "",
"functionType": "Expression",
"name": "CenterWithPaddingY",
"private": true,
"sentence": "",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "SetReturnNumber"
},
"parameters": [
"Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2"
]
}
]
}
],
"expressionType": {
"type": "expression"
},
"parameters": [
{
"description": "Object",
"name": "Object",
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
"type": "object"
}
],
"objectGroups": []
},
{
"description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.",
"fullName": "",
"functionType": "Action",
"name": "CenterLabel",
"private": true,
"sentence": "Center the label of _PARAM0_",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "MettreXY"
},
"parameters": [
"Label",
"=",
"Object.PropertyLeftPadding()",
"=",
"Object.PropertyTopPadding()"
]
},
{
"type": {
"value": "TextObject::WrappingWidth"
},
"parameters": [
"Label",
"=",
"Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()"
]
},
{
"type": {
"value": "SetCenterY"
},
"parameters": [
"Label",
"=",
"Object.CenterWithPaddingY()"
]
}
],
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "SetCenterX"
},
"parameters": [
"Label",
"=",
"Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2"
]
}
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "PanelSpriteButton::PanelSpriteButton::IsPressed"
},
"parameters": [
"Object",
""
]
}
],
"actions": [
{
"type": {
"value": "MettreY"
},
"parameters": [
"Label",
"+",
"Object.PropertyPressedLabelOffsetY()"
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
"type": "object"
}
],
"objectGroups": [
{
"name": "Background",
"objects": [
{
"name": "Idle"
},
{
"name": "Hovered"
},
{
"name": "Pressed"
}
]
}
]
},
{
"description": "De/activate interactions with the button.",
"fullName": "De/activate interactions",
"functionType": "Action",
"name": "Activate",
"sentence": "Activate interactions with _PARAM0_: _PARAM1_",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "GetArgumentAsBoolean"
},
"parameters": [
"\"ShouldActivate\""
]
}
],
"actions": [
{
"type": {
"value": "ActivateBehavior"
},
"parameters": [
"Idle",
"ButtonFSM",
"yes"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": true,
"value": "GetArgumentAsBoolean"
},
"parameters": [
"\"ShouldActivate\""
]
}
],
"actions": [
{
"type": {
"value": "ActivateBehavior"
},
"parameters": [
"Idle",
"ButtonFSM",
"no"
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
"type": "object"
},
{
"description": "Activate",
"name": "ShouldActivate",
"type": "yesorno"
}
],
"objectGroups": []
},
{
"description": "Check if interactions are activated on the button.",
"fullName": "Interactions activated",
"functionType": "Condition",
"name": "IsActivated",
"sentence": "Interactions on _PARAM0_ are activated",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "BehaviorActivated"
},
"parameters": [
"Idle",
"ButtonFSM"
]
}
],
"actions": [
{
"type": {
"value": "SetReturnBoolean"
},
"parameters": [
"True"
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
"type": "object"
}
],
"objectGroups": []
}
],
"propertyDescriptors": [
{
"value": "0",
"type": "Number",
"label": "Label offset on Y axis when pressed",
"description": "",
"group": "",
"extraInformation": [],
"name": "PressedLabelOffsetY"
},
{
"value": "0",
"type": "Number",
"label": "Left padding",
"description": "",
"group": "Padding",
"extraInformation": [
"Label"
],
"name": "LeftPadding"
},
{
"value": "0",
"type": "Number",
"label": "Right padding",
"description": "",
"group": "Padding",
"extraInformation": [
"Label"
],
"name": "RightPadding"
},
{
"value": "0",
"type": "Number",
"label": "Top padding",
"description": "",
"group": "Padding",
"extraInformation": [
"Label"
],
"name": "TopPadding"
},
{
"value": "0",
"type": "Number",
"label": "Bottom padding",
"description": "",
"group": "Padding",
"extraInformation": [
"Label"
],
"name": "BottomPadding"
},
{
"value": "0.25",
"type": "Number",
"label": "Hovered fade out duration (in seconds)",
"description": "",
"group": "",
"extraInformation": [],
"name": "HoveredFadeOutDuration"
}
],
"objects": [
{
"assetStoreId": "",
"bold": false,
"italic": false,
"name": "Label",
"smoothed": true,
"type": "TextObject::Text",
"underlined": false,
"variables": [],
"effects": [],
"behaviors": [],
"string": "Text",
"font": "",
"textAlignment": "",
"characterSize": 20,
"color": {
"b": 0,
"g": 0,
"r": 0
},
"content": {
"bold": false,
"isOutlineEnabled": false,
"isShadowEnabled": false,
"italic": false,
"outlineColor": "255;255;255",
"outlineThickness": 2,
"shadowAngle": 90,
"shadowBlurRadius": 2,
"shadowColor": "0;0;0",
"shadowDistance": 4,
"shadowOpacity": 127,
"smoothed": true,
"underlined": false,
"text": "Text",
"font": "",
"textAlignment": "",
"characterSize": 20,
"color": "0;0;0"
}
},
{
"assetStoreId": "",
"bottomMargin": 0,
"height": 32,
"leftMargin": 0,
"name": "Idle",
"rightMargin": 0,
"texture": "",
"tiled": false,
"topMargin": 0,
"type": "PanelSpriteObject::PanelSprite",
"width": 32,
"variables": [
{
"folded": true,
"name": "State",
"type": "string",
"value": "Idle"
}
],
"effects": [],
"behaviors": [
{
"name": "ButtonFSM",
"type": "PanelSpriteButton::ButtonFSM",
"ShouldCheckHovering": true
}
]
},
{
"assetStoreId": "",
"bottomMargin": 0,
"height": 32,
"leftMargin": 0,
"name": "Hovered",
"rightMargin": 0,
"texture": "",
"tiled": false,
"topMargin": 0,
"type": "PanelSpriteObject::PanelSprite",
"width": 32,
"variables": [],
"effects": [],
"behaviors": [
{
"name": "Tween",
"type": "Tween::TweenBehavior"
}
]
},
{
"assetStoreId": "",
"bottomMargin": 0,
"height": 32,
"leftMargin": 0,
"name": "Pressed",
"rightMargin": 0,
"texture": "",
"tiled": false,
"topMargin": 0,
"type": "PanelSpriteObject::PanelSprite",
"width": 32,
"variables": [],
"effects": [],
"behaviors": []
}
],
"objectsFolderStructure": {
"folderName": "__ROOT",
"children": [
{
"objectName": "Label"
},
{
"objectName": "Idle"
},
{
"objectName": "Hovered"
},
{
"objectName": "Pressed"
}
]
}
}
]
},
{
"author": "",
"category": "",
"extensionNamespace": "",
"fullName": "",
"helpPath": "",
"iconUrl": "",
"name": "MyExt",
"previewIconUrl": "",
"shortDescription": "",
"version": "",
"description": "",
"tags": [],
"authorIds": [],
"dependencies": [],
"globalVariables": [],
"sceneVariables": [
{
"folded": true,
"name": "ExtVar",
"type": "number",
"value": 0
}
],
"eventsFunctions": [
{
"description": "Increase extension variable by 1",
"fullName": "IncreaseVar",
"functionType": "Action",
"name": "Function",
"sentence": "Increase extension variable by 1",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "SetNumberVariable"
},
"parameters": [
"ExtVar",
"+",
"1"
]
}
]
}
],
"parameters": [],
"objectGroups": []
},
{
"description": "Extension Variable value",
"fullName": "Extension Variable Value",
"functionType": "Expression",
"name": "ExtVar",
"sentence": "",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "SetReturnNumber"
},
"parameters": [
"ExtVar"
]
}
]
}
],
"expressionType": {
"type": "expression"
},
"parameters": [],
"objectGroups": []
}
],
"eventsBasedBehaviors": [],
"eventsBasedObjects": []
}
],
"externalLayouts": [],
"externalSourceFiles": []
}