hideWhen()
Das Gegenteil von showWhen(): blendet ein Element aus, solange ein Kontrollkästchen angekreuzt ist oder solange eine Option gewählt ist. Es wird also angezeigt, solange das Kontrollkästchen nicht angekreuzt ist oder eine andere Option gewählt ist.
Signatur
hideWhen(checkBoxId: number): DialogComponent
hideWhen(radioGroupId: number, optionId: number): DialogComponent
Rückgabe
Dasselbe Element, sodass Aufrufe verkettet werden können
Beispiel
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))
Im Block-Editor ist das show when mit not checked oder not option id.