mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-25 21:03:15 -04:00
feature (#7325)
This commit is contained in:
parent
3422e161ad
commit
33237d5a59
@ -101,6 +101,7 @@ class ModManagementScreen(
|
|||||||
|
|
||||||
init {
|
init {
|
||||||
//setDefaultCloseAction(screen) // this would initialize the new MainMenuScreen immediately
|
//setDefaultCloseAction(screen) // this would initialize the new MainMenuScreen immediately
|
||||||
|
rightSideButton.isVisible = false
|
||||||
closeButton.onActivation {
|
closeButton.onActivation {
|
||||||
val tileSets = ImageGetter.getAvailableTilesets()
|
val tileSets = ImageGetter.getAvailableTilesets()
|
||||||
if (game.settings.tileSet !in tileSets) {
|
if (game.settings.tileSet !in tileSets) {
|
||||||
@ -399,6 +400,7 @@ class ModManagementScreen(
|
|||||||
private fun onlineButtonAction(repo: Github.Repo, button: Button) {
|
private fun onlineButtonAction(repo: Github.Repo, button: Button) {
|
||||||
syncOnlineSelected(repo.name, button)
|
syncOnlineSelected(repo.name, button)
|
||||||
showModDescription(repo.name)
|
showModDescription(repo.name)
|
||||||
|
rightSideButton.isVisible = true
|
||||||
rightSideButton.clearListeners()
|
rightSideButton.clearListeners()
|
||||||
rightSideButton.enable()
|
rightSideButton.enable()
|
||||||
val label = if (installedModInfo[repo.name]?.state?.hasUpdate == true)
|
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.
|
// 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
|
// 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") })
|
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()
|
val decoratedButton = Table()
|
||||||
decoratedButton.add(mod.button)
|
decoratedButton.add(mod.button)
|
||||||
decoratedButton.add(mod.state.container).align(Align.center+Align.left)
|
decoratedButton.add(mod.state.container).align(Align.center+Align.left)
|
||||||
|
@ -82,6 +82,7 @@ class LoadGameScreen(previousScreen:BaseScreen) : LoadOrSaveScreen() {
|
|||||||
rightSideTable.initRightSideTable()
|
rightSideTable.initRightSideTable()
|
||||||
rightSideButton.onActivation { onLoadGame() }
|
rightSideButton.onActivation { onLoadGame() }
|
||||||
rightSideButton.keyShortcuts.add(KeyCharAndCode.RETURN)
|
rightSideButton.keyShortcuts.add(KeyCharAndCode.RETURN)
|
||||||
|
rightSideButton.isVisible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun resetWindowState() {
|
override fun resetWindowState() {
|
||||||
@ -93,6 +94,7 @@ class LoadGameScreen(previousScreen:BaseScreen) : LoadOrSaveScreen() {
|
|||||||
|
|
||||||
override fun onExistingSaveSelected(saveGameFile: FileHandle) {
|
override fun onExistingSaveSelected(saveGameFile: FileHandle) {
|
||||||
copySavedGameToClipboardButton.enable()
|
copySavedGameToClipboardButton.enable()
|
||||||
|
rightSideButton.isVisible = true
|
||||||
rightSideButton.setText("Load [$selectedSave]".tr())
|
rightSideButton.setText("Load [$selectedSave]".tr())
|
||||||
rightSideButton.enable()
|
rightSideButton.enable()
|
||||||
}
|
}
|
||||||
|
@ -101,6 +101,7 @@ abstract class LoadOrSaveScreen(
|
|||||||
|
|
||||||
selectedSave = saveGameFile.name()
|
selectedSave = saveGameFile.name()
|
||||||
showSaveInfo(saveGameFile)
|
showSaveInfo(saveGameFile)
|
||||||
|
rightSideButton.isVisible = true
|
||||||
onExistingSaveSelected(saveGameFile)
|
onExistingSaveSelected(saveGameFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user