mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-24 03:53:12 -04:00
Revert Button.isEnabled getter
This commit is contained in:
parent
09ab647a79
commit
f40cd771ef
@ -80,12 +80,7 @@ fun Button.enable() {
|
||||
* which is more appropriate to toggle On/Off buttons, while this one is good for 'click-to-do-something' buttons.
|
||||
*/
|
||||
var Button.isEnabled: Boolean
|
||||
get() = when (touchable) {
|
||||
Touchable.enabled -> true
|
||||
Touchable.disabled -> false
|
||||
// idk what to do here
|
||||
Touchable.childrenOnly -> throw IllegalStateException()
|
||||
}
|
||||
get() = touchable == Touchable.enabled
|
||||
set(value) = if (value) enable() else disable()
|
||||
|
||||
fun colorFromHex(hexColor: Int): Color {
|
||||
|
Loading…
x
Reference in New Issue
Block a user