You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.9 KiB
66 lines
1.9 KiB
package wow.doge.mygame.launcher
|
|
|
|
import scalafx.geometry.Insets
|
|
import scalafx.geometry.Orientation
|
|
import scalafx.geometry.Pos
|
|
import scalafx.scene.Scene
|
|
import scalafx.scene.control.Button
|
|
import scalafx.scene.effect.DropShadow
|
|
import scalafx.scene.layout.FlowPane
|
|
import scalafx.scene.layout.HBox
|
|
import scalafx.scene.layout.VBox
|
|
import scalafx.scene.paint.Color._
|
|
import scalafx.scene.paint._
|
|
import scalafx.scene.text.Text
|
|
|
|
object DefaultUI {
|
|
def scene(
|
|
// stage: Stage,
|
|
launchButton: Button,
|
|
exitButton: Button
|
|
) =
|
|
new Scene {
|
|
fill = Color.rgb(38, 38, 38)
|
|
content = new VBox {
|
|
children = Seq(
|
|
new HBox {
|
|
padding = Insets(50, 80, 50, 80)
|
|
children = Seq(
|
|
new Text {
|
|
text = "JMonkeyEngine"
|
|
style = "-fx-font: normal bold 50pt sans-serif"
|
|
fill = new LinearGradient(endX = 0, stops = Stops(Red, DarkRed))
|
|
},
|
|
new Text {
|
|
text = " Game"
|
|
style = "-fx-font: italic bold 50pt sans-serif"
|
|
fill = new LinearGradient(
|
|
endX = 0,
|
|
stops = Stops(White, DarkGray)
|
|
)
|
|
effect = new DropShadow {
|
|
color = DarkGray
|
|
radius = 15
|
|
spread = 0.25
|
|
}
|
|
}
|
|
)
|
|
},
|
|
new FlowPane {
|
|
hgap = 10
|
|
padding = Insets(50, 80, 50, 80)
|
|
orientation = Orientation.Horizontal
|
|
alignment = Pos.Center
|
|
children = Seq(launchButton, exitButton)
|
|
}
|
|
)
|
|
}
|
|
// onMousePressed = (pressEvent) => {
|
|
// onMouseDragged = (dragEvent) => {
|
|
// stage.setX(dragEvent.getScreenX() - pressEvent.getSceneX())
|
|
// stage.setY(dragEvent.getScreenY() - pressEvent.getSceneY())
|
|
// }
|
|
// }
|
|
}
|
|
|
|
}
|