mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-07-31 06:37:39 +02:00
update toolbar + background
This commit is contained in:
@@ -348,7 +348,7 @@ def enabledCommandToolbar = new Command<Button>() {
|
||||
void execute(Button source) {
|
||||
if (source.isEnabled()){
|
||||
source.setColor(ColorRGBA.White)
|
||||
def orangeBackground = new QuadBackgroundComponent(color(1, 0.5, 0, 1)); // Orange background
|
||||
def orangeBackground = new QuadBackgroundComponent(color(1, 1, 0, 1)); // Orange background
|
||||
source.setBackground(orangeBackground);
|
||||
} else{
|
||||
source.setColor(ColorRGBA.White)
|
||||
@@ -384,12 +384,20 @@ selector("button-toolbar", "pp") {
|
||||
}
|
||||
|
||||
|
||||
selector("button-toolbar2", "pp") {
|
||||
insets = new Insets3f(3, 3, 3, 3) // Adjust the border thickness
|
||||
textHAlignment = HAlignment.Center
|
||||
textVAlignment = VAlignment.Center
|
||||
buttonCommands = stdButtonCommandsToolbar
|
||||
selector("button-toolbar2", "pp") { playerColor ->
|
||||
def validColor = playerColor ?: new ColorRGBA(0, 0, 0, 0) // Vollständig transparent
|
||||
def playerGradientBackground = new QuadBackgroundComponent(validColor)
|
||||
|
||||
// Kein Hintergrundbild, komplett transparent
|
||||
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
|
||||
textHAlignment = HAlignment.Center // Text-Zentrierung
|
||||
textVAlignment = VAlignment.Center // Text-Zentrierung
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user