Skip to content

Conversation

@malec-palec
Copy link
Contributor

@malec-palec malec-palec commented Jan 23, 2026

Summary

Adds support for configurable toolbar buttons in the GDevelop editor that execute shell commands in external terminal windows. Buttons are defined in a gdevelop-settings.yaml file in the project directory.

Features

  • Custom toolbar buttons appear next to the save button
  • Emoji or SVG icons supported
  • Shell commands execute in a new terminal window that stays open after completion
  • Cross-platform support (Windows, macOS, Linux)

Configuration

Create gdevelop-settings.yaml in your project root:

toolbarButtons:
  - name: "Build"
    icon: "🔨"
    command: "npm run build"
  - name: "Test"
    icon: "🧪"
    command: "npm t"
  - name: "Status"
    icon: '<svg viewBox="0 0 24 24" fill="currentColor">...</svg>'
    command: "git status"

See result:
btns

Technical Details

  • Uses Electron IPC for renderer → main process communication
  • Terminal spawning:
    • Windows: cmd.exe /c start cmd /k <command>
    • macOS: osascript to launch Terminal.app
    • Linux: Falls back through x-terminal-emulator, gnome-terminal, konsole, xterm
  • SVG icons detected by checking if icon string starts with <

Testing

  1. Create gdevelop-settings.yaml in a project directory
  2. Open the project in GDevelop
  3. Custom buttons should appear in toolbar after the save button
  4. Clicking a button opens a terminal and runs the command

@Bouh
Copy link
Collaborator

Bouh commented Jan 24, 2026

Idea to go futher:
Having custom buttons for certain commands is very common in game engines and 3D editors.
Do you think it would be possible to extend the custom button you made to connect it to a user-written script to act directly in the scene editor?

For example, in Maya 3D, the interface is customizable and Python/Mel scripts can be used to generate elements and interact with the editor. Here is a basic example in Maya.

This could help automate the placement of objects on the scene programmatically. And much more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants