添加按比例缩放的表格计算逻辑,使用小于等于1的单元格尺寸来获取相对容器的尺寸

This commit is contained in:
2026-08-03 17:34:44 +08:00
parent f7931d41f1
commit 29c7c4e81e
10 changed files with 126 additions and 54 deletions
+4 -4
View File
@@ -60,8 +60,8 @@ namespace XericUIEditor.XTable
/// <summary>绘制网格线</summary>
private static void DrawGridOverlay(XericUIActionTable table, RectTransform rect)
{
float[] rowHeights = table.RowHeights;
float[] colWidths = table.ColWidths;
float[] rowHeights = table.ResolvedRowHeights;
float[] colWidths = table.ResolvedColWidths;
if (rowHeights == null || colWidths == null) return;
Vector3[] corners = new Vector3[4];
@@ -103,8 +103,8 @@ namespace XericUIEditor.XTable
int selCol = table.SelectedCol;
if (selRow < 0 || selCol < 0) return;
float[] rowHeights = table.RowHeights;
float[] colWidths = table.ColWidths;
float[] rowHeights = table.ResolvedRowHeights;
float[] colWidths = table.ResolvedColWidths;
if (rowHeights == null || colWidths == null) return;
// 计算选中单元格的世界位置