1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-16 10:53:11 +01:00
MLEM/MLEM.Ui/Style/StyleProp.cs
2019-10-14 21:28:12 +02:00

23 lines
No EOL
500 B
C#

namespace MLEM.Ui.Style {
public struct StyleProp<T> {
public T Value { get; private set; }
private bool isCustom;
public void SetFromStyle(T value) {
if (!this.isCustom) {
this.Value = value;
}
}
public void Set(T value) {
this.isCustom = true;
this.Value = value;
}
public static implicit operator T(StyleProp<T> prop) {
return prop.Value;
}
}
}