Skip to content

Commit

Permalink
Update documentation with animation related changes
Browse files Browse the repository at this point in the history
  • Loading branch information
llMBQll committed Jan 6, 2025
1 parent 5a5db78 commit eb3dd6d
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 27 deletions.
36 changes: 36 additions & 0 deletions docs/scripting_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,24 @@ All widgets have the following common attributes in addition to widget-specific
> > Specifies if the image should be animated. Unless set to `true`, event with supported image
> > formats, only a static image will be rendered.
>
> > `animation_ticks_delay`: `integer`
> >
> > _Optional_. Default: No value
> >
> > Overrides [global animation setting](settings.md#animation) for this widget. Applies only for
> > `animated` images.
> >
> > **Changing this value after initially setting it for a given widget is undefined behaviour.**
>
> > `animation_ticks_rate`: `integer`
> >
> > _Optional_. Default: No value
> >
> > Overrides [global animation setting](settings.md#animation) for this widget. Applies only for
> > `animated` images.
> >
> > **Changing this value after initially setting it for a given widget is undefined behaviour.**
>
> > `threshold`: `integer`
> >
> > _Optional_. Default: `128`
Expand All @@ -826,6 +844,24 @@ All widgets have the following common attributes in addition to widget-specific
> >
> > Specifies if the text should scroll if it is too long to fit within the widget's width.
>
> > `animation_ticks_delay`: `integer`
> >
> > _Optional_. Default: No value
> >
> > Overrides [global animation setting](settings.md#animation) for this widget. Applies only for
> > `scrolling` text.
> >
> > **Changing this value after initially setting it for a given widget is undefined behaviour.**
>
> > `animation_ticks_rate`: `integer`
> >
> > _Optional_. Default: No value
> >
> > Overrides [global animation setting](settings.md#animation) for this widget. Applies only for
> > `scrolling` text.
> >
> > **Changing this value after initially setting it for a given widget is undefined behaviour.**
>
> > `font_size`: `integer`
> >
> > _Optional_. Default: Calculated to fit within the widget's height.
Expand Down
57 changes: 30 additions & 27 deletions docs/settings.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,43 @@
# Settings

You can fine tune behaviour of the program using the [settings file](../config/settings.lua).
All the top-level properties described below are optional and will be set to default, should any of them be missing.
All the top-level properties described below are optional and will be set to default, should any of
them be missing.

## Available Settings

- [Animation](#animation)
- [Font](#font)
- [Log Level](#log-level)
- [Keyboard](#keyboard)
- [Text Scrolling](#text-scrolling)
- [Server Port](#server-port)
- [Update Interval](#update-interval-tick-duration)

> ### Animation
>
> Animation settings apply to scrolling text or animated images.
>
> > `animation_ticks_delay`: `integer`
> >
> > Number of [ticks](#update-interval-tick-duration) after which the animation will start to
> > advance.
> >
> > _Optional_. Default: `8`
>
> > `animation_ticks_rate`: `integer`
> >
> > Number of [ticks](#update-interval-tick-duration) between consecutive animation steps.
> >
> > _Optional_. Default: `2`
>
> > Example `settings.lua` that sets scroll delay and repeat delay.
> > ```lua
> > Settings {
> > animation_ticks_delay = 4,
> > animation_ticks_rate = 1,
> > }
> > ```
> ### Font
>
> > `font`: [`FontSelector`](scripting_reference.md#fontselector)
Expand Down Expand Up @@ -46,7 +72,7 @@ All the top-level properties described below are optional and will be set to def
> > Settings {
> > font = {
> > System = {
> > names = ['FiraMono', 'Monospace'],
> > names = {'FiraMono', 'Monospace'},
> > style = 'Normal',
> > weight = 'Bold',
> > stretch = 'Condensed',
Expand Down Expand Up @@ -93,29 +119,6 @@ All the top-level properties described below are optional and will be set to def
> > }
> > ```
> ### Text Scrolling
>
> > `text_ticks_scroll_delay`: `integer`
> >
> > Number of [ticks](#update-interval-tick-duration) after which text will start scrolling if it
> > does not fit the screen.
> >
> > _Optional_. Default: `8`
>
> > `text_ticks_repeat_delay`: `integer`
> >
> > Number of [ticks](#update-interval-tick-duration) between consecutive text scrolls.
> >
> > _Optional_. Default: `2`
>
> > Example `settings.lua` that sets scroll delay and repeat delay.
> > ```lua
> > Settings {
> > text_ticks_scroll_delay = 4,
> > text_ticks_repeat_delay = 1,
> > }
> > ```
> ### Server Port
>
> > `server_port`: `integer`
Expand All @@ -141,7 +144,7 @@ All the top-level properties described below are optional and will be set to def
> > ```
> ### Update interval (Tick Duration)
>
>
> > `update_interval`: `integer`
> >
> > This setting will define how ofter the server will process events and render updates on the
Expand Down

0 comments on commit eb3dd6d

Please sign in to comment.