Updated Documentation (markdown)

Kevin Harrison 2016-11-15 12:43:56 -05:00
parent e19350880e
commit 1b5d9e86ae

@ -282,9 +282,9 @@ Set up a context menu of the given size and trigger bounds. Also takes window [f
Return `true` if the context menu is open, and `false` otherwise.
#### activated = nk.contextual_item(text)
#### activated = nk.contextual_item(text, symbol/image)
#### activated = nk.contextual_item(text, symbol/image, [align](#alignment))
Add an item to a context menu. Optionally specify a symbol type, image, and/or [alignment](#alignment).
#### activated = nk.contextual_item(text, [symbol](#symbols)/image)
#### activated = nk.contextual_item(text, [symbol](#symbols)/image, [align](#alignment))
Add an item to a context menu. Optionally specify a [symbol](#symbols) type, image, and/or [alignment](#alignment).
Return `true` if the item is activated, and `false` otherwise.
@ -319,18 +319,18 @@ Start a menu bar. Menu bars stay at the top of a window even when scrolling. Cal
#### nk.menubar_end()
Ends a menu bar. Always call this at the end of a menu bar started with `nk.menubar_begin`.
#### open = nk.menu_begin(title, symbol/image, width, height)
#### open = nk.menu_begin(title, symbol/image, width, height, [align](#alignment))
Start a menu of the given title and size. Optionally specify a symbol, image, and/or [alignment](#alignment).
#### open = nk.menu_begin(title, [symbol](#symbols)/image, width, height)
#### open = nk.menu_begin(title, [symbol](#symbols)/image, width, height, [align](#alignment))
Start a menu of the given title and size. Optionally specify a [symbol](#symbols), image, and/or [alignment](#alignment).
Return `true` if the menu is open, and `false` otherwise.
Be sure to call `nk.menu_end` when ending open menus.
#### activated = nk.menu_item(title)
#### activated = nk.menu_item(title, symbol/image)
#### activated = nk.menu_item(title, symbol/image, [align](#alignment))
Add a menu item to the current menu. Optionally specify a symbol, image, and/or [alignment](#alignment).
#### activated = nk.menu_item(title, [symbol](#symbols)/image)
#### activated = nk.menu_item(title, [symbol](#symbols)/image, [align](#alignment))
Add a menu item to the current menu. Optionally specify a [symbol](#symbols), image, and/or [alignment](#alignment).
Return `true` if the menu item is activated, and `false` otherwise.
@ -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](#colors)/symbol/image)
Add a button with a title and/or a [color](#colors), symbol, or image.
#### activated = nk.button(title, [color](#colors)/[symbol](#symbols)/image)
Add a button with a title and/or a [color](#colors), [symbol](#symbols), or image.
Return `true` if activated, and `false` otherwise.
@ -433,17 +433,17 @@ 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](#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.
#### open = nk.combobox_begin(text, [color](#colors)/[symbol](#symbols)/image)
#### open = nk.combobox_begin(text, [color](#colors)/[symbol](#symbols)/image, width)
#### open = nk.combobox_begin(text, [color](#colors)/[symbol](#symbols)/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](#symbols)/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.
#### activated = nk.combobox_item(text, symbol/image, [align](#alignment))
#### activated = nk.combobox_item(text, symbol/image)
#### activated = nk.combobox_item(text, [symbol](#symbols)/image, [align](#alignment))
#### activated = nk.combobox_item(text, [symbol](#symbols)/image)
#### activated = nk.combobox_item(text)
Add a combobox item, optionally specifying a symbol, image, and/or [alignment](#alignment).
Add a combobox item, optionally specifying a [symbol](#symbols), image, and/or [alignment](#alignment).
Return `true` if the item is activated, and `false` otherwise.