Esempio n. 1
0
    private static void showDebugPlayButton(dfTweenPlayableBase tween)
    {
        if (!Application.isPlaying)
        {
            return;
        }

        using (dfEditorUtil.BeginGroup("Debug"))
            EditorGUILayout.BeginHorizontal();
        {
            GUILayout.Space(dfEditorUtil.LabelWidth + 5);
            if (GUILayout.Button("Play", "minibutton"))
            {
                tween.Play();
            }
            if (GUILayout.Button("Stop", "minibutton"))
            {
                tween.Stop();
            }
            if (GUILayout.Button("Reset", "minibutton"))
            {
                tween.Reset();
            }
        }
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.Separator();
    }
Esempio n. 2
0
    public virtual void Show()
    {
        if (showTweensDestination != null)
        {
            showTweensDestination.Play();
        }
        else
        {
            owner.Show();
        }

        dfProgressBar bar = GetComponent <dfProgressBar>();

        if (bar == null)
        {
            bar = GetComponentInChildren <dfProgressBar>();
        }
        if (bar == null)
        {
            return;
        }

        bar.Hide();
        bar.Value = 0;
    }
Esempio n. 3
0
 public virtual void Hide()
 {
     if (hideTweensOwner != null)
     {
         hideTweensOwner.Play();
     }
     else
     {
         owner.Hide();
     }
 }
    private static void showDebugButtons(dfTweenPlayableBase tween)
    {
        if (!Application.isPlaying)
        {
            return;
        }

        using (dfEditorUtil.BeginGroup("Debug"))
            EditorGUILayout.BeginHorizontal();
        {
            GUILayout.Space(dfEditorUtil.LabelWidth + 5);
            if (GUILayout.Button("Play", "minibutton"))
            {
                tween.Play();
            }
            if (tween.IsPlaying && tween is dfTweenComponentBase)
            {
                var target = tween as dfTweenComponentBase;
                if (GUILayout.Button(target.IsPaused ? "Resume" : "Pause", "minibutton"))
                {
                    target.IsPaused = !target.IsPaused;
                }
            }
            if (GUILayout.Button("Stop", "minibutton"))
            {
                tween.Stop();
            }
            if (GUILayout.Button("Reset", "minibutton"))
            {
                tween.Reset();
            }
        }
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.Separator();
    }
    private static void showDebugPlayButton( dfTweenPlayableBase tween )
    {
        if( !Application.isPlaying )
            return;

        GUILayout.Label( "Debug", "HeaderLabel" );
        EditorGUILayout.BeginHorizontal();
        {
            GUILayout.Space( dfEditorUtil.LabelWidth + 5 );
            if( GUILayout.Button( "Play", "minibutton" ) )
            {
                tween.Play();
            }
            if( GUILayout.Button( "Stop", "minibutton" ) )
            {
                tween.Stop();
            }
            if( GUILayout.Button( "Reset", "minibutton" ) )
            {
                tween.Reset();
            }
        }
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.Separator();
    }
	private static void showDebugButtons( dfTweenPlayableBase tween )
	{
		
		if( !Application.isPlaying )
			return;

		using( dfEditorUtil.BeginGroup( "Debug" ) )
		EditorGUILayout.BeginHorizontal();
		{
			GUILayout.Space( dfEditorUtil.LabelWidth + 5 );
			if( GUILayout.Button( "Play", "minibutton" ) )
			{
				tween.Play();
			}
			if( tween.IsPlaying && tween is dfTweenComponentBase )
			{
				var target = tween as dfTweenComponentBase;
				if( GUILayout.Button( target.IsPaused ? "Resume" : "Pause", "minibutton" ) )
				{
					target.IsPaused = !target.IsPaused;
				}
			}
			if( GUILayout.Button( "Stop", "minibutton" ) )
			{
				tween.Stop();
			}
			if( GUILayout.Button( "Reset", "minibutton" ) )
			{
				tween.Reset();
			}
		}
		EditorGUILayout.EndHorizontal();

		EditorGUILayout.Separator();
		
	}