Browse Source

CommandPopup position and hieight adjusted

master
desktop-maesty/steve 7 years ago
parent
commit
9e5e76ad57
  1. 4
      Assets/Fungus/Scripts/Editor/BlockEditor.cs
  2. 3
      Assets/Fungus/Scripts/Editor/CommandSelectorPopupWindowContent.cs

4
Assets/Fungus/Scripts/Editor/BlockEditor.cs

@ -287,14 +287,14 @@ namespace Fungus.EditorUtils
{
lastCMDpopupPos = pos;
lastCMDpopupPos.x += EditorGUIUtility.labelWidth;
lastCMDpopupPos.y += EditorGUIUtility.singleLineHeight;
lastCMDpopupPos.y += EditorGUIUtility.singleLineHeight*2;
}
// Add Button
if (GUILayout.Button(addIcon))
{
CommandSelectorPopupWindowContent.ShowCommandMenu(lastCMDpopupPos, "", target as Block,
(int)(EditorGUIUtility.currentViewWidth),
(int)(EditorWindow.focusedWindow.position.height - lastCMDpopupPos.y - EditorGUIUtility.singleLineHeight*3));
(int)(EditorWindow.focusedWindow.position.height - lastCMDpopupPos.y));
}
// Duplicate Button

3
Assets/Fungus/Scripts/Editor/CommandSelectorPopupWindowContent.cs

@ -68,7 +68,8 @@ namespace Fungus.EditorUtils
{
curBlock = block;
var win = new CommandSelectorPopupWindowContent(currentHandlerName, block, width, height);
var win = new CommandSelectorPopupWindowContent(currentHandlerName, block,
width, (int)(height - EditorGUIUtility.singleLineHeight * 3));
PopupWindow.Show(position, win);

Loading…
Cancel
Save