Commit 1a589cfe authored by David's avatar David
Browse files

Start of the multi use thing.

Making a software streamdeck, I think
parent 6730a27c
Pipeline #711 failed with stage
in 10 seconds
......@@ -50,10 +50,6 @@ fun org.hidetake.groovy.ssh.session.SessionHandler.put(from: Any, into: Any) =
repositories {
mavenCentral()
//TODO: need to drop jcenter...
jcenter()
maven { url = uri("https://dl.bintray.com/jerady/maven") }
maven { url = uri("http://dl.bintray.com/jetbrains/spek") }
maven { url = uri("https://jitpack.io") }
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") }
// maven { url = uri("") }
......
......@@ -6,6 +6,10 @@ import tornadofx.*
class Styles : Stylesheet() {
companion object {
val tabHeaderBackground by cssclass()
val scrollPane by cssclass()
val darkness by cssclass()
val redIcon by cssclass()
val insideEnv by cssclass()
......@@ -75,6 +79,9 @@ class Styles : Stylesheet() {
}
}
tabHeaderBackground {
backgroundColor += bg
}
//TODO: scope this within Jira plz
redIcon {
......@@ -82,4 +89,4 @@ class Styles : Stylesheet() {
iconSize.value = 50.0
}
}
}
\ No newline at end of file
}
package `is`.kow.deskscreen.multitabs
import javafx.geometry.Pos
import javafx.scene.control.ProgressBar
import javafx.scene.layout.Priority
import tornadofx.*
class MultiLoadingView: View() {
override val root = hbox {
vgrow = Priority.ALWAYS
hgrow = Priority.ALWAYS
alignment = Pos.CENTER
progressindicator {
progress = ProgressBar.INDETERMINATE_PROGRESS
}
}
}
package `is`.kow.deskscreen.multitabs
import `is`.kow.deskscreen.wx.LoadingView
import javafx.scene.control.ScrollPane
import javafx.scene.layout.Background
import javafx.scene.layout.BackgroundFill
import tornadofx.*
class MultiTabControlBarView: View() {
private val defaultView: MultiLoadingView by inject()
override val root = hbox {
button("OBS") {
//TODO: put the OBS graphic in here
}
}
}
package `is`.kow.deskscreen.multitabs
import tornadofx.*
class MultiTabDisplayView: View() {
private val multiViewController: MultiViewController by inject()
private val multiTabControlView by inject<MultiTabControlBarView>()
private val multiLoadingView by inject<MultiLoadingView>()
override val root = borderpane {
multiViewController.setStartingView(multiLoadingView)
top = multiTabControlView.root
center = multiLoadingView.root
}
}
package `is`.kow.deskscreen.multitabs
import tornadofx.*
import java.util.concurrent.atomic.AtomicReference
class MultiViewController: Controller() {
private val currentView = AtomicReference<View>()
fun setStartingView(view: View) {
currentView.set(view)
}
fun setCurrentView(view: View) {
currentView.getAndSet(view).replaceWith(view)
}
}
package `is`.kow.deskscreen.multitabs.obscontrol
import tornadofx.*
class OBSControlView : View() {
override val root = borderpane {
center = vbox {
button("scene 1")
button("scene 2")
}
}
}
......@@ -5,10 +5,9 @@ import `is`.kow.deskscreen.TransitionsController
import `is`.kow.deskscreen.cat.CatView
import `is`.kow.deskscreen.clrecruiting.RecruitingView
import `is`.kow.deskscreen.jira.JiraView
import `is`.kow.deskscreen.multitabs.MultiTabDisplayView
import `is`.kow.deskscreen.ticker.TickerView
import `is`.kow.deskscreen.wx.weathergov.WeatherGovWidgetView
import javafx.geometry.Pos
import javafx.scene.layout.Priority
import mu.KotlinLogging
import tornadofx.*
......@@ -22,38 +21,41 @@ class DefaultView : View() {
private val catView: CatView by inject()
private val recruitingView: RecruitingView by inject()
private val displayController: DisplayController by inject()
private val controlDisplayView by inject<MultiTabDisplayView>()
private val transitionsController: TransitionsController by inject()
override val root =
borderpane {
//Name plate goes at the toppest
top = namePlateView.root
//top = multiTabControlView.root
center = vbox {
this.add(controlDisplayView.root)
//TODO: cat view
//this.add(jiraView.root)
//Cat view not ready yet! Time to build a stupid simple corelogic recruiting view
//this.add(catView.root)
alignment = Pos.CENTER
alignment = Pos.TOP_LEFT
//this.add(recruitingView.root)
}
bottom = tickerView.root
right = vbox {
vgrow = Priority.ALWAYS
alignment = Pos.BOTTOM_RIGHT
vbox {
vgrow = Priority.ALWAYS
alignment = Pos.TOP_RIGHT
this.add(find<WeatherGovWidgetView>().root)
style {
paddingTop = 6.0
paddingBottom = 6.0
paddingRight = 3.0
}
}
}
//May also drop the weather view, because it's not reliable, until I rewrite it
// right = vbox {
// vgrow = Priority.ALWAYS
// alignment = Pos.BOTTOM_RIGHT
// vbox {
// vgrow = Priority.ALWAYS
// alignment = Pos.TOP_RIGHT
// this.add(find<WeatherGovWidgetView>().root)
// style {
// paddingTop = 6.0
// paddingBottom = 6.0
// paddingRight = 3.0
// }
// }
// }
//Is this not an event handler?
longpress {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment