1
This commit is contained in:
@@ -192,7 +192,7 @@ namespace BITKit
|
||||
// }
|
||||
} while (property.NextVisible(false));
|
||||
|
||||
foreach (var method in serializedObject.targetObject.GetType().GetMethods())
|
||||
foreach (var method in serializedObject.targetObject.GetType().GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic))
|
||||
{
|
||||
if (method.GetCustomAttribute<BITAttribute>() is null) continue;
|
||||
if (method.GetParameters().Length is not 0) continue;
|
||||
|
@@ -614,6 +614,10 @@ namespace BITKit
|
||||
{
|
||||
self.style.display = new(active ? DisplayStyle.Flex : DisplayStyle.None);
|
||||
}
|
||||
public static void SetVisible(this VisualElement self, bool visible)
|
||||
{
|
||||
self.style.visibility = new(visible ? Visibility.Visible : Visibility.Hidden);
|
||||
}
|
||||
public static float GetOpacity(this VisualElement self) => self.style.opacity.value;
|
||||
public static void SetOpacity(this VisualElement self, float value) => self.style.opacity = new(value);
|
||||
public static void ScrollToBottom(this ScrollView self)
|
||||
|
@@ -119,6 +119,8 @@ namespace BITKit
|
||||
}
|
||||
public double Interval=1;
|
||||
private double allowUpdateTime=0;
|
||||
public bool AllowUpdateWithoutReset => BITApp.Time.TimeAsDouble >= allowUpdateTime;
|
||||
public double Remaining => allowUpdateTime - BITApp.Time.TimeAsDouble;
|
||||
public bool AllowUpdate
|
||||
{
|
||||
get
|
||||
@@ -128,7 +130,7 @@ namespace BITKit
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public bool AllowUpdateWithoutReset => BITApp.Time.TimeAsDouble >= allowUpdateTime;
|
||||
|
||||
public void Reset(bool immediately = false)
|
||||
{
|
||||
allowUpdateTime = BITApp.Time.TimeAsDouble + (immediately ? 0 : Interval);
|
||||
|
Reference in New Issue
Block a user