Difference between revisions of "SUIT"
(Created page with "== SUIT - The Simple User Interface Toolkit for LÖVE == Make games, not GUIs! SUIT gives you: * Buttons * Image Buttons * Labels * Text input boxes * Checkboxes * Cake * S...") |
m (→Other Languages) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | SUIT - The Simple User Interface Toolkit for LÖVE. Make games, not GUIs! | |
− | + | SUIT supports layouts and themes. | |
− | |||
− | SUIT | ||
+ | == Widgets == | ||
* Buttons | * Buttons | ||
* Image Buttons | * Image Buttons | ||
Line 10: | Line 9: | ||
* Text input boxes | * Text input boxes | ||
* Checkboxes | * Checkboxes | ||
− | |||
* Sliders | * Sliders | ||
− | |||
− | |||
− | |||
− | + | == Examples == | |
+ | === Input and a button demo === | ||
+ | <source lang="lua"> | ||
+ | suit = require 'suit' | ||
− | + | local input = {text = ""} | |
− | + | function love.update(dt) | |
− | + | suit.layout.reset(100,100) | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | suit.Input(input, suit.layout.row(200,30)) | |
+ | suit.Label("Hello, "..input.text, {align = "left"}, suit.layout.row()) | ||
− | + | suit.layout.row() -- padding of one cell | |
+ | if suit.Button("Close", suit.layout.row()).hit then | ||
+ | love.event.quit() | ||
+ | end | ||
+ | end | ||
− | + | function love.draw() | |
+ | suit.core.draw() | ||
+ | end | ||
+ | |||
+ | function love.textinput(t) | ||
+ | suit.core.textinput(t) | ||
+ | end | ||
+ | |||
+ | function love.keypressed(key) | ||
+ | suit.core.keypressed(key) | ||
+ | end | ||
+ | </source> | ||
+ | |||
+ | == Links == | ||
+ | * [http://suit.readthedocs.org/en/latest/ Documentation] | ||
+ | * [https://github.com/vrld/SUIT Source code] | ||
+ | * [https://love2d.org/forums/viewtopic.php?f=5&t=81522 Forum thread] | ||
{{#set:LOVE Version=0.10.x}} | {{#set:LOVE Version=0.10.x}} | ||
Line 58: | Line 52: | ||
{{#set:Description=Simple User Interface Toolkit}} | {{#set:Description=Simple User Interface Toolkit}} | ||
{{#set:Keyword=GUI}} | {{#set:Keyword=GUI}} | ||
+ | {{#set:Standalone_Lua_Module=Yes}} | ||
[[Category:Libraries]] | [[Category:Libraries]] | ||
+ | |||
+ | == Other Languages == | ||
+ | {{i18n|SUIT}} |
Latest revision as of 01:26, 16 December 2019
SUIT - The Simple User Interface Toolkit for LÖVE. Make games, not GUIs!
SUIT supports layouts and themes.
Widgets
- Buttons
- Image Buttons
- Labels
- Text input boxes
- Checkboxes
- Sliders
Examples
Input and a button demo
suit = require 'suit'
local input = {text = ""}
function love.update(dt)
suit.layout.reset(100,100)
suit.Input(input, suit.layout.row(200,30))
suit.Label("Hello, "..input.text, {align = "left"}, suit.layout.row())
suit.layout.row() -- padding of one cell
if suit.Button("Close", suit.layout.row()).hit then
love.event.quit()
end
end
function love.draw()
suit.core.draw()
end
function love.textinput(t)
suit.core.textinput(t)
end
function love.keypressed(key)
suit.core.keypressed(key)
end
Links
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info