コード例 #1
0
    /// <summary>
    /// this function handles the currently down on the tinkertext
    /// </summary>
    /// <param name="tinkerText"></param>
    public void OnMouseCurrentlyDown(GTinkerText tinkerText)
    {
        // If this text is already marked as mouse down, clear that
        if (mouseDownTinkerText != null && mouseDownTinkerText == tinkerText)
        {
            mouseDownTinkerText = null;

            // and reassign it to currently down
            mouseCurrentlyDownTinkerText = tinkerText;

            //DetectStanzaAutoPlay(tinkerText);
        }
        else if (mouseCurrentlyDownTinkerText != null)
        {
            // If this text isn't already marked as currently down
            if (mouseCurrentlyDownTinkerText != tinkerText)
            {
                // Then reset the old one
                mouseCurrentlyDownTinkerText.Reset();

                // Assign this new one
                mouseCurrentlyDownTinkerText = tinkerText;

                // Signal tinkerText
                tinkerText.OnMouseCurrentlyDown();

                //	DetectStanzaAutoPlay(tinkerText);
            }
        }
        else
        {
            // Assign this new one
            mouseCurrentlyDownTinkerText = tinkerText;

            // Signal tinkerText
            tinkerText.OnMouseCurrentlyDown();

            //DetectStanzaAutoPlay(tinkerText);
        }
    }