1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
def autoDrinkCheckBox = CheckBox{
font: Font.font("Trebucher MS", FontWeight.BOLD, 10);
text: ##"Auto drink at 2m";
// Y a pas!
//textFill: Color.WHITE;
}
// Marche pas et la propriété foreground n'est pas supportée.
// textFill n'a aucun effet.
// fill change le font de la case à cocher.
autoDrinkCheckBox.style="textFill: #FFFFFF; foreground: #FFFFFF;";
def volumeLabel = Label {
font: Font.font("Trebucher MS", FontWeight.BOLD, 10);
textFill: Color.WHITE;
text: ##"Volume";
}
def volumeSlider = Slider {
min:0, max: 2.0;
value: bind player.volume with inverse;
width: 30;
}
def panel = Panel {
content: Stack {
nodeVPos: VPos.CENTER;
content : [
background,
VBox {
spacing: 3;
vpos: VPos.CENTER;
nodeHPos: HPos.CENTER;
content: [
autoDrinkCheckBox,
HBox {
spacing: 3;
content: [volumeLabel, volumeSlider]
}
]
}
]
}
translateX: shadow.localToScene(shadow.boundsInLocal).minX;
translateY: shadow.localToScene(shadow.boundsInLocal).minY;
} |
Partager