Outils pour utilisateurs

Outils du site


en:yaml:drag-drop

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:drag-drop [2026/05/07 03:16] – Documentation interactions YAML cyrilfiestaen:yaml:drag-drop [2026/07/06 00:35] (Version actuelle) – maj 4.13 : modes d'interface + corrections cyrilfiesta
Ligne 5: Ligne 5:
 Drag & drop lets the player take an element from the text and drop it onto a target. It is available on web, desktop and interactive HTML exports. Other adapters display the content without drag&drop interaction. Drag & drop lets the player take an element from the text and drop it onto a target. It is available on web, desktop and interactive HTML exports. Other adapters display the content without drag&drop interaction.
  
-===== Sources And Targets =====+===== Sources and targets =====
  
 <code yaml> <code yaml>
Ligne 11: Ligne 11:
 </code> </code>
  
-  * ''{{label:>id}}'': source the player can drag. +  * %%{{label:>id}}%% : source the player can drag. 
-  * ''{{label:$id}}'': target that can receive a source. +  * %%{{label:$id}}%% : target that can receive a source. 
-  * ''{{label:>src_id:$tgt_id}}'': element that is both source and target. +  * %%{{label:>src_id:$tgt_id}}%% : element that is both source and target. 
-  * ''{{label:>id1;id2}}'': one label can carry several ids.+  * %%{{label:>id1;id2}}%% : one label can carry several ids.
  
 The syntax also works with pictures: The syntax also works with pictures:
Ligne 22: Ligne 22:
 </code> </code>
  
-===== Drop Event =====+===== Drop event =====
  
 An event becomes a drag&drop pair when it contains ''source:'' and ''target:''. An event becomes a drag&drop pair when it contains ''source:'' and ''target:''.
Ligne 29: Ligne 29:
 text: "The {{door:$door}} is locked. The {{key:>key}} shines on the floor." text: "The {{door:$door}} is locked. The {{key:>key}} shines on the floor."
 interaction-ko: "Nothing interesting happens here." interaction-ko: "Nothing interesting happens here."
- 
 events: events:
   - id: key_on_door   - id: key_on_door
Ligne 52: Ligne 51:
   * ''visible-if:'' false: the element becomes normal text and the drop is ignored.   * ''visible-if:'' false: the element becomes normal text and the drop is ignored.
   * ''disabled-if:'' true: the element is visible but inactive; a forced drop stays silent.   * ''disabled-if:'' true: the element is visible but inactive; a forced drop stays silent.
-  * ''once: true'' works like it does on other events.+  * ''once: true'' works like it does on other events: the interaction can only occur once per game. 
 +  * ''once: room'': the event resets each time the player re-enters the room (useful for repeatable per-visit interactions).
  
-===== Showing Roles =====+===== Showing roles =====
  
 By default, sources and targets use a neutral style. To show roles visually, enable ''show-type: true'' at scenario level or only in a room. By default, sources and targets use a neutral style. To show roles visually, enable ''show-type: true'' at scenario level or only in a room.
Ligne 69: Ligne 69:
 When a value is defined in a room, it overrides the global option for that room. When a value is defined in a room, it overrides the global option for that room.
  
-**Join us on [[https://discord.gg/Z63DtVV|discord Make&Play]]**+While dragging (or after a first tap on mobile), the interactive elements of the room are **highlighted** to show the possible targets. 
 + 
 +**Join us on [[https://discord.gg/Z63DtVV|Discord Make&Play]]**
  
en/yaml/drag-drop.1778116560.txt.gz · Dernière modification : de cyrilfiesta