Compare commits

...

5 Commits

@ -1,4 +1,4 @@
{
gear = "https://git.doublefourteen.io/lua/gear",
moonspeak = "https://git.doublefourteen.io/lua/moonspeak"
gear = "https://gitea.it/1414codeforge/gear",
moonspeak = "https://gitea.it/1414codeforge/moonspeak"
}

@ -19,7 +19,7 @@ function love.load()
local x = math.floor((love.graphics.getWidth() - w) / 2)
local y = math.floor((love.graphics.getHeight() - h) / 2)
ui = yui.Ui.new {
ui = yui.Ui:new {
x = x, y = y,
yui.Rows {
@ -45,7 +45,7 @@ function love.draw()
end
```
![Hello, World!](https://git.doublefourteen.io/lua/yui-examples/raw/branch/master/pics/hello_world.png)
![Hello, World!](https://gitea.it/1414codeforge/yui-examples/raw/branch/master/pics/hello_world.png)
## Features
@ -75,17 +75,17 @@ end
**Yui** depends on:
* [gear](https://git.doublefourteen.io/lua/gear) for general algorithms.
* [moonspeak](https://git.doublefourteen.io/lua/moonspeak) for its localization functionality.
* [gear](https://gitea.it/1414codeforge/gear) for general algorithms.
* [moonspeak](https://gitea.it/1414codeforge/moonspeak) for its localization functionality.
* ...and any of their dependencies.
You may either download each of them manually and place them inside a `lib` subdirectory, or use
[crush](https://git.doublefourteen.io/lua/crush) to do the work for you.
[crush](https://gitea.it/1414codeforge/crush) to do the work for you.
1. Clone this repository.
```sh
git clone https://git.doublefourteen.io/lua/yui
git clone https://gitea.it/1414codeforge/yui
```
2. Move to repository root directory:
@ -104,14 +104,14 @@ You should now see a `lib` subdirectory containing the necessary dependencies.
## Integrating yui in my project using crush
1. Download the latest [crush.lua](https://git.doublefourteen.io/lua/crush/src/branch/master/crush.lua) file and
1. Download the latest [crush.lua](https://gitea.it/1414codeforge/crush/src/branch/master/crush.lua) file and
place it in your project's root directory.
2. Create a `.lovedeps` text file in your project's root with the following entry:
```lua
{
yui = "https://git.doublefourteen.io/lua/yui",
yui = "https://gitea.it/1414codeforge/yui",
-- ...more dependencies, if necessary...
}
@ -134,13 +134,22 @@ local yui = require 'lib.yui'
## Documentation
...Ouch.
Code is documented with [LDoc](https://github.com/lunarmodules/LDoc).
Documentation is underway, however the source code is (IMHO) sufficiently
Documentation may be generated running the command:
```sh
ldoc .
```
`ldoc` generates a `doc` directory, open `doc/index.html`
with your favorite browser to read the documentation.
The source code is also (IMHO) sufficiently
straightforward and disciplined to have a decent overview of the functionality.
Examples are available at:
[https://git.doublefourteen.io/lua/yui-examples](https://git.doublefourteen.io/lua/yui-examples)
[https://gitea.it/1414codeforge/yui-examples](https://gitea.it/1414codeforge/yui-examples)
## Acknowledgement

@ -5,11 +5,11 @@ format = 'markdown'
full_description = [[
The Yui library assists in designing menu screens, pause menus, HUDs, and such.
Source code: @{https://git.doublefourteen.io/lua/yui}
Source code: @{https://gitea.it/1414codeforge/yui}
Examples: @{https://git.doublefourteen.io/lua/yui-examples}
Examples: @{https://gitea.it/1414codeforge/yui-examples}
Pictures: @{https://git.doublefourteen.io/lua/yui-examples/src/branch/master/pics}
Pictures: @{https://gitea.it/1414codeforge/yui-examples/src/branch/master/pics}
The main features: grid layout, widget navigation with keyboard/joystick buttons, support for managing custom
@ -17,7 +17,7 @@ input devices (keyboard, mouse, touch, gamepad), and an easily extensible widget
described with a declarative approach: the layout is defined once, and events are handled in the callbacks.
Integrated support for localization was achieved through the use of another library: moonspeak.
(@{https://git.doublefourteen.io/lua/moonspeak})
(@{https://gitea.it/1414codeforge/moonspeak})
Most of the widget and theme rendering code are re-used from Matthias Richter's SUIT library.
(@{https://github.com/vrld/suit})

@ -2,7 +2,8 @@
--
-- Author: Lorenzo Cogotti
-- Copyright: 2022 The DoubleFourteen Code Forge
-- License: MIT (see LICENSE file for details)
-- Home: https://gitea.it/1414codeforge/crush
-- License: MIT
local io = require 'io'
local os = require 'os'

Loading…
Cancel
Save