ImageButtons in Toolbar

This commit is contained in:
Johannes Schmelz
2024-12-08 20:59:08 +01:00
parent e14f6bbef7
commit b3fe289fbe
3 changed files with 145 additions and 87 deletions

View File

@@ -218,7 +218,6 @@ selector("button", "pp") {
insets = new Insets3f(3, 3, 3, 3) // Adjust the border thickness
textHAlignment = HAlignment.Center
textVAlignment = VAlignment.Center
buttonCommands = stdButtonCommands
}
selector("slider", "pp") {
@@ -387,7 +386,7 @@ selector("button-toolbar", "pp") {
}
selector("button-toolbar2", "pp") { playerColor ->
selector("button-clear", "pp") { playerColor ->
def validColor = playerColor ?: new ColorRGBA(0, 0, 0, 0) // Vollständig transparent
def playerGradientBackground = new QuadBackgroundComponent(validColor)
@@ -395,12 +394,7 @@ selector("button-toolbar2", "pp") { playerColor ->
playerGradientBackground.setColor(new ColorRGBA(0, 0, 0, 0)) // RGBA (Rot, Grün, Blau, Alpha)
background = playerGradientBackground.clone() // Setze den Hintergrund
insets = new Insets3f(3, 3, 3, 3) // Optional: Ränder
insets = new Insets3f(-3, -3, -3, -3) // Optional: Ränder
textHAlignment = HAlignment.Center // Text-Zentrierung
textVAlignment = VAlignment.Center // Text-Zentrierung
}