Inheritance: MonoBehaviour
Esempio n. 1
0
	// -------------------------------------------------------------------------------------------
	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();
	}
Esempio n. 2
0
	// tooltip -------------------------------------------------------------
	void ProcessTooltip()
	{
		if (FxmPopupManager.inst.IsShowModalMessage() == false)
		{
			if (m_PriorityTooltip != "")
				m_Tooltip = m_PriorityTooltip;

			if (m_Tooltip != "")
			{
				if (0 < m_Tooltip.Trim().Length)
				{
					string tooltip = "";

					// HintRect
					tooltip = FXMakerTooltip.GetTooltip(FXMakerTooltip.TOOLTIPSPLIT.HintRect, m_Tooltip);
					if (tooltip != "")
						if (FXMakerOption.inst.m_bHintRedBox)
							FxmPopupManager.inst.ShowHintRect(FXMakerTooltip.GetHintRect(tooltip));

					// HoverCommand_Button
					tooltip = FXMakerTooltip.GetTooltip(FXMakerTooltip.TOOLTIPSPLIT.HoverCommand_Button, m_Tooltip);
					if (tooltip != "")
						OnHoverCommand_Button(tooltip);

					// HoverCommand_Popup Object
					tooltip = FXMakerTooltip.GetTooltip(FXMakerTooltip.TOOLTIPSPLIT.HoverCommand_Popup, m_Tooltip);
					if (tooltip != "")
						OnHoverCommand_Popup(System.Convert.ToInt32(tooltip));
					else OnHoverCommand_Popup(0);

					// Cursor Shot Tooltip
					tooltip = FXMakerTooltip.GetTooltip(FXMakerTooltip.TOOLTIPSPLIT.CursorTooltip, m_Tooltip);
					if (tooltip != "")
						FxmPopupManager.inst.ShowCursorTooltip(tooltip);

					// Bottom Long Tooltip
					tooltip = FXMakerTooltip.GetTooltip(FXMakerTooltip.TOOLTIPSPLIT.Tooltip, m_Tooltip);
					if (tooltip != "")
						FxmPopupManager.inst.ShowBottomTooltip(tooltip);

					FxmPopupManager.inst.UpdateBringWindow();
				}

				if (m_nOnGUICallCount == 2)
				{
					m_Tooltip = "";
					m_PriorityTooltip = "";
				}
			} else {
// 				OnHoverCommand_Hierarchy(0);
				string msg = m_EmptyTooltip;
				FXMakerEffect fxMakerEffect = GetComponent<FXMakerEffect>();
				if (fxMakerEffect != null && 0 < GetComponent<FXMakerEffect>().IsReadOnlyFolder())
					msg += "\n" + FXMakerTooltip.GetHsToolMessage("FOLDER_READONLY_BOTTOM", "");
				GUI.Label(FXMakerLayout.GetTooltipRect(), msg);
			}
		}
	}
Esempio n. 3
0
	// ------------------------------------------------------------------
	void UnactiveOriginalObject()
	{
		FXMakerEffect effectToolMain = GetComponent<FXMakerEffect>();
		if (effectToolMain != null && effectToolMain.m_CurrentEffectRoot != null && GetOriginalEffectObject() != null)
		{
			// Original - CheckParent
			if (GetOriginalEffectObject().transform.parent == null)
				GetOriginalEffectObject().transform.parent = effectToolMain.m_CurrentEffectRoot.transform;

			// Unactive
			Transform[] trans = GetOriginalEffectObject().GetComponentsInChildren<Transform>(true);
			foreach (Transform tran in trans)
				NgObject.SetActive(tran.gameObject, false);
		}
	}
Esempio n. 4
0
 // -------------------------------------------------------------------------------------------
 FXMakerEffect()
 {
     inst = this;
 }
Esempio n. 5
0
 // -------------------------------------------------------------------------------------------
 FXMakerEffect()
 {
     inst = this;
 }
Esempio n. 6
0
	void NewChildGameObject(FXMakerEffect.NEW_TYPE newType)
	{
		GameObject	newPrefab;
		switch (newType)
		{
			case FXMakerEffect.NEW_TYPE.NEW_EMPTY		: newPrefab	= new GameObject("GameObject");					break;
			case FXMakerEffect.NEW_TYPE.NEW_PLANE		: newPrefab	= NgObject.CreateGameObject(FXMakerEffect.inst.m_DefaultPlanePrefab);		break;
			case FXMakerEffect.NEW_TYPE.NEW_LEGACY		: newPrefab	= NgObject.CreateGameObject(FXMakerEffect.inst.m_DefaultLegacyPrefab);		break;
			case FXMakerEffect.NEW_TYPE.NEW_SHURIKEN	: newPrefab	= NgObject.CreateGameObject(FXMakerEffect.inst.m_DefaultShurikenPrefab);	break;
			default :
				{
					NgUtil.LogMessage("NEW_TYPE error !!!");
					return;
				}
		}
		newPrefab.transform.parent = m_SelectedGameObject.transform;
		OnAddGameObject(newPrefab);
		SetActiveComponent(newPrefab, null, true);
		FXMakerMain.inst.CreateCurrentInstanceEffect(true);
	}