Log inGet started
World

Win95 UI Kit

Branchmain
Branchesmain
Commitdd234f61ab

README.md

win95 — a Windows 95 UI kit

A reusable component library for building authentic Windows 95 desktops with the engine's zui UI system, plus a demo desktop that uses it.

Install this package, then build a Win95 UI in a few calls instead of hand-authoring all the chrome.

Library — modules/win95

local W = require("@<namespace>::win95.modules.win95")   -- inside the package: require("~.modules.win95")

W.applyTheme()                                            -- flat, square Win95 theme

ui.registerScreen("mc", W.window(
  { id = "mc", title = "My Computer", x = 120, y = 70, w = 400, h = 280,
    menus = { "File", "Edit", "View", "Help" } },
  { { type = "label", props = { text = "4 object(s)" } } }), 10)

ui.registerScreen("taskbar", W.taskbar({
  tasks = { { id = "mc", label = "My Computer" } }, clock = "1:05 AM" }), 5)

ui.registerScreen("start", W.startMenu({ items = {
  { key = "programs", label = "Programs", arrow = true },
  false,                                                  -- a separator
  { key = "shutdown", label = "Shut Down..." } } }), 20)

Builders

BuilderProduces
applyTheme()the flat, square Win95 theme (call once)
raised(children, style?) / sunken(children, style?)a raised / sunken 3D-bevel panel
window(opts, children)a movable + resizable window: gradient title bar, optional system icon, min/max/close controls, optional menu bar, sunken client area that fills
taskbar(opts)the Start taskbar: Start button + task buttons + clock tray
desktopIcon(opts)a desktop icon (image over a label)
startMenu(opts)the Start menu: vertical "Windows 95" banner + icon'd items + fly-out arrows + separators

All sizes are logical points (ui.screenSize() space). Clicks route to <id>:close / <id>:max / <id>:min, task:<id>, start:<key>, icon:<id>, <id>:menu:<name> — handle them in your component's onCallback(id).

colors exposes the palette (face, titleA1/A2, desktop, …).

Demo — components/Win95Desktop

Win95Desktop.component builds a full, interactive desktop from the library (teal desktop, a window, the taskbar with a live clock, a toggling Start menu). Drop it on an entity to see the kit in action.