본문으로 건너뛰기

hideWhen()

showWhen()의 반대입니다. 체크박스가 선택된 동안, 또는 옵션이 선택된 동안 항목을 숨깁니다. 따라서 체크박스가 선택되지 않았을 때, 또는 다른 옵션이 선택되었을 때 표시됩니다.

시그니처​

hideWhen(checkBoxId: number): DialogComponent
hideWhen(radioGroupId: number, optionId: number): DialogComponent

반환값

호출을 체이닝할 수 있도록 같은 항목을 반환합니다

예시​

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))

블록 편집기에서는 show when에서 not checked 또는 not option id를 선택한 것과 같습니다.