mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-09-13 20:42:53 +02:00
Tests bis T075 überarbeitet
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
// Styling of Lemur components
|
||||
// For documentation, see
|
||||
// For documentation, see:
|
||||
// https://github.com/jMonkeyEngine-Contributions/Lemur/wiki/Styling
|
||||
|
||||
import com.simsilica.lemur.*
|
||||
import com.simsilica.lemur.component.QuadBackgroundComponent
|
||||
import com.simsilica.lemur.Button
|
||||
import com.simsilica.lemur.Button.ButtonAction
|
||||
import com.simsilica.lemur.Command
|
||||
@@ -11,19 +12,17 @@ import com.simsilica.lemur.component.QuadBackgroundComponent
|
||||
import com.simsilica.lemur.component.TbtQuadBackgroundComponent
|
||||
|
||||
def bgColor = color(1, 1, 1, 1)
|
||||
def buttonEnabledColor = color(0.8, 0.9, 1, 1)
|
||||
def buttonEnabledColor = color(0, 0, 0, 1)
|
||||
def buttonDisabledColor = color(0.8, 0.9, 1, 0.2)
|
||||
//def buttonBgColor = color(0, 0.75, 0.75, 1)
|
||||
def buttonBgColor = color(1, 1, 1, 1)
|
||||
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 tabbuttonEnabledColor = color(0.4, 0.45, 0.5, 1)
|
||||
def solidWhiteBackground = new QuadBackgroundComponent(color(1, 1, 1, 1)) // Solid white
|
||||
def greyBackground = color(0.8, 0.8, 0.8, 1) // Grey background color
|
||||
def redBorderColor = color(1, 0, 0, 1) // Red border color
|
||||
|
||||
def playButtonBorderColor = color(1, 0.6, 0, 1) // Orange border for "Spielen" button
|
||||
def playButtonTextColor = color(0, 0, 0, 1) // Black text color for "Spielen" button
|
||||
def buttonBgColor = color(1, 1, 1, 1) // White background for "Spiel beenden" and "Einstellungen" buttons
|
||||
def buttonTextColor = color(0, 0, 0, 1) // Black text color for "Spiel beenden" and "Einstellungen" buttons
|
||||
def borderColor = color(0, 0, 0, 1) // Black border for "Spiel beenden" and "Einstellungen"
|
||||
|
||||
|
||||
def gradient = TbtQuadBackgroundComponent.create(
|
||||
@@ -34,7 +33,14 @@ def gradient = TbtQuadBackgroundComponent.create(
|
||||
|
||||
def doubleGradient = new QuadBackgroundComponent(gradientColor)
|
||||
doubleGradient.texture = texture(name: "/com/simsilica/lemur/icons/double-gradient-128.png",
|
||||
generateMips: false)
|
||||
generateMips: false)
|
||||
|
||||
def orangeBorder = TbtQuadBackgroundComponent.create(
|
||||
texture(name: "/com/simsilica/lemur/icons/bordered-gradient.png", // Replace with an appropriate texture if needed
|
||||
generateMips: false),
|
||||
1, 1, 1, 126, 126,
|
||||
1f, false)
|
||||
orangeBorder.color = color(1, 0.5, 0, 1) // Orange color
|
||||
|
||||
selector("pp") {
|
||||
font = font("Interface/Fonts/Metropolis/Metropolis-Regular-32.fnt")
|
||||
@@ -53,33 +59,31 @@ selector("header", "pp") {
|
||||
}
|
||||
|
||||
selector("container", "pp") {
|
||||
background = gradient.clone()
|
||||
background = solidWhiteBackground.clone()
|
||||
background.setColor(bgColor)
|
||||
}
|
||||
|
||||
selector("toolbar") {
|
||||
// Set the grey background
|
||||
background = new QuadBackgroundComponent(greyBackground)
|
||||
|
||||
// Add a red border using a TbtQuadBackgroundComponent
|
||||
def redBorder = TbtQuadBackgroundComponent.create(
|
||||
texture(name: "/com/simsilica/lemur/icons/bordered-gradient.png",
|
||||
generateMips: false),
|
||||
1, 1, 1, 1, 1,
|
||||
1f, false)
|
||||
redBorder.color = redBorderColor
|
||||
background = greyBackground
|
||||
|
||||
// Optional: Set padding inside the toolbar
|
||||
insets = new Insets3f(10, 10, 10, 10)
|
||||
}
|
||||
selector("slider", "pp") {
|
||||
background = gradient.clone()
|
||||
background.setColor(bgColor)
|
||||
}
|
||||
|
||||
selector("play-button", "pp") {
|
||||
color = playButtonTextColor // Black text color
|
||||
background = new QuadBackgroundComponent(playButtonBorderColor) // Orange border background
|
||||
insets = new Insets3f(15, 25, 15, 25) // Padding for larger button size
|
||||
background.setMargin(5, 5) // Thin border effect around the background color
|
||||
fontSize = 36 // Larger font size for prominence
|
||||
}
|
||||
|
||||
selector("menu-button", "pp") {
|
||||
color = buttonTextColor // Black text color
|
||||
background = new QuadBackgroundComponent(buttonBgColor) // White background
|
||||
insets = new Insets3f(10, 20, 10, 20) // Padding
|
||||
background.setMargin(1, 1) // Thin black border
|
||||
background.setColor(borderColor) // Set black border color
|
||||
|
||||
fontSize = 24 // Standard font size
|
||||
}
|
||||
|
||||
def pressedCommand = new Command<Button>() {
|
||||
void execute(Button source) {
|
||||
if (source.isPressed())
|
||||
@@ -140,7 +144,7 @@ selector("title", "pp") {
|
||||
shadowOffset = vec3(2, -2, -1)
|
||||
background = new QuadBackgroundComponent(color(0.5, 0.75, 0.85, 1))
|
||||
background.texture = texture(name: "/com/simsilica/lemur/icons/double-gradient-128.png",
|
||||
generateMips: false)
|
||||
generateMips: false)
|
||||
insets = new Insets3f(2, 2, 2, 2)
|
||||
|
||||
buttonCommands = stdButtonCommands
|
||||
@@ -148,11 +152,14 @@ selector("title", "pp") {
|
||||
|
||||
|
||||
selector("button", "pp") {
|
||||
background = gradient.clone()
|
||||
color = buttonEnabledColor
|
||||
background.setColor(buttonBgColor)
|
||||
insets = new Insets3f(2, 2, 2, 2)
|
||||
def outerBackground = new QuadBackgroundComponent(color(1, 0.5, 0, 1)) // Orange border
|
||||
def innerBackground = new QuadBackgroundComponent(buttonBgColor) // Inner button background
|
||||
|
||||
// Apply the outer border as the main background
|
||||
background = outerBackground
|
||||
|
||||
// Use insets to create a margin/padding effect for the inner background
|
||||
insets = new Insets3f(3, 3, 3, 3) // Adjust the border thickness
|
||||
buttonCommands = stdButtonCommands
|
||||
}
|
||||
|
||||
@@ -201,6 +208,7 @@ selector("slider.down.button", "pp") {
|
||||
|
||||
selector("checkbox", "pp") {
|
||||
color = buttonEnabledColor
|
||||
fontSize = 20
|
||||
}
|
||||
|
||||
selector("rollup", "pp") {
|
||||
@@ -217,10 +225,14 @@ selector("tabbedPanel.container", "pp") {
|
||||
}
|
||||
|
||||
selector("tab.button", "pp") {
|
||||
background = gradient.clone()
|
||||
background = solidWhiteBackground.clone()
|
||||
background.setColor(bgColor)
|
||||
color = tabbuttonEnabledColor
|
||||
insets = new Insets3f(4, 2, 0, 2)
|
||||
|
||||
buttonCommands = stdButtonCommands
|
||||
}
|
||||
selector("settings-title", "pp") {
|
||||
fontSize = 48 // Set font size
|
||||
background = new QuadBackgroundComponent(color(0.4157f, 0.4235f, 0.4392f, 1.0f)) // Grey background
|
||||
}
|
Reference in New Issue
Block a user