Exemplo n.º 1
0
        /// <summary>
        /// Нажатие на кнопку вызова подсказки для текущего окна.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_Help_Click(object sender, EventArgs e)
        {
            IFormWithHint form = null;

            try
            {
                form = (IFormWithHint)activeForm;
                string hint     = form.GetHintText();
                Form   hintForm = new HintForm(hint);
                hintForm.ShowDialog();
            }
            catch (Exception ex)
            {
                return;
            }
        }
Exemplo n.º 2
0
    private IEnumerator HintAppear(HintForm _hint)
    {
        float elapsedTime = 0;

        hintsFormExplanation.text  = _hint.hint;
        hintsFormExplanation.alpha = 1;
        hintsFormExplanation.color = _hint.hintColor;

        while (elapsedTime < hintDuration)
        {
            hintsFormExplanation.alpha = alphaHintCurve.Evaluate(elapsedTime / hintDuration);
            elapsedTime += Time.unscaledDeltaTime;
            yield return(null);
        }
        hintsFormExplanation.alpha = 0;
        hintsFormExplanation.text  = "";
        hintsFormExplanation.color = new Color(1, 1, 1, 0);
        hintCoroutine = null;
    }