srcimon / screwbox

Minimalist 2D Java game engine. Result of covid lockdown.
MIT License
8 stars 0 forks source link

Add system tray icon and infos for screwbox #282

Open srcimon opened 6 months ago

srcimon commented 6 months ago
    try {
        PopupMenu demo = new PopupMenu("DEMO");
        MenuItem quit = new MenuItem("quit");
        quit.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
            stop();
            }
        });
        demo.add(quit);
        SystemTray.getSystemTray().add(new TrayIcon(SpritesBundle.BOX_STRIPED_32.get().image(Time.now()), "TOOLTIP", demo));
    } catch (AWTException e) {
        throw new RuntimeException(e);
    }