mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-24 20:31:51 -04:00
Changes (#12846)
This commit is contained in:
parent
35b21d98c6
commit
05d246cdbe
@ -102,7 +102,7 @@ enum class KeyboardBinding(
|
||||
// Unit actions - name MUST correspond to UnitActionType.name because the shorthand constructor
|
||||
// there looks up bindings here by name - which also means we must not use UnitActionType
|
||||
// here as it will not be guaranteed to already be fully initialized.
|
||||
SwapUnits(Category.UnitActions,"Swap units", 'y'),
|
||||
SwapUnits(Category.UnitActions, "Swap units", 'y'),
|
||||
Automate(Category.UnitActions, 'm'),
|
||||
ConnectRoad(Category.UnitActions, "Connect road", 'c'),
|
||||
StopAutomation(Category.UnitActions,"Stop automation", 'm'),
|
||||
|
@ -33,8 +33,7 @@ class IdleUnitButton (
|
||||
add(image).size(imageSize).pad(10f,20f)
|
||||
enable()
|
||||
keyShortcuts.add(keyShortcutBind)
|
||||
addTooltip(keyShortcutBind)
|
||||
onActivation {
|
||||
onActivation (binding = keyShortcutBind) {
|
||||
|
||||
val idleUnits = unitTable.worldScreen.viewingCiv.units.getIdleUnits()
|
||||
if (idleUnits.none()) return@onActivation
|
||||
|
@ -28,8 +28,10 @@ import com.unciv.ui.screens.pickerscreens.UnitRenamePopup
|
||||
import com.unciv.ui.screens.worldscreen.WorldScreen
|
||||
|
||||
class UnitTable(val worldScreen: WorldScreen) : Table() {
|
||||
private val prevIdleUnitButton = IdleUnitButton(this,worldScreen.mapHolder,true, KeyboardBinding.PrevIdleButton)
|
||||
private val nextIdleUnitButton = IdleUnitButton(this,worldScreen.mapHolder,false, KeyboardBinding.NextIdleButton)
|
||||
private val prevIdleUnitButton =
|
||||
IdleUnitButton(this, worldScreen.mapHolder, true, KeyboardBinding.PrevIdleButton)
|
||||
private val nextIdleUnitButton =
|
||||
IdleUnitButton(this, worldScreen.mapHolder, false, KeyboardBinding.NextIdleButton)
|
||||
private val unitIconHolder = Table()
|
||||
private val unitNameLabel = "".toLabel(fontSize = 24)
|
||||
private val unitIconNameGroup = Table()
|
||||
|
Loading…
x
Reference in New Issue
Block a user