diff --git a/MLEM.Ui/Elements/Button.cs b/MLEM.Ui/Elements/Button.cs
index 3bb46ed..0c42523 100644
--- a/MLEM.Ui/Elements/Button.cs
+++ b/MLEM.Ui/Elements/Button.cs
@@ -52,14 +52,10 @@ namespace MLEM.Ui.Elements {
///
/// Set this property to true to mark the button as disabled.
/// A disabled button cannot be moused over, selected or pressed.
- /// If this value changes often, consider using to set it automatically.
+ /// If this value changes often, consider using .
///
public virtual bool IsDisabled {
- get {
- if (this.AutoDisableCondition != null)
- this.IsDisabled = this.AutoDisableCondition(this);
- return this.isDisabled;
- }
+ get => this.isDisabled || this.AutoDisableCondition?.Invoke(this) == true;
set => this.isDisabled = value;
}
///
@@ -79,7 +75,8 @@ namespace MLEM.Ui.Elements {
///
public bool CanSelectDisabled;
///
- /// An optional function that can be used to set automatically based on a user-defined condition. This removes the need to disable a button based on a condition in or manually.
+ /// An optional function that can be used to modify the result of automatically based on a user-defined condition. This removes the need to disable a button based on a condition in or manually.
+ /// Note that, if 's underlying value is set to using , this function's result will be ignored.
///
public Func