the penguin gui library


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

Internal
a month ago
1.1
8
Owner:
penguinencounter
Source:
https://github.com/penguinencounter/f...
Homepage:
N/A
License:
MIT
Created:
a month ago
Latest Version:
1.0.1 (a month ago)
Factorio version:
1.1
Downloaded by:
8 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))