diff options
author | Dennis Kobert <d-kobert@web.de> | 2019-06-12 21:51:39 +0200 |
---|---|---|
committer | Dennis Kobert <d-kobert@web.de> | 2019-06-12 21:51:39 +0200 |
commit | 9e9c1c822a64c0a65033b7eed07ea661a385cecc (patch) | |
tree | ee699d4e93bb4204f5f4e04cd14f6d77365b81b4 /WebInterface/NodeJSServer/src/js/modules/ui/uiManager.js | |
parent | 304437b834e8c87687f68333ae67a13ee1377a73 (diff) | |
parent | 3a3d0fc3d4733f8908e23a03f860d76340479ec4 (diff) |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'WebInterface/NodeJSServer/src/js/modules/ui/uiManager.js')
-rw-r--r-- | WebInterface/NodeJSServer/src/js/modules/ui/uiManager.js | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/WebInterface/NodeJSServer/src/js/modules/ui/uiManager.js b/WebInterface/NodeJSServer/src/js/modules/ui/uiManager.js deleted file mode 100644 index ddbb152..0000000 --- a/WebInterface/NodeJSServer/src/js/modules/ui/uiManager.js +++ /dev/null @@ -1,60 +0,0 @@ -import About from './collections/about'; -import Login from './collections/login'; -import Play from './collections/play'; - -/** - * Controller class for Page UI - */ -export default class UIManager { - /** - * Initializes new UI Manager - * @param {Interface} iface Interface for inter-object communication - */ - constructor(iface) { - this.currentUI = null; - - iface.addObject(this, 'uiMananger', ['initAbout', 'initLogin', 'initPlay']); - this.iface = iface; - } - - /** - * Initializes UI Components of About Page - */ - initAbout() { - this.clearComponents(); - this.about = new About(this.iface); - this.currentUI = 'about'; - } - - /** - * Initializes UI Components of Login page - */ - initLogin() { - this.clearComponents(); - this.login = new Login(this.iface); - this.currentUI = 'login'; - } - - /** - * Initializes UI Components of Play page - */ - initPlay() { - this.clearComponents(); - this.play = new Play(this.iface); - this.currentUI = 'play'; - } - - /** - * Clears currently loaded components - */ - clearComponents() { - switch (this.currentUI) { - case null: return; - case 'about': this.about = null; break; - case 'login': this.login = null; break; - case 'play': this.play = null; break; - } - - this.currentUI = null; - } -} |