GdKirie.Tray
0.15.0
dotnet add package GdKirie.Tray --version 0.15.0
NuGet\Install-Package GdKirie.Tray -Version 0.15.0
<PackageReference Include="GdKirie.Tray" Version="0.15.0" />
<PackageVersion Include="GdKirie.Tray" Version="0.15.0" />
<PackageReference Include="GdKirie.Tray" />
paket add GdKirie.Tray --version 0.15.0
#r "nuget: GdKirie.Tray, 0.15.0"
#:package GdKirie.Tray@0.15.0
#addin nuget:?package=GdKirie.Tray&version=0.15.0
#tool nuget:?package=GdKirie.Tray&version=0.15.0
GdKirie.Tray
GdKirie.Tray provides system tray icons and menus for Kirie Godot applications.
It includes C# APIs and Eventa integration for browser clients.
Install
Install and configure the plugin as described in the plugin setup. The installer adds this NuGet package and the Godot addon.
Use
Run tray operations on Godot's main thread after the scene tree starts:
using Godot;
using GdKirie.Tray;
using var open = new MenuItem(new("Open"));
using var menu = new Menu(new() { Items = [open] });
using var tray = new TrayIcon(new()
{
Icon = new IconSource.Resource("res://tray.svg"),
Menu = menu,
Tooltip = "My application",
});
using var events = new TrayEvents();
events.Menu += id =>
{
if (id == open.Id)
{
GD.Print("Open");
}
};
Keep res://tray.svg in the Godot project.
Keep these objects alive while the application runs.
Dispose them on Godot's main thread during shutdown.
Browser access
Register the tray contracts before you create the application's Eventa context:
using GdKirie.Tray.EventaAdapter;
using GdKirie.EventaAdapter;
var registry = GdKirieTrayEventaAdapter.Register(new KirieEventaJsonRegistry());
using var eventa = kirie.CreateEventaContext(registry);
using var adapter = GdKirieTrayEventaAdapter.Attach(eventa.Context);
Keep the adapter alive while browser clients use the tray API. Dispose it before its Eventa context. Create the browser client as described in @gd-kirie/tray.
See the tray example for a complete application.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- GdKirie.EventaAdapter (>= 0.15.0)
- GodotSharp (>= 4.7.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.