Update README

This commit is contained in:
Evgeny
2024-11-14 16:58:40 +07:00
parent dbb0608176
commit 0069d1ed67
2 changed files with 31 additions and 5 deletions

View File

@@ -275,16 +275,36 @@ The function takes a command table of this format as a parameter:
`traffic` - traffic progress bar; `traffic` - traffic progress bar;
`screen` - screen time progress bar; `screen` - screen time progress bar;
`alarm` - next alarm info; `alarm` - next alarm info;
`clock` - current time;
`notes [NUM]` - last NUM notes; `notes [NUM]` - last NUM notes;
`tasks [NUM]` - last NUM tasks; `tasks [NUM]` - last NUM tasks;
`calendar [NUM]` - last NUM calendar events; `calendar [NUM]` - last NUM calendar events;
`calendarw` - weekly calendar;
`exchage [NUM] [FROM] [TO]` - exchange rate FROM currency TO currency; `exchage [NUM] [FROM] [TO]` - exchange rate FROM currency TO currency;
`player` - player controls; `player` - player controls;
`health` - health data;
`weather [NUM]` - weather forecast for NUM days; `weather [NUM]` - weather forecast for NUM days;
`worldclock [TIME_ZONE]` - time in the given TIME_ZONE; `worldclock [TIME_ZONE]` - time in the given TIME_ZONE;
`notify [NUM]` - last NUM notifications; `notify [NUM]` - last NUM notifications;
`dialogs [NUM]` - last NUM dialogs; `dialogs [NUM]` - last NUM dialogs;
`calculator` - calculator;
`feed [NUM]` - news feed;
`control` - control panel;
`stopwatch` - stopwatch;
`finance [NUM]` - finance tickers;
`financechart` - finance chart;
`contacts [NUM]` - contacts (number of lines);
`apps [NUM]` - frequent apps (number of lines);
`appbox [NUM]` - my apps (number of lines);
`applist [NUM]` - apps list (number of lines);
`appfolders [NUM]` - app folders;
`timer` - timers;
`mailbox [NUM]` - mail widget;
`dialer` - dialer;
`recorder` - recorder;
`telegram` - telegram messages;
`smartspacer` - SmartSpacer;
`widgetscontainer` - widgets container;
`tips` - tips;
`text [TEXT]` - just shows TEXT; `text [TEXT]` - just shows TEXT;
`space [NUM]` - NUM of spaces. `space [NUM]` - NUM of spaces.
``` ```
@@ -482,7 +502,7 @@ If there is a problem with the network, the `on_network_error_$id` callback will
* `calendar:open_event(id|event_table)` - opens an event in the system calendar; * `calendar:open_event(id|event_table)` - opens an event in the system calendar;
* `calendar:open_new_event([start], [end])` - opens a new event in the calendar, `start` - start date of the event in seconds, `end` - end date of the event; * `calendar:open_new_event([start], [end])` - opens a new event in the calendar, `start` - start date of the event in seconds, `end` - end date of the event;
* `calendar:add_event(event_table)` - adds event to the system calendar; * `calendar:add_event(event_table)` - adds event to the system calendar;
* `calendar:id_holiday(date)` - returns true if the given date is a holiday or a weekend. * `calendar:is_holiday(date)` - returns true if the given date is a holiday or a weekend.
Event table format: Event table format:
@@ -730,9 +750,15 @@ function on_resume()
end end
``` ```
The `new_key` will be present in the table even after the AIO Launcher has been restrated. The `new_key` will be present in the table even after the AIO Launcher has been restarted.
The `show_dialog()` method automatically creates a window of current settings from fields defined in prefs. The window will display all fields with a text key and a value of one of three types: string, number, or boolean. All other fields of different types will be omittedi. Fields whose names start with an underscore will also be omitted. Script will be reloaded on settings save. The `show_dialog()` method automatically creates a window of current settings from fields defined in prefs. The window will display all fields with a text key and a value of one of three types: string, number, or boolean. All other fields of different types will be omitted. Fields whose names start with an underscore will also be omitted. Script will be reloaded on settings save.
Starting from version 5.5.2, you can change the order of fields in the dialog by simply specifying the order in `prefs._dialog_order`. For example:
```
prefs._dialog_order = "message,start_time,end_time"
```
## Animation and real time updates ## Animation and real time updates

View File

@@ -1,6 +1,6 @@
Starting with version 5.2.1, AIO Launcher includes an API that allows for displaying a more complex interface than what the high-level functions of the `ui` module allowed. For example, you can display text of any size, center it, move it up and down, display buttons on the left and right sides of the screen, draw icons of different sizes, and much more. Essentially, you can replicate the appearance of any built-in AIO widget. Starting with version 5.2.1, AIO Launcher includes an API that allows for displaying a more complex interface than what the high-level functions of the `ui` module allowed. For example, you can display text of any size, center it, move it up and down, display buttons on the left and right sides of the screen, draw icons of different sizes, and much more. Essentially, you can replicate the appearance of any built-in AIO widget.
Open the example [samples/rich-gui-basic-sample.lua] and study it. As you can see, the new API consists of just one function `gui`, which takes a table describing the UI as input and returns an object that has a `render()` method for drawing this UI. Open the example [rich-gui-basic-sample.lua](samples/rich-gui-basic-sample.lua) and study it. As you can see, the new API consists of just one function `gui`, which takes a table describing the UI as input and returns an object that has a `render()` method for drawing this UI.
The UI is built line by line, using commands that add elements from left to right, with the possibility of moving to a new line. The provided example displays two lines, under which are two buttons: The UI is built line by line, using commands that add elements from left to right, with the possibility of moving to a new line. The provided example displays two lines, under which are two buttons: