mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-20 12:48:56 +07:00
Added "How to create a UI skin for Unciv" to wiki (#7976)
* Replaced all occurrences of deprecated NinePatch function calls This makes a lot of UI elements already moddable but documentation is still missing * Added "How to create a UI skin for Unciv" to wiki * Added image * Fixed two typos and updated directory image Old image was missing a folder
This commit is contained in:
@ -105,7 +105,7 @@ object FasterUIDevelopment {
|
||||
}
|
||||
private var curBorderZ = 0
|
||||
fun addBorder(actor: Actor, color: Color) {
|
||||
val border = ImageWithCustomSize(ImageGetter.getBackground(color))
|
||||
val border = ImageWithCustomSize(skinStrings.getUiBackground("", tintColor = color))
|
||||
border.zIndex = curBorderZ++
|
||||
val stageCoords = actor.localToStageCoordinates(Vector2(0f, 0f))
|
||||
border.x = stageCoords.x - 1
|
||||
@ -114,7 +114,7 @@ object FasterUIDevelopment {
|
||||
border.height = actor.height + 2
|
||||
stage.addActor(border)
|
||||
|
||||
val background = ImageWithCustomSize(ImageGetter.getBackground(clearColor))
|
||||
val background = ImageWithCustomSize(skinStrings.getUiBackground("", tintColor = clearColor))
|
||||
background.zIndex = curBorderZ++
|
||||
background.x = stageCoords.x
|
||||
background.y = stageCoords.y
|
||||
|
Reference in New Issue
Block a user