the penguin gui library


Template-to-Lua compiler, types with metatable magic, etc

Internal
6 months ago
1.1
12
Owner:
penguinencounter
Source:
https://github.com/penguinencounter/f...
Homepage:
N/A
License:
MIT
Created:
6 months ago
Latest Version:
1.0.1 (6 months ago)
Factorio version:
1.1
Downloaded by:
12 users

penguin-gui

An over-engineered Factorio GUI library

Features

Performance

Compiled penguin-gui templates run slightly faster than other GUI libraries due to not recursively reading the template data. This is probably not a useful difference unless you're rendering thousands of templates.

Flexibility

Use one template for many variations of the same component with parameters.

local component = {
    type = "label",
    caption = pgui.param 'caption'
}
local add_component = pgui.compile(component)

-- later...
add_component(gui, {caption = "hello, world!"})
add_component(gui, {caption = "how are you?"})

Documentation

soonTM (look at bench.lua for an example, or control.lua (messy and hard to read, sorry))