Outils pour utilisateurs

Outils du site


en:yaml:hud

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
en:yaml:hud [2026/05/03 18:29] – Add English wiki page using real engine keys cyrilfiestaen:yaml:hud [2026/08/31 20:53] (Version actuelle) – Wiki : fins de pages homogènes, liens Discord retirés cyrilfiesta
Ligne 1: Ligne 1:
-**Language:** [[fr:yaml:hud|Français]] | **English**+**Language / Langue :** [[fr:yaml:hud|FR]] | **EN**
  
-====== HUD — Persistent Panels (YAML) ======+====== HUD Persistent Panels (YAML) ======
  
 HUD panels (''hud:'') display persistent information on the player screen: HP, score, mini-map, countdown, and so on. HUD panels (''hud:'') display persistent information on the player screen: HP, score, mini-map, countdown, and so on.
Ligne 15: Ligne 15:
  
 <code yaml> <code yaml>
-- idfight_room +rooms
-  hud: +  - idfight_room
-    position: top-right +
-    text+
-      HP: v_hp_v / v_hpmax_v +
-      Score: v_score_v +
- +
-events: +
-  - if: ~ +
-    do: "hp.-.3" +
-    button: "Lose 3 HP" +
-    text: "Ouch!"+
     hud:     hud:
       position: top-right       position: top-right
-      text: "HP: v_hp_v / v_hpmax_v"+      text: | 
 +        HP: v_hp_v / v_hpmax_v 
 +        Score: v_score_v 
 +    events: 
 +      - if: ~ 
 +        do: "hp.-.3" 
 +        button: "Lose 3 HP" 
 +        text: "Ouch!" 
 +        hud: 
 +          position: top-right 
 +          text: "HP: v_hp_v / v_hpmax_v"
 </code> </code>
  
-===== Size and Style =====+===== Size ===== 
 + 
 +''size:'' sets the height as a percentage of the game area. ''width:'' and ''height:'' give explicit percentages when you need full control. 
 + 
 +===== Style =====
  
 <code yaml> <code yaml>
Ligne 42: Ligne 46:
   text: "Styled HUD"   text: "Styled HUD"
 </code> </code>
- 
-Use ''width:'' and ''height:'' for explicit percentages. 
  
 ===== Conditional Text ===== ===== Conditional Text =====
Ligne 60: Ligne 62:
 ===== Split ===== ===== Split =====
  
-''[[split]]'' divides the panel into two zones.+''%%[[split]]%%'' divides the panel into two zones.
  
 <code yaml> <code yaml>
Ligne 73: Ligne 75:
     Score: v_score_v     Score: v_score_v
 </code> </code>
 +
 +===== Several panels at once =====
 +
 +<code yaml>
 +hud:
 +  - position: top-left
 +    text: "❤️ v_hp_v HP"
 +  - position: top-right
 +    text: "⭐ v_score_v pts"
 +  - position: bottom-right
 +    text: "📍 Area: v_area_v"
 +</code>
 +
  
 ===== Clear HUD ===== ===== Clear HUD =====
Ligne 81: Ligne 96:
   - top-right   - top-right
 </code> </code>
 +
 +===== Video inside a HUD =====
 +
 +The video syntax can be used inside the text of a panel:
 +
 +<code yaml>
 +hud:
 +  position: top
 +  text:
 +    - "((loop;muted:https://example.com/video.mp4))"
 +</code>
 +
 +A hosted video works here too. See [[en:yaml:medias|Sounds, images and videos]].
  
en/yaml/hud.1777825790.txt.gz · Dernière modification : de cyrilfiesta