// ------------------------------------------------------------------------------------------- void winMenuChange(int id) { int nVirticlaCount = 0; if ((FXMakerLayout.m_bMinimizeAll || FXMakerLayout.m_bMinimizeTopMenu) == false) { // change button if (GUI.Button(FXMakerLayout.GetChildVerticalRect(FXMakerLayout.GetMenuChangeRect(), 0, 3, 0, 1), FXMakerTooltip.GetHcToolMain("go "+(m_nToolIndex==0 ? "PrefabTool" : "Background")))) SetActiveTool(m_nToolIndex == 0 ? 1 : 0); // Capture if (GUI.Button(FXMakerLayout.GetChildVerticalRect(FXMakerLayout.GetMenuChangeRect(), 0, 3, 1, 1), FXMakerTooltip.GetHcToolMain("FullCapture", FXMakerCapture.GetCaptureScreenShotDir()))) { if (Input.GetMouseButtonUp(1)) { Debug.Log(FXMakerCapture.GetCaptureScreenShotDir()); EditorUtility.OpenWithDefaultApp(FXMakerCapture.GetCaptureScreenShotDir()); } else FXMakerCapture.CaptureScreenShot(); } nVirticlaCount = 2; } else nVirticlaCount = 0; // Reload Project Data if (GUI.Button(FXMakerLayout.GetInnerHorizontalRect(FXMakerLayout.GetChildVerticalRect(FXMakerLayout.GetMenuChangeRect(), 0, 1+nVirticlaCount, nVirticlaCount, 1), 2, 0, 1), FXMakerTooltip.GetHcToolMain("LoadPrj"))) LoadTool("Loaded Project"); // Save Project Data FXMakerEffect fxMakerEffect = GetComponent<FXMakerEffect>(); bool bEnable = (fxMakerEffect != null && GetComponent<FXMakerEffect>().IsReadOnlyFolder() == 0); if (FXMakerLayout.GUIButton(FXMakerLayout.GetInnerHorizontalRect(FXMakerLayout.GetChildVerticalRect(FXMakerLayout.GetMenuChangeRect(), 0, 1+nVirticlaCount, nVirticlaCount, 1), 2, 1, 1), FXMakerTooltip.GetHcToolMain("SavePrj"), bEnable)) SaveTool("Saved Prjoect", true); SaveTooltip(); }
// ------------------------------------------------------------------------------------------- public void OnGUIStart() { m_bFrameCreateInstance = false; m_nPrevFocusWindow = m_nLastFocusWindow; m_nLastFocusWindow = 0; m_bLastPopupWindow = false; m_nOnGUICallCount++; // msg box ------------------------------------------------------------- GUI.skin = m_GuiMsgSkin; FxmPopupManager.inst.OnGUIToolMessage(); // modal msg box ------------------------------------------------------- FxmPopupManager.inst.OnGUIModalMessage(); // Gizmo menu ---------------------------------------------------------- GUI.skin = m_GuiMainEngSkin; FXMakerGizmo fxmGizmo = GetComponentInChildren <FXMakerGizmo>(); if (fxmGizmo != null && fxmGizmo.enabled) { fxmGizmo.OnGUIGizmo(); } // modal Fxm Popup ---------------------------------------------------- GUI.skin = m_GuiPopupSkin; FxmPopupManager.inst.OnGUIFolderPopup(); // Menu Change UI ------------------------------------------------------ GUI.skin = m_GuiMainEngSkin; AutoFocusWindow(FXMakerLayout.GetWindowId(FXMakerLayout.WINDOWID.TOP_LEFT), FXMakerLayout.GetMenuChangeRect(), winMenuChange, "FXMaker " + FXMakerLayout.m_CurrentVersion); // Child Window ------------------------------------------------------- m_FXMakerControls.OnGUIControl(); m_FXMakerQuickMenu.OnGUIControl(); // Child Window ------------------------------------------------------- if (m_nToolIndex == 1 && GetFXMakerHierarchy() != null) { GetFXMakerHierarchy().OnGUIHierarchy(); } // Auto Save, Auto Load ----------------------------------------------- CheckFocusedUnityWindow(); }
public static Rect GetTooltipRect() { return(new Rect(FXMakerLayout.m_rectOuterMargin.get_x() * 3f + FXMakerLayout.GetFixedWindowWidth() * (float)FXMakerLayout.m_nSidewindowWidthCount, (float)Screen.get_height() - FXMakerLayout.m_fActionToolbarHeight - FXMakerLayout.m_rectOuterMargin.get_y() - FXMakerLayout.m_fTooltipHeight, (float)Screen.get_width() - FXMakerLayout.GetMenuChangeRect().get_width() * 4f - FXMakerLayout.m_rectOuterMargin.get_x() * 6f, FXMakerLayout.m_fTooltipHeight)); }
public static Rect GetEffectHierarchyRect() { return(new Rect((float)Screen.get_width() - (FXMakerLayout.GetFixedWindowWidth() + FXMakerLayout.m_rectOuterMargin.get_x()) * (float)FXMakerLayout.m_nSidewindowWidthCount, FXMakerLayout.GetMenuChangeRect().get_yMax() + FXMakerLayout.m_rectOuterMargin.get_y(), FXMakerLayout.GetFixedWindowWidth() * (float)FXMakerLayout.m_nSidewindowWidthCount + FXMakerLayout.m_rectOuterMargin.get_x(), (float)Screen.get_height() - FXMakerLayout.GetMenuChangeRect().get_yMax() - FXMakerLayout.m_rectOuterMargin.get_y() * 2f)); }
public static Rect GetResListRect(int nIndex) { return(new Rect(FXMakerLayout.m_rectOuterMargin.get_x() + (FXMakerLayout.GetFixedWindowWidth() + FXMakerLayout.m_rectOuterMargin.get_x()) * (float)nIndex, FXMakerLayout.GetMenuChangeRect().get_yMax() + FXMakerLayout.m_rectOuterMargin.get_y(), FXMakerLayout.GetFixedWindowWidth(), (float)Screen.get_height() - FXMakerLayout.GetMenuChangeRect().get_yMax() - FXMakerLayout.m_rectOuterMargin.get_y() * 2f)); }
public static Rect GetMenuToolbarRect() { return(new Rect(FXMakerLayout.GetMenuChangeRect().get_xMax() + FXMakerLayout.m_rectOuterMargin.get_x(), FXMakerLayout.m_rectOuterMargin.get_y(), (float)Screen.get_width() - FXMakerLayout.GetMenuChangeRect().get_width() - FXMakerLayout.GetMenuTopRightRect().get_width() - FXMakerLayout.m_rectOuterMargin.get_x() * 4f, FXMakerLayout.GetTopMenuHeight())); }
public static Rect GetActionToolbarRect() { return(new Rect(FXMakerLayout.m_rectOuterMargin.x * 3f + FXMakerLayout.GetFixedWindowWidth() * (float)FXMakerLayout.m_nSidewindowWidthCount, (float)Screen.height - FXMakerLayout.m_fActionToolbarHeight - FXMakerLayout.m_rectOuterMargin.y, (float)Screen.width - FXMakerLayout.GetMenuChangeRect().width * 4f - FXMakerLayout.m_rectOuterMargin.x * 6f, FXMakerLayout.m_fActionToolbarHeight)); }
public static Rect GetEffectHierarchyRect() { return(new Rect((float)Screen.width - (FXMakerLayout.GetFixedWindowWidth() + FXMakerLayout.m_rectOuterMargin.x) * (float)FXMakerLayout.m_nSidewindowWidthCount, FXMakerLayout.GetMenuChangeRect().yMax + FXMakerLayout.m_rectOuterMargin.y, FXMakerLayout.GetFixedWindowWidth() * (float)FXMakerLayout.m_nSidewindowWidthCount + FXMakerLayout.m_rectOuterMargin.x, (float)Screen.height - FXMakerLayout.GetMenuChangeRect().yMax - FXMakerLayout.m_rectOuterMargin.y * 2f)); }
public static Rect GetResListRect(int nIndex) { return(new Rect(FXMakerLayout.m_rectOuterMargin.x + (FXMakerLayout.GetFixedWindowWidth() + FXMakerLayout.m_rectOuterMargin.x) * (float)nIndex, FXMakerLayout.GetMenuChangeRect().yMax + FXMakerLayout.m_rectOuterMargin.y, FXMakerLayout.GetFixedWindowWidth(), (float)Screen.height - FXMakerLayout.GetMenuChangeRect().yMax - FXMakerLayout.m_rectOuterMargin.y * 2f)); }
public static Rect GetMenuToolbarRect() { return(new Rect(FXMakerLayout.GetMenuChangeRect().xMax + FXMakerLayout.m_rectOuterMargin.x, FXMakerLayout.m_rectOuterMargin.y, (float)Screen.width - FXMakerLayout.GetMenuChangeRect().width - FXMakerLayout.GetMenuTopRightRect().width - FXMakerLayout.m_rectOuterMargin.x * 4f, FXMakerLayout.GetTopMenuHeight())); }