en:yaml:imagemaps
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| en:yaml:imagemaps [2026/05/18 21:59] – Ajout documentation image maps v4.11 cyrilfiesta | en:yaml:imagemaps [2026/07/15 01:41] (Version actuelle) – maj 4.13 : modes d'interface + corrections cyrilfiesta | ||
|---|---|---|---|
| Ligne 59: | Ligne 59: | ||
| * '' | * '' | ||
| * '' | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| ===== Related events ===== | ===== Related events ===== | ||
| Ligne 80: | Ligne 83: | ||
| </ | </ | ||
| - | Usual fields | + | Related events keep their usual fields: '' |
| - | ===== once: zone ===== | + | ===== Zone state ===== |
| - | '' | + | The state is checked both when the map is displayed and when a click is received. |
| + | |||
| + | ^ Value ^ Effect ^ | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | |||
| + | A zone may contain several '' | ||
| + | |||
| + | <code yaml> | ||
| + | zones: | ||
| + | scene: | ||
| + | colors: | ||
| + | - color: "# | ||
| + | click: find_key | ||
| + | highlight: true | ||
| + | if: | ||
| + | - if: " | ||
| + | state: disabled | ||
| + | display-color: | ||
| + | display-mode: | ||
| + | </ | ||
| + | |||
| + | A decorative zone may use '' | ||
| + | |||
| + | ===== once: zone / once: zone-room ===== | ||
| + | |||
| + | When the same mask color contains several separated zones, each component can be triggered individually: | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| <code yaml> | <code yaml> | ||
| events: | events: | ||
| - id: touch_bottle | - id: touch_bottle | ||
| - | once: zone | + | once: zone-room |
| text: "You inspect an empty bottle." | text: "You inspect an empty bottle." | ||
| do: " | do: " | ||
| </ | </ | ||
| + | |||
| + | ===== once: color / once: color-room ===== | ||
| + | |||
| + | These values group every separate mask area that uses the same color: | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | <code yaml> | ||
| + | events: | ||
| + | - id: touch_bottles | ||
| + | once: color | ||
| + | text: "Every bottle bears the same symbol." | ||
| + | </ | ||
| + | |||
| + | Use '' | ||
| + | |||
| + | ===== after-click: | ||
| + | |||
| + | On a zone whose click event uses one of the '' | ||
| + | |||
| + | ^ Value ^ Effect ^ | ||
| + | | '' | ||
| + | | '' | ||
| + | | ''"# | ||
| + | |||
| + | The optional '' | ||
| + | |||
| + | <code yaml> | ||
| + | zones: | ||
| + | scene: | ||
| + | colors: | ||
| + | - color: "# | ||
| + | click: touch_bottle | ||
| + | highlight: true | ||
| + | outline: true | ||
| + | after-click: | ||
| + | after-mode: fill | ||
| + | </ | ||
| + | |||
| + | With the '' | ||
| ===== Inside a HUD ===== | ===== Inside a HUD ===== | ||
| Ligne 111: | Ligne 185: | ||
| * Use a PNG mask with clean flat colors, no lossy compression. | * Use a PNG mask with clean flat colors, no lossy compression. | ||
| * Avoid colors that are too close to each other in the mask. | * Avoid colors that are too close to each other in the mask. | ||
| - | * Keep one zone per color when possible; use '' | + | * Keep one zone per color when possible; use '' |
| * Keep a classic choice as fallback if navigation depends entirely on point & click. | * Keep a classic choice as fallback if navigation depends entirely on point & click. | ||
| See also: [[en: | See also: [[en: | ||
en/yaml/imagemaps.1779134393.txt.gz · Dernière modification : de cyrilfiesta
