Skip to content

Commit

Permalink
more tables than sections
Browse files Browse the repository at this point in the history
  • Loading branch information
devleaks committed Jul 8, 2024
1 parent 1f78cc1 commit 7d13ca5
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 51 deletions.
22 changes: 11 additions & 11 deletions docs/Button.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ The button *Representation* page describes attributes specific to the *feedback*

# Common Button Attributes

| Attribute | Definition |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| index | **Mandatory**. There is no default value.<br><br>Each «Button» on a deck is designated by its [[Button Index\|Index]].<br><br>On a given Page, the Index of a button must be unique on that Page since it addresses a very precise key, knob or slider on the deck.<br><br>Depending on the model of deck, buttons have [[Button Index\|coded named index]].<br><br>On a simple deck with a number of similar keys, the index of a button is its ordering number: 0, 1, 2... until the number of keys is reached. On a more complex deck, with button and knobs, knobs may be indexed with name like knob0, knob1, knob2... until the number of knobs is reached.<br> |
| name | Optional. A button can be named.<br><br>The name of a button on a page must be unique. If more than one button have the same name, an error is reported and the definition of the button is ignored.<br><br>If no name is provided, a unique, long, technical name is created from deck name, page name, and index.<br><br>```yaml<br> index: e3<br> name: Baro Setting<br>```<br> |
| type | **Mandatory**.<br><br>The type of a button defines what the button will do and how it will be used.<br><br>The [[Button Activation\|button activation]] describe button-type specific attributes. In other words, depending on the value of the type attribute, other button defining attributes will be expected.<br><br>For example, if the value of a button type is `page` to change a page on a deck, it is expected to find the attribute named `page` which contains the name of the page to switch to when pressed:<br><br>```yaml<br> type: page<br> page: another-page<br>```<br> |
| label | The label of a button is a short reminder of what the button does. The text of the label is laid over the button image if any. The labelling of a button uses the following attributes:<br><br>```yaml<br> label: SHORT TITLE<br> label-color: white<br> label-size: 24<br> label-font: Seven Segment.ttf<br> label-position: ct<br>```<br><br>Note: The Button *Label* should not be confused with Button Text. The Label exist for all buttons, and is displayed according to its attributes if the underlying button is capable. The text of the label is defined as a button attribute and is static (cannot be changed dynamically).<br><br>The Button *Text* is a text that is part of the Button representation. |
| label-color | See [[Resources#Colors\|Colors]]. |
| label-font | See [[Resources#Fonts\|Fonts]]. |
| label-size | In pixels. Internally, Cockpitdecks uses 256 × 256 pixel images. |
| label-position | The position of the label is a 2 letter code:<br><br>1. l, c, or r for left, center, or right-justified on the image (horizontal alignment),<br>2. t, m, or b, for top, middle, or bottom of the image (vertical alignment). |
| options | Regularly, buttons have additional parameters.<br><br>The button options parameter is a string of comma separated options. An option is either a simple string or word, or a name=value string.<br><br>```yaml<br> options: 3dot,appearance=metal,mode=open,level=6<br>```<br><br>Options are, by nature, not indispensable to the button’s activation or rendering but rather add to it to alter behaviour or appearance. |
| Attribute | Definition |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| index | **Mandatory**. There is no default value.<br><br>Each «Button» on a deck is designated by its [[Button Index\|Index]].<br><br>On a given Page, the Index of a button must be unique on that Page since it addresses a very precise key, knob or slider on the deck.<br><br>Depending on the model of deck, buttons have [[Button Index\|coded named index]].<br><br>On a simple deck with a number of similar keys, the index of a button is its ordering number: 0, 1, 2... until the number of keys is reached. On a more complex deck, with button and knobs, knobs may be indexed with name like knob0, knob1, knob2... until the number of knobs is reached.<br> |
| name | Optional. A button can be named.<br><br>The name of a button on a page must be unique. If more than one button have the same name, an error is reported and the definition of the button is ignored.<br><br>If no name is provided, a unique, long, technical name is created from deck name, page name, and index. |
| type | **Mandatory**.<br><br>The type of a button defines what the button will do and how it will be used.<br><br>The [[Button Activation\|button activation]] describe button-type specific attributes. In other words, depending on the value of the type attribute, other button defining attributes will be expected.<br><br>For example, if the value of a button type is `page` to change a page on a deck, it is expected to find the attribute named `page` which contains the name of the page to switch to when pressed. |
| label | The label of a button is a short reminder of what the button does. The text of the label is laid over the button image if any. The labelling of a button uses the following attributes:<br><br>Note: The Button *Label* should not be confused with Button Text. The Label exist for all buttons, and is displayed according to its attributes if the underlying button is capable. The text of the label is defined as a button attribute and is static (cannot be changed dynamically).<br><br>The Button *Text* is a text that is part of the Button representation. |
| label-color | See [[Resources#Colors\|Colors]]. |
| label-font | See [[Resources#Fonts\|Fonts]]. |
| label-size | In pixels. Internally, Cockpitdecks uses 256 × 256 pixel images. |
| label-position | The position of the label is a 2 letter code:<br><br>1. l, c, or r for left, center, or right-justified on the image (horizontal alignment),<br>2. t, m, or b, for top, middle, or bottom of the image (vertical alignment). |
| options | Regularly, buttons have additional parameters.<br><br>The button options parameter is a string of comma separated options. An option is either a simple string or word, or a name=value string.<br><br>Options are, by nature, not indispensable to the button’s activation or rendering but rather add to it to alter behaviour or appearance. |

# Button Value

Expand Down
10 changes: 5 additions & 5 deletions docs/Button/Button Representation.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ Here is a list of currently available, general purpose representations.
## Drawn Representations
- [[Annunciator]]
- [[Switches]]
- [[Switches#Switch]]
- [[Switches#Circular Switch]]
- [[Switches#Push Button and Knob]]
- [[Drawn Buttons – Switches]]
- [[Drawn Buttons – Switches#Switch]]
- [[Drawn Buttons – Switches#Circular Switch]]
- [[Drawn Buttons – Switches#Push Button and Knob]]
- [[Drawn Buttons|Other drawn representations]]
- [[Drawn Buttons#Data]]
- [[Drawn Buttons#Decor]]
## More complex Button Representations
- [[Animation]]
- [[Animations]]
- [[Weather]]
- Other
- Aircraft
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Animations are automatic. They should not be confused with button appearance upd

Most of the time, the value button determine if the animation runs. When the value of the button is On, the animation runs. When Off, the animation does not run and may displays an alternate representation.

- [[Animation#IconAnimation]]
- [[Animations#IconAnimation]]
-

# IconAnimation
Expand Down
Loading

0 comments on commit 7d13ca5

Please sign in to comment.