Web Analytics

godot-plugins-gtml

⭐ 54 stars English by Niekvdm

GTML - Godot Markup Language

A Godot 4.x addon that lets you build UI using HTML and CSS. Create game menus, HUDs, and panels with familiar web technologies.

Features

Quick Start

1. Install

Copy addons/gtml/ to your project and enable in Project Settings → Plugins.

2. Create Files

menu.html:

menu.css:

.menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px;
    background-color: #1a1a2e;
}

h1 { font-size: 32px; color: #ffffff; }

button { padding: 12px 24px; background-color: #00d4ff; border-radius: 4px; color: #000000; transition: background-color 200ms ease; }

button:hover { background-color: #00a8cc; }

3. Add GmlView Node

Add a GmlView node and set Html Path and Css Path in the Inspector.

4. Connect Signals

func _ready():
    $GmlView.button_clicked.connect(_on_button_clicked)

func _on_button_clicked(method_name: String): match method_name: "on_play": get_tree().change_scene_to_file("res://game.tscn") "on_quit": get_tree().quit()

Documentation

Examples

Check addons/gtml/examples/ for working demos:

License

MIT License

--- Tranlated By Open Ai Tx | Last indexed: 2025-12-23 ---