From 7c3440529c5f51491eac682f137b627cb6b94164 Mon Sep 17 00:00:00 2001 From: Florrie Date: Tue, 15 Oct 2019 22:41:03 -0300 Subject: Rename paneLeft/paneRight to tabberPane/queuePane --- telnet-server.js | 2 +- ui.js | 60 ++++++++++++++++++++++++++++---------------------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/telnet-server.js b/telnet-server.js index b4422f5..b6db412 100644 --- a/telnet-server.js +++ b/telnet-server.js @@ -35,7 +35,7 @@ class TelnetServer extends EventEmitter { canControlQueuePlayers: false, canProcessMetadata: false, canSuspend: false, - showLeftPane: true, + showTabberPane: true, stopPlayingUponQuit: false, menubarColor: 2 } diff --git a/ui.js b/ui.js index 88b26af..24d0881 100644 --- a/ui.js +++ b/ui.js @@ -175,7 +175,7 @@ class AppElement extends FocusElement { canProcessMetadata: true, canSuspend: true, menubarColor: 4, // blue - showLeftPane: true, + showTabberPane: true, stopPlayingUponQuit: true }, config) @@ -194,34 +194,34 @@ class AppElement extends FocusElement { this.menubar.color = this.config.menubarColor - this.paneLeft = new Pane() - this.addChild(this.paneLeft) + this.tabberPane = new Pane() + this.addChild(this.tabberPane) - this.paneRight = new Pane() - this.addChild(this.paneRight) + this.queuePane = new Pane() + this.addChild(this.queuePane) - if (!this.config.showLeftPane) { - this.paneLeft.visible = false + if (!this.config.showTabberPane) { + this.tabberPane.visible = false } this.tabber = new Tabber() - this.paneLeft.addChild(this.tabber) + this.tabberPane.addChild(this.tabber) this.metadataStatusLabel = new Label() this.metadataStatusLabel.visible = false - this.paneLeft.addChild(this.metadataStatusLabel) + this.tabberPane.addChild(this.metadataStatusLabel) this.newGrouplikeListing() this.queueListingElement = new QueueListingElement(this) this.setupCommonGrouplikeListingEvents(this.queueListingElement) - this.paneRight.addChild(this.queueListingElement) + this.queuePane.addChild(this.queueListingElement) this.queueLengthLabel = new Label('') - this.paneRight.addChild(this.queueLengthLabel) + this.queuePane.addChild(this.queueLengthLabel) this.queueTimeLabel = new Label('') - this.paneRight.addChild(this.queueTimeLabel) + this.queuePane.addChild(this.queueTimeLabel) this.queueListingElement.on('open', item => this.openSpecialOrThroughSystem(item)) this.queueListingElement.on('queue', item => this.play(item)) @@ -563,7 +563,7 @@ class AppElement extends FocusElement { } selected() { - if (this.paneLeft.visible) { + if (this.tabberPane.visible) { this.root.select(this.tabber) } else { if (this.queueListingElement.selectable) { @@ -690,7 +690,7 @@ class AppElement extends FocusElement { } reveal(item) { - if (!this.paneLeft.visible) { + if (!this.tabberPane.visible) { return } @@ -871,7 +871,7 @@ class AppElement extends FocusElement { let items; if (listing.grouplike.isTheQueue && isTrack(item)) { items = [ - this.paneLeft.visible && {label: 'Reveal', action: () => this.reveal(item)}, + this.tabberPane.visible && {label: 'Reveal', action: () => this.reveal(item)}, {divider: true}, canControlQueue && {label: 'Play later', action: () => this.playLater(item)}, canControlQueue && {label: 'Play sooner', action: () => this.playSooner(item)}, @@ -1057,26 +1057,26 @@ class AppElement extends FocusElement { this.alignPartyLabel() } - if (this.paneLeft.visible) { - this.paneLeft.w = Math.max(Math.floor(0.8 * this.contentW), this.contentW - 80) - this.paneLeft.y = bottomY - this.paneLeft.h = topY - this.paneLeft.y - this.paneRight.x = this.paneLeft.right - this.paneRight.w = this.contentW - this.paneLeft.right + if (this.tabberPane.visible) { + this.tabberPane.w = Math.max(Math.floor(0.8 * this.contentW), this.contentW - 80) + this.tabberPane.y = bottomY + this.tabberPane.h = topY - this.tabberPane.y + this.queuePane.x = this.tabberPane.right + this.queuePane.w = this.contentW - this.tabberPane.right } else { - this.paneRight.x = 0 - this.paneRight.w = this.contentW + this.queuePane.x = 0 + this.queuePane.w = this.contentW } - this.paneRight.y = bottomY - this.paneRight.h = topY - this.paneRight.y - topY = this.paneRight.y + this.queuePane.y = bottomY + this.queuePane.h = topY - this.queuePane.y + topY = this.queuePane.y this.tabber.fillParent() if (this.metadataStatusLabel.visible) { this.tabber.h-- - this.metadataStatusLabel.y = this.paneLeft.contentH - 1 + this.metadataStatusLabel.y = this.tabberPane.contentH - 1 } this.tabber.fixLayout() @@ -1163,7 +1163,7 @@ class AppElement extends FocusElement { } } - if (input.isFocusTabber(keyBuf) && this.paneLeft.visible && this.tabber.selectable) { + if (input.isFocusTabber(keyBuf) && this.tabberPane.visible && this.tabber.selectable) { this.root.select(this.tabber) } else if (input.isFocusQueue(keyBuf) && this.queueListingElement.selectable) { this.root.select(this.queueListingElement) @@ -1392,8 +1392,8 @@ class AppElement extends FocusElement { this.queueLengthLabel.centerInParent() this.queueTimeLabel.centerInParent() - this.queueLengthLabel.y = this.paneRight.contentH - 2 - this.queueTimeLabel.y = this.paneRight.contentH - 1 + this.queueLengthLabel.y = this.queuePane.contentH - 2 + this.queueTimeLabel.y = this.queuePane.contentH - 1 } get SQP() { -- cgit 1.3.0-6-gf8a5