mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-08-04 01:50:37 +02:00
Toolbar-Design angepasst
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
// Styling of Lemur components
|
||||
// For documentation, see:
|
||||
// https://github.com/jMonkeyEngine-Contributions/Lemur/wiki/Styling
|
||||
|
||||
import com.jme3.math.ColorRGBA
|
||||
import com.simsilica.lemur.*
|
||||
import com.simsilica.lemur.component.QuadBackgroundComponent
|
||||
import com.simsilica.lemur.Button
|
||||
@@ -34,6 +36,7 @@ def gradient = TbtQuadBackgroundComponent.create(
|
||||
def doubleGradient = new QuadBackgroundComponent(gradientColor)
|
||||
doubleGradient.texture = texture(name: "/com/simsilica/lemur/icons/double-gradient-128.png",
|
||||
generateMips: false)
|
||||
//doubleGradient.color = color(0, 0, 0, 1)
|
||||
|
||||
def orangeBorder = TbtQuadBackgroundComponent.create(
|
||||
texture(name: "/com/simsilica/lemur/icons/border.png", // Replace with an appropriate texture if needed
|
||||
@@ -51,6 +54,21 @@ selector("label", "pp") {
|
||||
color = buttonEnabledColor
|
||||
}
|
||||
|
||||
selector("label-Bold", "pp") {
|
||||
insets = new Insets3f(2, 2, 2, 2)
|
||||
font = font("Interface/Fonts/Metropolis/Metropolis-Bold-32.fnt")
|
||||
fontSize = 30
|
||||
color = buttonEnabledColor
|
||||
textHAlignment = HAlignment.Center
|
||||
textVAlignment = VAlignment.Center
|
||||
|
||||
}
|
||||
selector("label-Text", "pp") {
|
||||
insets = new Insets3f(2, 2, 2, 2)
|
||||
fontSize = 25
|
||||
color = buttonEnabledColor
|
||||
}
|
||||
|
||||
selector("header", "pp") {
|
||||
font = font("Interface/Fonts/Metropolis/Metropolis-Bold-42.fnt")
|
||||
insets = new Insets3f(2, 2, 2, 2)
|
||||
@@ -65,20 +83,10 @@ selector("container", "pp") {
|
||||
}
|
||||
|
||||
selector("toolbar") {
|
||||
// Set the grey background
|
||||
background = new QuadBackgroundComponent(greyBackground)
|
||||
background = gradient.clone()
|
||||
background.setColor(bgColor)
|
||||
//color = (new ColorRGBA(0.4157f, 0.4235f, 0.4392f, 1.0f))
|
||||
|
||||
// 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()
|
||||
@@ -246,7 +254,7 @@ selector("settings-title", "pp") {
|
||||
|
||||
selector("menu-button", "pp") {
|
||||
fontSize = 40 // Set font size
|
||||
background = new QuadBackgroundComponent(color(0.4157f, 0.4235f, 0.4392f, 1.0f)) // Grey background
|
||||
background = new QuadBackgroundComponent(new ColorRGBA(0.4157f, 0.4235f, 0.4392f, 1.0f)) // Grey background
|
||||
textHAlignment = HAlignment.Center
|
||||
textVAlignment = VAlignment.Center
|
||||
}
|
||||
|
Reference in New Issue
Block a user