Browse Source

Fix dialog centering in the editor to use UI root size instead of screen size, which may not be the same.

Lasse Öörni 8 years ago
parent
commit
5fecffe8bd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      bin/Data/Scripts/Editor/EditorUI.as

+ 1 - 1
bin/Data/Scripts/Editor/EditorUI.as

@@ -1114,7 +1114,7 @@ void CreateDebugHud()
 void CenterDialog(UIElement@ element)
 void CenterDialog(UIElement@ element)
 {
 {
     IntVector2 size = element.size;
     IntVector2 size = element.size;
-    element.SetPosition((graphics.width - size.x) / 2, (graphics.height - size.y) / 2);
+    element.SetPosition((ui.root.width - size.x) / 2, (ui.root.height - size.y) / 2);
 }
 }
 
 
 void CreateContextMenu()
 void CreateContextMenu()