You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"shortDescription": "Minimize your app to the Windows system tray, automatically giving it the app icon, and with the ablility to customize the cursor-hovering text and right-click options.",
12
+
"version": "1.0.0",
13
+
"description": [
14
+
"Send your app to the system tray when initializing the icon inside your project. This can be useful for things like:",
15
+
"- Creating a launcher that has to do processes in the background.",
16
+
"- Creating a tray icon for your app to replace the big icon on the taskbar when minimized, to simulate experiences like \"desktop pets\".",
17
+
"- Literally anything you ever dreamed of creating a tray icon for.",
18
+
"",
19
+
"It currently supports a \"Show label\" with customizable text, and \"Quit\" label with customizable text, and a fully custom third label, used for passing your own string into a scene variable called \"TrayAction\". Then, use that variable to trigger any events in your project."
20
+
],
21
+
"tags": [],
22
+
"authorIds": [],
23
+
"dependencies": [],
24
+
"globalVariables": [],
25
+
"sceneVariables": [],
26
+
"eventsFunctions": [
27
+
{
28
+
"description": "Initializes the system tray icon for the application. Use this event one time, from the moment you want the ability for your app to be minimized to the small system tray icon. For example, as the very first event of the very first scene.",
29
+
"fullName": "Initialize system tray",
30
+
"functionType": "Action",
31
+
"name": "InitializeSystemTray",
32
+
"sentence": "Initialize system tray, with the Tooltip Text _PARAM1_, Show Label _PARAM2_, Quit Label _PARAM3_, and if filled, Custom Label _PARAM4_ and Custom Value _PARAM5_",
33
+
"events": [
34
+
{
35
+
"type": "BuiltinCommonInstructions::JsCode",
36
+
"inlineCode": [
37
+
"if (typeof require === 'undefined') return;",
38
+
"",
39
+
"if (gdjs._systemTrayInitialized) return;",
40
+
"",
41
+
"const runtimeGame = runtimeScene.getGame();",
42
+
"",
43
+
"const renderer = runtimeGame.getRenderer();",
44
+
"",
45
+
"let electron = null;",
46
+
"",
47
+
"let remote = null;",
48
+
"",
49
+
"try {",
50
+
"",
51
+
" electron = renderer.getElectron ? renderer.getElectron() : null;",
"longDescription": "The text that shows upon hovering over the app's tray icon. By default, it's called \"My Game Name\", and you can change it however you want.",
194
+
"name": "TooltipText",
195
+
"supplementaryInformation": "[\"My Game Name\"]",
196
+
"type": "stringWithSelector"
197
+
},
198
+
{
199
+
"description": "Show Label",
200
+
"longDescription": "The label that restores the app window when clicked. By default, it's logically called \"Show\", but here's an option for you to change it however you want.",
201
+
"name": "ShowLabel",
202
+
"supplementaryInformation": "[\"Show\"]",
203
+
"type": "stringWithSelector"
204
+
},
205
+
{
206
+
"description": "Quit Label",
207
+
"longDescription": "The label that closes the app when clicked. By default, it's logically called \"Quit\", but here's an option for you to change it however you want.",
208
+
"name": "QuitLabel",
209
+
"supplementaryInformation": "[\"Quit\"]",
210
+
"type": "stringWithSelector"
211
+
},
212
+
{
213
+
"description": "Custom Label",
214
+
"longDescription": "A label that sends a string into a scene variable named \"TrayAction\" when clicked. By default, it's empty, and you don't have to use it if you don't want; in that case, just leave it like this.",
215
+
"name": "CustomLabel",
216
+
"supplementaryInformation": "[\"\"]",
217
+
"type": "string"
218
+
},
219
+
{
220
+
"description": "Custom Value",
221
+
"longDescription": "A custom string that gets sent into the \"TrayAction\" scene variable. Use it with the \"Custom Label\".",
0 commit comments