mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-25 12:54:06 -04:00
feature (#7325)
This commit is contained in:
parent
3422e161ad
commit
33237d5a59
@ -101,6 +101,7 @@ class ModManagementScreen(
|
||||
|
||||
init {
|
||||
//setDefaultCloseAction(screen) // this would initialize the new MainMenuScreen immediately
|
||||
rightSideButton.isVisible = false
|
||||
closeButton.onActivation {
|
||||
val tileSets = ImageGetter.getAvailableTilesets()
|
||||
if (game.settings.tileSet !in tileSets) {
|
||||
@ -399,6 +400,7 @@ class ModManagementScreen(
|
||||
private fun onlineButtonAction(repo: Github.Repo, button: Button) {
|
||||
syncOnlineSelected(repo.name, button)
|
||||
showModDescription(repo.name)
|
||||
rightSideButton.isVisible = true
|
||||
rightSideButton.clearListeners()
|
||||
rightSideButton.enable()
|
||||
val label = if (installedModInfo[repo.name]?.state?.hasUpdate == true)
|
||||
@ -523,7 +525,10 @@ class ModManagementScreen(
|
||||
// Prevent building up listeners. The virgin Button has one: for mouseover styling.
|
||||
// The captures for our listener shouldn't need updating, so assign only once
|
||||
if (mod.button.listeners.none { it.javaClass.`package`.name.startsWith("com.unciv") })
|
||||
mod.button.onClick { installedButtonAction(mod) }
|
||||
mod.button.onClick {
|
||||
rightSideButton.isVisible = true
|
||||
installedButtonAction(mod)
|
||||
}
|
||||
val decoratedButton = Table()
|
||||
decoratedButton.add(mod.button)
|
||||
decoratedButton.add(mod.state.container).align(Align.center+Align.left)
|
||||
|
@ -82,6 +82,7 @@ class LoadGameScreen(previousScreen:BaseScreen) : LoadOrSaveScreen() {
|
||||
rightSideTable.initRightSideTable()
|
||||
rightSideButton.onActivation { onLoadGame() }
|
||||
rightSideButton.keyShortcuts.add(KeyCharAndCode.RETURN)
|
||||
rightSideButton.isVisible = false
|
||||
}
|
||||
|
||||
override fun resetWindowState() {
|
||||
@ -93,6 +94,7 @@ class LoadGameScreen(previousScreen:BaseScreen) : LoadOrSaveScreen() {
|
||||
|
||||
override fun onExistingSaveSelected(saveGameFile: FileHandle) {
|
||||
copySavedGameToClipboardButton.enable()
|
||||
rightSideButton.isVisible = true
|
||||
rightSideButton.setText("Load [$selectedSave]".tr())
|
||||
rightSideButton.enable()
|
||||
}
|
||||
|
@ -101,6 +101,7 @@ abstract class LoadOrSaveScreen(
|
||||
|
||||
selectedSave = saveGameFile.name()
|
||||
showSaveInfo(saveGameFile)
|
||||
rightSideButton.isVisible = true
|
||||
onExistingSaveSelected(saveGameFile)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user