Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/pregame/SplashscreenHandler.js
class SplashScreenHandler | class SplashScreenHandler | ||||
{ | { | ||||
constructor(initData, hotloadData) | constructor(initData, hotloadData) | ||||
{ | { | ||||
this.showSplashScreen = hotloadData ? hotloadData.showSplashScreen : initData && initData.isStartup; | this.showSplashScreen = hotloadData ? hotloadData.showSplashScreen && !hotloadData.incompatibleMods : initData && initData.isStartup && !initData.incompatibleMods; | ||||
if (this.showSplashScreen) | |||||
Silier: nah, early return :P | |||||
{ | |||||
this.mainMenuPage = Engine.GetGUIObjectByName("mainMenuPage"); | this.mainMenuPage = Engine.GetGUIObjectByName("mainMenuPage"); | ||||
this.mainMenuPage.onTick = this.onFirstTick.bind(this); | this.mainMenuPage.onTick = this.onFirstTick.bind(this); | ||||
} | } | ||||
} | |||||
getHotloadData() | getHotloadData() | ||||
{ | { | ||||
// Only show splash screen(s) once at startup, but not again after hotloading | // Only show splash screen(s) once at startup, but not again after hotloading | ||||
return { | return { | ||||
"showSplashScreen": this.showSplashScreen | "showSplashScreen": this.showSplashScreen | ||||
}; | }; | ||||
} | } | ||||
Show All 20 Lines |
Wildfire Games · Phabricator
nah, early return :P