Better icons for 'next turn' button

@vegeta1k95 sorry about this, but the way this works without resizing is simply not up to the standards of the current UI :/
This commit is contained in:
Yair Morgenstern
2022-12-15 23:46:20 +02:00
parent e4a7f7e131
commit 0d19bf9cef
16 changed files with 9 additions and 15 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 KiB

After

Width:  |  Height:  |  Size: 439 KiB

View File

@ -2,28 +2,22 @@ package com.unciv.ui.worldscreen.status
import com.badlogic.gdx.Input import com.badlogic.gdx.Input
import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.scenes.scene2d.ui.TextButton
import com.badlogic.gdx.utils.Align
import com.unciv.models.translations.tr import com.unciv.models.translations.tr
import com.unciv.ui.images.IconTextButton import com.unciv.ui.images.IconTextButton
import com.unciv.ui.images.ImageGetter import com.unciv.ui.images.ImageGetter
import com.unciv.ui.utils.BaseScreen
import com.unciv.ui.utils.KeyCharAndCode import com.unciv.ui.utils.KeyCharAndCode
import com.unciv.ui.utils.KeyShortcut import com.unciv.ui.utils.KeyShortcut
import com.unciv.ui.utils.extensions.center
import com.unciv.ui.utils.extensions.centerX
import com.unciv.ui.utils.extensions.centerY
import com.unciv.ui.utils.extensions.isEnabled import com.unciv.ui.utils.extensions.isEnabled
import com.unciv.ui.utils.extensions.keyShortcuts import com.unciv.ui.utils.extensions.keyShortcuts
import com.unciv.ui.utils.extensions.onActivation import com.unciv.ui.utils.extensions.onActivation
import com.unciv.ui.utils.extensions.setFontSize import com.unciv.ui.utils.extensions.setSize
class NextTurnButton( class NextTurnButton(
) : IconTextButton("", null) { ) : IconTextButton("", null, 30) {
private var nextTurnAction = NextTurnAction("", Color.BLACK) {} private var nextTurnAction = NextTurnAction("", Color.BLACK) {}
init { init {
label.setFontSize(30) // label.setFontSize(30)
labelCell.pad(10f) labelCell.pad(10f)
onActivation { nextTurnAction.action() } onActivation { nextTurnAction.action() }
keyShortcuts.add(Input.Keys.SPACE) keyShortcuts.add(Input.Keys.SPACE)
@ -42,7 +36,7 @@ class NextTurnButton(
label.setText(nextTurnAction.text.tr()) label.setText(nextTurnAction.text.tr())
label.color = nextTurnAction.color label.color = nextTurnAction.color
if (nextTurnAction.icon != null && ImageGetter.imageExists(nextTurnAction.icon)) if (nextTurnAction.icon != null && ImageGetter.imageExists(nextTurnAction.icon))
iconCell.setActor(ImageGetter.getImage(nextTurnAction.icon)) iconCell.setActor(ImageGetter.getImage(nextTurnAction.icon).apply { setSize(30f) })
else else
iconCell.clearActor() iconCell.clearActor()
pack() pack()

View File

@ -252,6 +252,11 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
Applicable to: Global Applicable to: Global
??? example "Provides [amount] [resource]"
Example: "Provides [3] [Iron]"
Applicable to: Global, Improvement
??? example "[relativeAmount]% growth [cityFilter]" ??? example "[relativeAmount]% growth [cityFilter]"
Example: "[+20]% growth [in all cities]" Example: "[+20]% growth [in all cities]"
@ -858,11 +863,6 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
Applicable to: Building, Unit, Improvement Applicable to: Building, Unit, Improvement
??? example "Provides [amount] [resource]"
Example: "Provides [3] [Iron]"
Applicable to: Building, Improvement
??? example "Unbuildable" ??? example "Unbuildable"
Applicable to: Building, Unit, Improvement Applicable to: Building, Unit, Improvement