2016-04-03 18:47:01 +00:00
|
|
|
# Pop.Box
|
|
|
|
|
|
|
|
*Do not mix with [Cola][1].*
|
|
|
|
|
2016-04-22 07:02:49 +00:00
|
|
|
[![GitHub release](https://img.shields.io/github/release/Guard13007/Pop.Box.svg?maxAge=2592000)](https://github.com/Guard13007/Pop.Box/releases/latest)
|
|
|
|
[![GitHub downloads](https://img.shields.io/github/downloads/Guard13007/Pop.Box/latest/total.svg?maxAge=2592000)](https://github.com/Guard13007/Pop.Box/releases/latest)
|
|
|
|
[![GitHub issues](https://img.shields.io/github/issues-raw/Guard13007/Pop.Box.svg?maxAge=2592000)](https://github.com/Guard13007/Pop.Box/issues)
|
|
|
|
[![GitHub license](https://img.shields.io/github/license/Guard13007/Pop.Box.svg?maxAge=2592000)](https://github.com/Guard13007/Pop.Box/blob/master/LICENSE.txt)
|
|
|
|
|
2016-04-03 18:47:01 +00:00
|
|
|
Pop.Box is a GUI library for use in the [LÖVE][2] engine, designed to be easy to
|
|
|
|
use and require as little code as possible to set up. It is primarily designed
|
|
|
|
to make it easy to experiment with GUIs during development.
|
|
|
|
|
2016-04-04 08:16:32 +00:00
|
|
|
Supports LÖVE versions 0.9.1 and higher.
|
|
|
|
|
2016-06-21 05:52:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
**Note**: Currently rewriting and redesigning Pop.Box. The following info is out of date until I finish:
|
|
|
|
|
2016-04-03 18:47:01 +00:00
|
|
|
## Features
|
|
|
|
|
|
|
|
- Quickly set up and align GUI elements.
|
|
|
|
- Fully customizable alignment / styling.
|
|
|
|
- Moving/resizing elements takes alignment into account.
|
2016-04-04 08:16:32 +00:00
|
|
|
- Mouse and key input handling. (**Note**: Work in progress.)
|
2016-04-03 18:47:01 +00:00
|
|
|
- Extensible: Make your own elements, skins, extensions, and everything is
|
|
|
|
automatically loaded.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
The basics:
|
|
|
|
|
|
|
|
```lua
|
|
|
|
local pop = require "pop"
|
|
|
|
-- define LÖVE callbacks here (update, draw, textinput, mouse/key events)
|
|
|
|
local window = pop.window():align("center"):setTitle("Welcome!")
|
|
|
|
window:addChild(pop.text("Welcome to Pop.Box()!"))
|
|
|
|
```
|
|
|
|
|
2016-04-04 08:16:32 +00:00
|
|
|
**Note**: Due to this being so early in development...the above example doesn't
|
|
|
|
actually work as expected. `window` is a very new element.
|
|
|
|
|
2016-04-17 06:57:21 +00:00
|
|
|
For more examples, see the code in `demo`. For documentation, see `docs` (and
|
|
|
|
links to documentation below).
|
2016-04-03 18:47:01 +00:00
|
|
|
|
|
|
|
# Documentation
|
|
|
|
|
2016-04-17 06:57:21 +00:00
|
|
|
**Note**: Docs are a work in progress, sometimes lagging behind the actual code.
|
2016-04-03 18:47:01 +00:00
|
|
|
|
|
|
|
- [Pop Module][3] (The main module/interface.)
|
|
|
|
- [Elements][4] (Basic features of elements/types of elements.)
|
|
|
|
- [Skins][5] (A basic system for quickly applying settings to many elements.)
|
|
|
|
- [Extensions][7] (A way to load custom code in.)
|
|
|
|
- [Drawables][6] (Reference for what can be used as a background/color.)
|
|
|
|
|
|
|
|
[1]: https://en.wikipedia.org/wiki/Cola_(programming_language)
|
|
|
|
[2]: https://love2d.org/
|
|
|
|
[3]: ./docs/Pop.md
|
|
|
|
[4]: ./docs/Elements.md
|
|
|
|
[5]: ./docs/Skins.md
|
|
|
|
[6]: ./docs/Drawables.md
|
|
|
|
[7]: ./docs/Extensions.md
|