Skip to content

Commit 8c91256

Browse files
committed
fix: size popup window
1 parent aa47226 commit 8c91256

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Assets/Code/LevelEditor/BlockPopupWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static void ShowPopup(
4747
Current._currentSelection = currentSelection;
4848

4949
Current.ShowUtility();
50-
Current.position = new Rect(activatorRect.x, activatorRect.y, 300, 400);
50+
Current.position = activatorRect;
5151
}
5252

5353
private void OnGUI()

Assets/Code/LevelEditor/LevelMatrixEditor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ private void ShowContextMenu(LevelCell cell, int x, int y)
162162
if (cachedLibrary == null) return;
163163

164164
Vector2 screenPos = GUIUtility.GUIToScreenPoint(Event.current.mousePosition);
165-
Rect rect = new Rect(screenPos, Vector2.zero);
165+
Vector2 windowSize = new Vector2(350, 550);
166+
Rect rect = new Rect(screenPos, windowSize);
166167

167168
BlockPopupWindow.LevelEditorHelpers.TryGetCell = pos => GetCell(pos);
168169

0 commit comments

Comments
 (0)