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

Method init

src/components/quick-menu/index.ts:6–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4 static override tag = 'quick-menu';
5
6 static async init () {
7 const skipSpeed = this.engine.setting('Skip') as number;
8 const allowRollback = this.engine.setting('AllowRollback') as boolean;
9
10 // Remove the Skip text button if it has been disabled on the game settings
11 if (skipSpeed <= 0) {
12 this.removeButton('Skip');
13 }
14
15 // Remove the Back button if it has been disabled on the game settings
16 if (!allowRollback) {
17 this.removeButton('Back');
18 }
19 }
20
21 render () {
22 const buttons = (this.constructor as typeof QuickMenu).buttons ();

Callers

nothing calls this directly

Calls 2

settingMethod · 0.80
removeButtonMethod · 0.80

Tested by

no test coverage detected