mirror of
https://github.com/keharriso/love-nuklear.git
synced 2025-09-11 00:27:48 -04:00
Updated Documentation (markdown)
parent
c706549796
commit
3192affec1
1 changed files with 13 additions and 14 deletions
|
@ -344,7 +344,7 @@ End the current menu. Always call this at the end of any open menu.
|
|||
|
||||
#### nk.label(text)
|
||||
#### nk.label(text, align/'wrap')
|
||||
#### nk.label(text, align/'wrap', color)
|
||||
#### nk.label(text, align/'wrap', [color](#colors))
|
||||
Show a text string. Optionally specify an alignment and/or [color](#colors).
|
||||
|
||||
#### nk.image(img)
|
||||
|
@ -353,8 +353,8 @@ Show an image.
|
|||
See [LÖVE Image](https://love2d.org/wiki/Image).
|
||||
|
||||
#### activated = nk.button(title)
|
||||
#### activated = nk.button(title, color/symbol/image)
|
||||
Add a button with a title and/or a color, symbol, or image.
|
||||
#### activated = nk.button(title, [color](#colors)/symbol/image)
|
||||
Add a button with a title and/or a [color](#colors), symbol, or image.
|
||||
|
||||
Return `true` if activated, and `false` otherwise.
|
||||
|
||||
|
@ -403,13 +403,13 @@ Add a progress widget, optionally making it modifiable.
|
|||
|
||||
If given a number `current`, return the new `current` value. If given a table with a number field named `value` instead, the field gets updated and the function returns `true` on a change and `false` otherwise.
|
||||
|
||||
#### color = nk.color_picker(color)
|
||||
#### color = nk.color_picker(color, 'RGB'/'RGBA')
|
||||
#### [color](#colors) = nk.color_picker([color](#colors))
|
||||
#### [color](#colors) = nk.color_picker([color](#colors), 'RGB'/'RGBA')
|
||||
#### changed = nk.color_picker(value_table)
|
||||
#### changed = nk.color_picker(value_table, 'RGB'/'RGBA')
|
||||
Add a color picker widget, optionally specifying format (default 'RGB', no alpha).
|
||||
|
||||
If given a `color` string, return the new `color`. If given a table with a color string field named `value` instead, the field gets updated and the function returns `true` on change and `false` otherwise.
|
||||
If given a `[color](#colors)` string, return the new `[color](#colors)`. If given a table with a [color](#colors) string field named `value` instead, the field gets updated and the function returns `true` on change and `false` otherwise.
|
||||
|
||||
#### current = nk.property(name, min, current, max, step, inc_per_pixel)
|
||||
#### changed = nk.property(name, min, value_table, max, step, inc_per_pixel)
|
||||
|
@ -433,10 +433,10 @@ Add a drop-down combobox widget. `items` should be an array of strings. `item_he
|
|||
If a number `index` is specified, then the function returns the new selected `index`. If a table with a number field `value` is given instead, then the field gets updated with the currently selected index and the function returns `true` on change and `false` otherwise.
|
||||
|
||||
#### open = nk.combobox_begin(text)
|
||||
#### open = nk.combobox_begin(text, color/symbol/image)
|
||||
#### open = nk.combobox_begin(text, color/symbol/image, width)
|
||||
#### open = nk.combobox_begin(text, color/symbol/image, width, height)
|
||||
Start a combobox widget. This form gives complete control over the drop-down list (it's treated like a new window). Color/symbol/image defaults to none, while width and height default to sensible values based on widget bounds.
|
||||
#### open = nk.combobox_begin(text, [color](#colors)/symbol/image)
|
||||
#### open = nk.combobox_begin(text, [color](#colors)/symbol/image, width)
|
||||
#### open = nk.combobox_begin(text, [color](#colors)/symbol/image, width, height)
|
||||
Start a combobox widget. This form gives complete control over the drop-down list (it's treated like a new window). [Color](#colors)/symbol/image defaults to none, while width and height default to sensible values based on widget bounds.
|
||||
|
||||
Remember to call `nk.combobox_end` if the combobox is open.
|
||||
|
||||
|
@ -577,11 +577,11 @@ local color_table = {
|
|||
### Styles
|
||||
|
||||
For finer-grained control over styles, including custom image-based skinning, Nuklear provides the following style items:
|
||||
```
|
||||
|
||||
local style = {
|
||||
['font'] = <Font>,
|
||||
['text'] = {
|
||||
['color'] = <color>,
|
||||
['color'] = color,
|
||||
|
||||
},
|
||||
['button'] = {
|
||||
|
@ -632,5 +632,4 @@ local style = {
|
|||
['window'] = {
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue