mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-07-31 06:37:39 +02:00
replaced text displays with labels
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// https://github.com/jMonkeyEngine-Contributions/Lemur/wiki/Styling
|
||||
|
||||
import com.jme3.math.ColorRGBA
|
||||
import com.jme3.texture.Texture
|
||||
import com.simsilica.lemur.*
|
||||
import com.simsilica.lemur.component.QuadBackgroundComponent
|
||||
import com.simsilica.lemur.Button
|
||||
@@ -47,6 +48,23 @@ def orangeBorder = TbtQuadBackgroundComponent.create(
|
||||
1f, false)
|
||||
orangeBorder.color = color(1, 0.5, 0, 1) // Orange color
|
||||
|
||||
|
||||
def createCustomBackground(app) {
|
||||
// Load the texture from the assets
|
||||
Texture texture = app.getAssetManager().loadTexture("Pictures/kontobg.png")
|
||||
|
||||
// Create the TbtQuadBackgroundComponent
|
||||
def backgroundCustom = TbtQuadBackgroundComponent.create(
|
||||
texture, // The texture to use
|
||||
1, 1, 1, // Insets for the 9-patch behavior
|
||||
126, 126, // The size of the texture
|
||||
1f, // The scale factor
|
||||
false // No tiling
|
||||
)
|
||||
|
||||
return backgroundCustom
|
||||
}
|
||||
|
||||
selector("pp") {
|
||||
font = font("Interface/Fonts/Metropolis/Metropolis-Regular-32.fnt")
|
||||
}
|
||||
@@ -366,3 +384,12 @@ 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
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user