Ejemplo n.º 1
0
    public void PlaceButton(int decisionChoice, string decisionText)
    {
        decisionText = TextWrapUtils.GetWrappedText(decisionText, titleWordCharacterLimit);

        UIChoiceButton button = choiceButtonPool.Get();

        activeButtons.Add(button);

        // Populate data entries
        button.SetSelectionChoice(decisionChoice);
        button.SetButtonText(decisionText);

        uiFitter.AddItem(button);
    }
Ejemplo n.º 2
0
 /// <summary>
 /// Called whenever a button is stored in the pool.
 /// </summary>
 /// <param name="button"></param>
 private void ButtonStored(UIChoiceButton button)
 {
     // Reset the button and disable it.
     button.SetButtonText("");
     button.gameObject.SetActive(false);
 }