-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for OS system tray to allow closing/minimizing exported projects to the tray #2349
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
As this feature's implementation is highly OS-specific and not relevant to most games, I would recommend you to use a third-party utility like RBTray instead. It lets you minimize any application to the system tray by right-clicking the Minimize button. Also, automatic updates and matchmaking features are generally better provided by third-party services such as Steam and itch.io. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
any updates on this? This is not "unimportant to most games" but incredibly relevant to many devs out there. No matter if it's for games or not (Godot isn't just good for making games btw) |
|
As far as I know, nobody has started working on this feature yet. This proposal hasn't received much support, so it may not be implemented at all in core. However, it's always feasible for a skilled developer to implement this in a fork of Godot, for those who really need it.
Sending desktop notifications is covered by #1338. That proposal has received more support because it's more wildly applicable – games might actually need to send desktop notifications from time to time. PS: Please use the Edit button (hidden behind the … icon at the top-right corner of your comments) instead of multi-posting. |
I like this feature too, and I wish I can hide taskbar icon, like DesktopPet App. |
I'll add my 10p to this - I've recently found myself using Godot to create simple GUI apps and they would benefit from being 'Minimize to Tray' capable It's also not a 100% Windows thing - when I previously used nwjs it supported this concept on MacOS and some Linux Desktops too - docs here if anyone's interested |
If you're using godot-rust you can use this crate to make a tray icon on Win/Mac/Linux: https://github.com/olback/tray-item-rs |
Thats interesting and useful to know - thanks! |
https://github.com/dmikushin/tray Found a single header, super tiny C99 implementation of a system tray icon with a popup menu.on Github. Edited: |
The upstream repository doesn't appear to be actively maintained, so I'd recommend using the fork instead. |
I'm interested in using this feature for my multiplayer game, for which I've made a separate "dedicated server" GUI scene export, which is something that will tend to run in the background. |
I'm writing an app right now that could use this functionality. If Godot is going to be used for applications or advanced games, functionality like this will really help. In the meantime, I may have to move to MAUI. |
It would be nice if this tiny library could be included in core: https://github.com/dmikushin/tray and can @Calinou as a contributor to RBTray, can you confirm that is a Windows specific tool? I am hoping to create minimize to tray functionality for a parental tool/Firewall manager on my children's Linux systems. |
RBTray is Windows-only, but it's likely feasible to create an alternative that works on macOS and Linux too. |
this would also be very useful for making launchers for games using godot, once the main game launches the launcher can go to tray and maybe have the ability to add a few options to it like quit, stop, etc |
Yeah, I've got this same issue, for a project I'm working on, would be very nice for a window manager, as playing hot potato whenever the main window gets closed seems like a nightmare to implement. Being able to just retire it to the taskbar is a really nice clean solution there. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@foxp552 Please don't bump issues without contributing significant new information. Use the 👍 reaction button on the first post instead. Also, if I'm reading the documentation right, this is already implemented in 4.3 on Windows and macOS, but not on Linux. You'll need to use a StatusIndicator node (e.g. as the root node of an autoloaded scene) and a native menu that can be a PopupMenu child with I'll look into expanding the Operating System Testing demo to add an example. Adding Linux support will prove challenging, as the pull request says:
(Godot does not link against GTK, Qt or any other GUI toolkit.) |
@Calinou |
Ok, I love that this works, even if not on Linux (yet). |
There's a proposal tracking this: #8467 |
Run exported as system tray, with (or without) script.
Describe the project you are working on
Well, I was thinking about my future project, where it will be a multiplayer game and along with the game there will be advanced systems like native auto-update and out-of-game notifications ("Match Found!", for example).
Describe the problem or limitation you are having in your project
But, one of those features have a engine limitation for now. This feature is out-of-game notifications. It needs to be another .EXE and running as System Tray.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
It would be nice, when exporting the project for Windows, MacOS or Linux, an option that runs the program on the System Tray and define some functions if the user opens the Context Menu on the icon.
With that, we can make some popups using custom GUI. (Concept below)
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Concepts:
If this enhancement will not be used often, can it be worked around with a few lines of script?
If by any chance, this cannot be done visually on Export window, you can use the following GDScript commands:
OS.on_system_tray(true)
;OS.system_tray_context(INDEX : int, OPTION_TITLE : String, GDSCRIPT : String)
Is there a reason why this should be core and not an add-on in the asset library?
Well, from what I know about programming, unfortunately that will not be possible as a plugin/add-on in the Asset Library, for perhaps being very complex.
The text was updated successfully, but these errors were encountered: