Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kirigami

Kirigami is a rectangle-layout library for lua, but mainly for use with love2d.
It is named after Japanese kirigami.

Kirigami was inspired by NLay by MikuAuahDark.

It works great with Inky!


basic


looping



Learning:

Honestly, the best way to learn is just from doing.
Clone this repo and have a play around with the example in main.lua.

API Reference:

See API.md for a basic API reference.
Or just look through the source code :)

Simple example with code:

basic

function love.draw()
    local screen = kirigami.Region(0,0, love.graphics.getDimensions())
    drawRegion(screen)

    local header, main = screen:splitVertical(0.2, 0.8)
    namedRegion("header", header)

    local left, right = main:splitHorizontal(0.4, 0.6)
    namedRegion("left", left)

    local padded_right = right:pad(20) -- pad by 20 pixels
    namedRegion("padded_right", padded_right)
end



About

A Simple rectangle layout library for lua

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages