This commit is contained in:
CortexCore
2025-04-17 19:21:44 +08:00
parent d8b8ddb8b6
commit 2d8978e694
7 changed files with 117 additions and 37 deletions

View File

@@ -679,7 +679,7 @@ namespace BITKit
self.schedule.Execute(() =>
{
self.scrollOffset = new Vector2(0, float.MaxValue);
});
}).ExecuteLater(1);;
}
public static void ScrollToBottomAutomatic(this ScrollView self, float delay = 0.02f)
{
@@ -707,7 +707,8 @@ namespace BITKit
public static Vector2 GetScreenPosition(this VisualElement self, Vector3 worldPosition)
{
var panel = (self.panel ?? self.parent.panel) ?? self.parent.parent.panel;
var panel = self.panel;
if (panel is null) return default;
var pos = RuntimePanelUtils
.CameraTransformWorldToPanel(panel, worldPosition, Camera);