MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / revealScreen

Function revealScreen

src/engine/ui.ts:214–230  ·  view source on GitHub ↗
(engine: VisualNovelEngine, screen: string)

Source from the content-addressed store, hash-verified

212}
213
214function revealScreen (engine: VisualNovelEngine, screen: string): void {
215 hideScreens (engine);
216
217 const screenElement = engine.element ().find (`[data-screen="${screen}"]`).get (0) as Component | undefined;
218 screenElement?.setState ({
219 open: true
220 });
221
222 // If auto play or skip were enabled, disable them.
223 if (engine.global ('_auto_play_timer')) {
224 autoPlay (engine, false);
225 }
226
227 if (engine.global ('skip')) {
228 skip (engine, false);
229 }
230}
231
232export function hideScreens (engine: VisualNovelEngine): void {
233 const element = engine.element();

Callers 1

showScreenFunction · 0.85

Calls 6

hideScreensFunction · 0.85
autoPlayFunction · 0.85
skipFunction · 0.85
globalMethod · 0.80
getMethod · 0.65
elementMethod · 0.45

Tested by

no test coverage detected