mirror of
https://github.com/packwiz/packwiz-installer.git
synced 2025-04-19 21:16:30 +02:00
Fix disable options button always changing to No optional mods...
This commit is contained in:
parent
6c6a0100fd
commit
03b0f1b09b
@ -367,7 +367,8 @@ class UpdateManager internal constructor(private val opts: Options, val ui: IUse
|
|||||||
handleCancellation()
|
handleCancellation()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ui.disableOptionsButton()
|
// TODO: keep this enabled? then apply changes after download process?
|
||||||
|
ui.disableOptionsButton(optionTasks.isNotEmpty())
|
||||||
|
|
||||||
// TODO: different thread pool type?
|
// TODO: different thread pool type?
|
||||||
val threadPool = Executors.newFixedThreadPool(10)
|
val threadPool = Executors.newFixedThreadPool(10)
|
||||||
|
@ -19,7 +19,7 @@ interface IUserInterface {
|
|||||||
fun showOptions(options: List<IOptionDetails>): Boolean
|
fun showOptions(options: List<IOptionDetails>): Boolean
|
||||||
|
|
||||||
fun showExceptions(exceptions: List<ExceptionDetails>, numTotal: Int, allowsIgnore: Boolean): ExceptionListResult
|
fun showExceptions(exceptions: List<ExceptionDetails>, numTotal: Int, allowsIgnore: Boolean): ExceptionListResult
|
||||||
fun disableOptionsButton() {}
|
fun disableOptionsButton(hasOptions: Boolean) {}
|
||||||
|
|
||||||
fun showCancellationDialog(): CancellationResult = CancellationResult.QUIT
|
fun showCancellationDialog(): CancellationResult = CancellationResult.QUIT
|
||||||
|
|
||||||
|
@ -131,8 +131,8 @@ class GUIHandler : IUserInterface {
|
|||||||
return future.get()
|
return future.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun disableOptionsButton() = EventQueue.invokeLater {
|
override fun disableOptionsButton(hasOptions: Boolean) = EventQueue.invokeLater {
|
||||||
frmPackwizlauncher.disableOptionsButton()
|
frmPackwizlauncher.disableOptionsButton(hasOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun showCancellationDialog(): IUserInterface.CancellationResult {
|
override fun showCancellationDialog(): IUserInterface.CancellationResult {
|
||||||
|
@ -77,9 +77,9 @@ class InstallWindow(private val handler: GUIHandler) : JFrame() {
|
|||||||
lblProgresslabel.text = progress.message
|
lblProgresslabel.text = progress.message
|
||||||
}
|
}
|
||||||
|
|
||||||
fun disableOptionsButton() {
|
fun disableOptionsButton(hasOptions: Boolean) {
|
||||||
btnOptions.apply {
|
btnOptions.apply {
|
||||||
text = "No optional mods"
|
text = if (hasOptions) { "Optional mods..." } else { "No optional mods" }
|
||||||
isEnabled = false
|
isEnabled = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user