hideWhen()
L'inverse de showWhen() : masque un élément tant qu'une case à cocher est cochée, ou tant qu'une option est choisie. Il s'affiche donc tant que la case n'est pas cochée, ou tant qu'une autre option est choisie.
Signature
hideWhen(checkBoxId: number): DialogComponent
hideWhen(radioGroupId: number, optionId: number): DialogComponent
Renvoie
Le même élément, ce qui permet de chaîner les appels
Exemple
Dialog:add(CheckBox(1, "Use the default Attack position", true))
-- Only asked when the box is not ticked
Dialog:add(TapPicker(2, "Tap the Attack button"):hideWhen(1))
Dans l'éditeur de blocs, cela correspond à show when avec not checked ou not option id.