ui

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package ui exposes a thin Lua binding over Fyne v2 widgets and windows. The Fyne-backed implementation (ui_fyne.go) is opt-in behind the `luascript_ui` build tag, since it drags in OpenGL/cgo and needs a C toolchain. By default ui_stub.go substitutes a no-op loader so a plain `go build ./cmd` stays pure-Go and dependency-light; `require("ui")` still resolves, only failing if a script actually constructs a widget. This file is the tag-agnostic entry point both code paths share.

Stub `ui` loader used by default (the Fyne implementation is opt-in via the `luascript_ui` build tag). Keeps the interpreter free of the Fyne/OpenGL/cgo dependency — so a plain `go run ./cmd` needs no C toolchain. `require("ui")` still succeeds at the package.preload stage and only panics when the script actually calls a constructor, matching how other optional drivers (native/db driver_postgres.go and friends) signal unavailability.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUIPreload

func RegisterUIPreload(v *vm.VM)

RegisterUIPreload installs the `ui` module under package.preload. `require("ui")` invokes the tag-selected uiLoader on first use.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL