SimpleHMI: Specifying the size of buttons and other items
This applies to (at time of writing) buttons and horizontal bar graphs.
The size of buttons can be specified as:
- A multiple of the default character width and height, need not be an integer.
- A decimal fraction of the screen width or height, for example 0.2 for one 5th.
In addition to being simple numbers, the width and height coordinates may also be specified in relative or proportional terms. The following table illustrates the possibilities.
| Format (example) | As a height specifier | As a width specifier |
|---|---|---|
5 | 5 character rows in height | 5 character rows in width |
0.25 | One quarter of (0.25 times) the screen height. Always calculated as a full number of rows, always rounded down, but forced to be at least 1. | One quarter of (0.25 times) the screen width. Always calculated as a full number of columns, always rounded down, but forced to be at least 1. |