From 93d418c3fae83a32a48edbb43a71ba892401acaf Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 20 Jun 2017 22:47:23 -0400 Subject: Added documentation for new color selection dialog. This requires gtdialog r106 (changeset 4fbcad4d2031). --- core/.ui.dialogs.luadoc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'core/.ui.dialogs.luadoc') diff --git a/core/.ui.dialogs.luadoc b/core/.ui.dialogs.luadoc index 0d33183a..ebc2a167 100644 --- a/core/.ui.dialogs.luadoc +++ b/core/.ui.dialogs.luadoc @@ -476,3 +476,25 @@ function filteredlist(options) end -- informative_text = 'Check the languages you understand' -- items = {'English', 'Romanian'}, select = 1, string_output = true} function optionselect(options) end + +--- +-- Prompts the user with a color selection dialog defined by dialog options +-- table *options*, returning the color selected. +-- If the user canceled the dialog, returns `nil`. +-- @param options Table of key-value option pairs for the option select dialog. +-- +-- * `title`: The dialog's title text. +-- * `color`: The initially selected color as either a number in "0xBBGGRR" +-- format, or as a string in "#RRGGBB" format. +-- * `palette`: The list of colors to show in the dialog's color palette. +-- Up to 20 colors can be specified as either numbers in "0xBBGGRR" format +-- or as strings in "#RRGGBB" format. If `true` (no list was given), a +-- default palette is shown. +-- * `string_output`: Return the selected color in string "#RRGGBB" format +-- instead of numeric "0xBBGGRR" format. The default value is `false`. +-- * `float`: Show the dialog on top of all desktop windows. The default value +-- is `false`. +-- @return selected color +-- @usage ui.dialogs.colorselect{title = 'Foreground color', color = 0x000000, +-- palette = {'#000000', 0x0000FF, '#00FF00', 0xFF0000}} +function colorselect(options) end -- cgit v1.2.3