Development #37
@@ -77,12 +77,17 @@ public SliderButton(MdgaApp app, Node node, String label) {
|
|||||||
QuadBackgroundComponent background = new QuadBackgroundComponent(BUTTON_NORMAL);
|
QuadBackgroundComponent background = new QuadBackgroundComponent(BUTTON_NORMAL);
|
||||||
slider.setBackground(background);
|
slider.setBackground(background);
|
||||||
|
|
||||||
|
// Set label background
|
||||||
|
QuadBackgroundComponent labelBackground = new QuadBackgroundComponent(BUTTON_NORMAL);
|
||||||
|
this.label.setBackground(labelBackground);
|
||||||
|
|
||||||
// Configure the label font
|
// Configure the label font
|
||||||
this.label.setFont(font);
|
this.label.setFont(font);
|
||||||
|
this.label.setTextHAlignment(HAlignment.Center);
|
||||||
|
|
||||||
// Default position and size
|
// Default position and size
|
||||||
pos = new Vector2f(0, 0);
|
pos = new Vector2f(0, 0);
|
||||||
size = new Vector2f(5.5f, 1);
|
size = new Vector2f(6f, 1);
|
||||||
|
|
||||||
// Add label and slider to container
|
// Add label and slider to container
|
||||||
container.addChild(this.label);
|
container.addChild(this.label);
|
||||||
|
|||||||
Reference in New Issue
Block a user