diff --git a/README.md b/README.md index a49686a..d46c0f9 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,8 @@ For most network scripts `on_alarm()` should be used. * `ui:show_toast(string)` - shows informational message in Android style; * `ui:get_default_title()` - returns the standard widget title (set in the `name` metadata); * `ui:set_title()` - changes the title of the widget, should be called before the data display function (empty line - reset to the standard title); -* `ui:set_folding_flag(boolean)` - sets or clears the flag of the folded mode of the widget, the function should be called before the data display functions; +* `ui:set_folding_flag(boolean)` - sets the flag of the folded mode of the widget, the function should be called before the data display functions; +* `ui:get_folding_flag()` - returns folding flag; * `ui:get_colors()` - returns table with current theme colors; When you click on any element of the interface, the `on_click(number)` callback will be executed, where number is the ordinal number of the element. A long click calls `on_long_click(number)`. For example, if you use `ui:show_buttons` to show three buttons, then clicking the first button will call `on_click` with argument 1, the second with arguments 2, and so on. If there is only one element on the screen, the argument will always be equal to one and can be omitted. diff --git a/README_ru.md b/README_ru.md index 96fd756..d3cc1c0 100644 --- a/README_ru.md +++ b/README_ru.md @@ -26,6 +26,7 @@ * `ui:get_default_title()` - возвращает стандартный заголовок виджета (задается в метаданных `name`); * `ui:set_title()` - изменяет заголовок виджета, функцию следует вызывать до функции отображения данных (пустая строка - сброс до стандартного заголовка); * `ui:set_folding_flag(boolean)` - устанавливает или снимает флаг свернутого режима виджета, функцию следует вызывать до функций отображения данных; +* `ui:get_folding_flag()` - возвращает флаг свернутого режима * `ui:get_colors()` - возвращает таблицу текущих цветов темы; При нажатии на любой элемент интерфейса будет выполнен колбек `on_click(number)`, где number - это порядковый номер элемента. Долгое нажатие вызывает `on_long_click(number)`. Например, если вы используете `ui:show_buttons` для показа трех кнопок, то при нажатии первой кнопки будет вызван `on_click` с аргументом 1, второй - с аргументов 2, и так далее. Если элемент на экране всего один - аргумент всегда будет равен единице и его можно будет опустить.