Ejemplo n.º 1
0
 protected void AddOption(DialogOption option)
 {
     dialogOptions.Add(option);
     UpdateOptionPositions();
 }
Ejemplo n.º 2
0
        protected void AddOption(StringBuilder option, bool isStatic, int pageNumber)
        {
            DialogOption newOption = new DialogOption(option);
            if (wrapText)
            {
                StringBuilder wrappedOption = new StringBuilder();
                WordWrapper.WrapWord(option, wrappedOption, optionFont, bounds, 1);
                newOption.optionText = wrappedOption;
            }
            if (isStatic)
            {
                Vector2 optionBounds = staticFont.MeasureString(newOption.optionText);

                newOption.origin = optionBounds / 2;
                newOption.bounds = optionBounds;
            }
            else
            {
                Vector2 optionBounds = optionFont.MeasureString(newOption.optionText);

                newOption.origin = optionBounds / 2;
                newOption.bounds = optionBounds;

            }
            isAllStatic &= isStatic;
            newOption.isStatic = isStatic;
            dialogOptions.Add(newOption);
            UpdateOptionPositions();
        }