Skip to content

resumePauseButton

resumePauseButton answers a dialogue the server has paused on. The answer names which component was pressed.

resumePauseButton(target: ComponentId): void
src/integrating-entry.ts2
const Continue = (): Component => {
const pressed = useRef();
return (
<layer x={0} y="bottom" w="fill" h={20}>
<rect ref={pressed} w={0} h={0} hide />
<text w="fill" h="fill" text="Click here to continue" font={Fonts.PLAIN}
align="center" valign="middle" shadow color={0x0000ff}
options={['Continue']} onOptionSelect={() => { resumePauseButton(pressed); }} />
</layer>
);
};
  • target: Anything that names a component — a ref, a ComponentId parameter, or event.self. What the server is told was pressed.

Nothing.

  • The answer is a component, not a number. Give each choice a component of its own to name — here a hidden, sizeless rect.
  • A sizeless hidden rect is allowed as the target.
src/integrating-entry.ts2
options={['Continue']} onOptionSelect={() => { resumePauseButton(pressed); }} />

The server has to be paused on this interface, waiting for an answer; nothing else listens for one. And check the option exists — an onOptionSelect with no options never fires.