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:
Leonard Günther
2022-11-06 21:53:55 +01:00
committed by GitHub
parent 139bf0af68
commit 4522ab4c6b
45 changed files with 370 additions and 93 deletions

View File

@ -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