mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-07-31 06:37:39 +02:00
Buttons im Startmenü angepasst
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// https://github.com/jMonkeyEngine-Contributions/Lemur/wiki/Styling
|
||||
|
||||
import com.simsilica.lemur.*
|
||||
import com.simsilica.lemur.component.QuadBackgroundComponent
|
||||
|
||||
// Farben und allgemeine Stile
|
||||
def bgColor = color(1, 1, 1, 1)
|
||||
@@ -10,14 +11,15 @@ def buttonEnabledColor = color(0.8, 0.9, 1, 1)
|
||||
def buttonDisabledColor = color(0.8, 0.9, 1, 0.2)
|
||||
def sliderColor = color(0.6, 0.8, 0.8, 1)
|
||||
def sliderBgColor = color(0.5, 0.75, 0.75, 1)
|
||||
def gradientColor = color(0.5, 0.75, 0.85, 0.5)
|
||||
def gradientColor = color(1, 1, 1, 1)
|
||||
def tabbuttonEnabledColor = color(0.4, 0.45, 0.5, 1)
|
||||
def playButtonBorderColor = color(1, 0.6, 0, 1) // For "Spielen" button
|
||||
def blackColor = color(0, 0, 0, 1) // Define black color for border
|
||||
|
||||
// Hintergrundverläufe
|
||||
def gradient = TbtQuadBackgroundComponent.create(
|
||||
texture(name: "/com/simsilica/lemur/icons/bordered-gradient.png", generateMips: false),
|
||||
1, 1, 1, 126, 126, 1f, false)
|
||||
1, 1, 1, 126, 126, 1f, false)
|
||||
|
||||
def doubleGradient = new QuadBackgroundComponent(gradientColor)
|
||||
doubleGradient.texture = texture(name: "/com/simsilica/lemur/icons/double-gradient-128.png", generateMips: false)
|
||||
@@ -77,6 +79,18 @@ selector("menu-button", "pp") {
|
||||
fontSize = 24
|
||||
}
|
||||
|
||||
// Apply border to all buttons in the "pp" style
|
||||
selector("button", "pp") {
|
||||
background = gradient.clone()
|
||||
background.setColor(bgColor) // Set background color
|
||||
background.setBorderColor(blackColor) // Set border color to black
|
||||
background.setBorderSize(2) // Set border thickness (adjust as needed)
|
||||
|
||||
color = buttonEnabledColor
|
||||
insets = new Insets3f(2, 2, 2, 2)
|
||||
buttonCommands = stdButtonCommands
|
||||
}
|
||||
|
||||
// Standard Button Commands (Animationseffekt)
|
||||
def pressedCommand = new Command<Button>() {
|
||||
void execute(Button source) {
|
||||
|
Reference in New Issue
Block a user