Lua:Neutrino-API:messagebox:en: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
K (1 Version: Import Doku für Lua Neutrino API) |
Dbt (Diskussion | Beiträge) (add to widgets) |
||
| (4 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
= messagebox = | = messagebox = | ||
{{Lua_API_Funktion| | {{Lua_API_Funktion|Creates a message box object, required to show a message box on screen with text and button(s).<br />Return value defines pressed button.|messagebox.exec|Parameter}} | ||
{{Lua_API_Funktion_Param_Kopf}} | {{Lua_API_Funktion_Param_Kopf}} | ||
| Zeile 11: | Zeile 11: | ||
{{Lua_API_Funktion_Param_Zeile0|width|number|width of messagebox|Default: 450}} | {{Lua_API_Funktion_Param_Zeile0|width|number|width of messagebox|Default: 450}} | ||
{{Lua_API_Funktion_Param_Zeile1|timeout|number|timeout till hide|Default: EPG Timeout}} | {{Lua_API_Funktion_Param_Zeile1|timeout|number|timeout till hide|Default: EPG Timeout}} | ||
{{Lua_API_Funktion_Param_Zeile0|return_default_on_timeout|boolean|Return of default-value, when box will be closed|Default: false}} | {{Lua_API_Funktion_Param_Zeile0|text_mode|string|flags for text modes '''API <nowiki>>=</nowiki> v1.82''' Note: 'mode' is obsolete but still usable, 'text_mode' should be preferred|ALIGN_AUTO_WIDTH}} | ||
{{Lua_API_Funktion_Param_Zeile1||||ALIGN_AUTO_HIGH}} | |||
{{Lua_API_Funktion_Param_Zeile0||||ALIGN_SCROLL ''Default''}} | |||
{{Lua_API_Funktion_Param_Zeile1||||ALIGN_CENTER ''Default''}} | |||
{{Lua_API_Funktion_Param_Zeile0||||ALIGN_RIGHT}} | |||
{{Lua_API_Funktion_Param_Zeile1||||ALIGN_TOP}} | |||
{{Lua_API_Funktion_Param_Zeile0||||ALIGN_BOTTOM}} | |||
{{Lua_API_Funktion_Param_Zeile1||||ALIGN_NO_AUTO_LINEBREAK}} | |||
{{Lua_API_Funktion_Param_Zeile0||||DECODE_HTML}} | |||
{{Lua_API_Funktion_Param_Zeile1|return_default_on_timeout|boolean|Return of default-value, when box will be closed|Default: false}} | |||
{{Lua_API_Funktion_Param_Fuss}} | {{Lua_API_Funktion_Param_Fuss}} | ||
| Zeile 22: | Zeile 31: | ||
[[Category:Lua:Neutrino-API:en]] | [[Category:Lua:Neutrino-API:en]] | ||
[[Category:Lua:Neutrino-API:Widgets:en]] | |||
Aktuelle Version vom 1. November 2021, 17:03 Uhr
messagebox
Creates a message box object, required to show a message box on screen with text and button(s).
Return value defines pressed button.
| messagebox.exec{Parameter} |
Parameter:
| Parameter | Typ | Description/Beschreibung | |
| name | title | caption | string | caption text | |
| text | string | message text | |
| default | string | default return value | "yes" | "no" | "ok" | "cancel" | "back" |
| buttons | string | shown buttons can be combined from "all" |
"yes", "no", "ok", "cancel", "back", "all" |
| align | string | alignment of buttons | "center1" | "center2" | "left" | "right" Default: "center1" |
| icon | string | icon in titlebar | Default: "info" |
| width | number | width of messagebox | Default: 450 |
| timeout | number | timeout till hide | Default: EPG Timeout |
| text_mode | string | flags for text modes API >= v1.82 Note: 'mode' is obsolete but still usable, 'text_mode' should be preferred | ALIGN_AUTO_WIDTH |
| ALIGN_AUTO_HIGH | |||
| ALIGN_SCROLL Default | |||
| ALIGN_CENTER Default | |||
| ALIGN_RIGHT | |||
| ALIGN_TOP | |||
| ALIGN_BOTTOM | |||
| ALIGN_NO_AUTO_LINEBREAK | |||
| DECODE_HTML | |||
| return_default_on_timeout | boolean | Return of default-value, when box will be closed | Default: false |
| en: Parameters with default-values are optional. If not needed, no definition is required. In case of missing parameter, default value is used.
de: Parameter mit Default-Wert sind optional. dh. sie müssen nicht angegeben werden. Falls der Parameter fehlt, wird automatisch dieser Wert angenommen. |
Example:
| local ret = messagebox.exec{ title="Morgen ist Freitag", text="Findest du das gut?", buttons={"yes", "no", "cancel"} }; |