示例#1
0
        void OnOptionChange(EventBase evt)
        {
            var button     = evt.target as Button;
            var choiceName = button.name;

            if (choiceName == s_BoldChoice)
            {
                m_InternalState ^= FontStyleFlag.Bold;
            }
            else if (choiceName == s_ItalicChocie)
            {
                m_InternalState ^= FontStyleFlag.Italic;
            }

            if (m_InternalState == FontStyleFlag.None)
            {
                value = "normal";
            }
            else if (m_InternalState == FontStyleFlag.Bold)
            {
                value = "bold";
            }
            else if (m_InternalState == FontStyleFlag.Italic)
            {
                value = "italic";
            }
            else
            {
                value = "bold-and-italic";
            }
        }
示例#2
0
 public bool containsStyleRemove(FontStyleFlag sty)
 {
     if ((_styleRemove & (UInt32)sty) > 0)
     {
         return(true);
     }
     return(false);
 }
示例#3
0
 public bool ContainsStyleRemove(FontStyleFlag sty)
 {
     if ((styleRemove & (uint)sty) > 0)
     {
         return(true);
     }
     return(false);
 }
示例#4
0
        void SetInternalStatesFromExternalChoice(string newValue)
        {
            m_InternalState = FontStyleFlag.None;
            if (newValue == "normal")
            {
                m_InternalState = FontStyleFlag.None;
            }
            else if (newValue == "bold")
            {
                m_InternalState = FontStyleFlag.Bold;
            }
            else if (newValue == "italic")
            {
                m_InternalState = FontStyleFlag.Italic;
            }
            else if (newValue == "bold-and-italic")
            {
                m_InternalState = FontStyleFlag.Both;
            }

            ToggleButtonStates();
        }
示例#5
0
 /// <summary>
 /// Remove a font style from the set. Removing a font style
 /// that is already not in the set has no effect.
 /// </summary>
 /// <param name="sty">Font style to be removed.</param>
 public void removeStyle(FontStyleFlag sty)
 {
     _styleAdd    &= ~((UInt32)sty);
     _styleRemove |= (UInt32)sty;
 }
示例#6
0
 /// <summary>
 /// Add a font style to the set. Adding a font style
 /// that is already in the set has no effect.
 /// </summary>
 /// <param name="sty">Font style to be added.</param>
 public void addStyle(FontStyleFlag sty)
 {
     _styleAdd    |= (UInt32)sty;
     _styleRemove &= ~((UInt32)sty);
 }
示例#7
0
 /// <summary>
 ///     Remove a font style from the set. Removing a font style
 ///     that is already not in the set has no effect.
 /// </summary>
 /// <param name="sty">Font style to be removed.</param>
 public void RemoveStyle(FontStyleFlag sty)
 {
     styleAdd    &= ~(uint)sty;
     styleRemove |= (uint)sty;
 }
示例#8
0
 /// <summary>
 ///     Add a font style to the set. Adding a font style
 ///     that is already in the set has no effect.
 /// </summary>
 /// <param name="sty">Font style to be added.</param>
 public void AddStyle(FontStyleFlag sty)
 {
     styleAdd    |= (uint)sty;
     styleRemove &= ~(uint)sty;
 }
示例#9
0
		/// <summary>
		/// Remove a font style from the set. Removing a font style
		/// that is already not in the set has no effect.
		/// </summary>
		/// <param name="sty">Font style to be removed.</param>
		public void removeStyle(FontStyleFlag sty)
		{
			_styleAdd &= ~( (UInt32) sty );
			_styleRemove |= (UInt32) sty;
		}
示例#10
0
		public bool containsStyleRemove(FontStyleFlag sty)
		{
			if ((_styleRemove & (UInt32) sty) > 0) {
				return true;
			}
			return false;
		}
示例#11
0
		/// <summary>
		/// Add a font style to the set. Adding a font style
		/// that is already in the set has no effect.
		/// </summary>
		/// <param name="sty">Font style to be added.</param>
		public void addStyle(FontStyleFlag sty)
		{
			_styleAdd |= (UInt32) sty;
			_styleRemove &= ~( (UInt32) sty );
		}
示例#12
0
 /// <summary>
 /// Remove a font style from the set. Removing a font style
 /// that is already not in the set has no effect.
 /// </summary>
 /// <param name="sty">Font style to be removed.</param>
 public void removeStyle(FontStyleFlag sty)
 {
     _style &= ~((UInt32)sty);
 }
示例#13
0
 /// <summary>
 /// Add a font style to the set. Adding a font style
 /// that is already in the set has no effect.
 /// </summary>
 /// <param name="sty">Font style to be added.</param>
 public void addStyle(FontStyleFlag sty)
 {
     _style |= (UInt32)sty;
 }
示例#14
0
		/// <summary>
		/// Remove a font style from the set. Removing a font style
		/// that is already not in the set has no effect.
		/// </summary>
		/// <param name="sty">Font style to be removed.</param>
		public void removeStyle(FontStyleFlag sty)
		{
			_style &= ~((UInt32)sty);
		}
示例#15
0
		/// <summary>
		/// Add a font style to the set. Adding a font style
		/// that is already in the set has no effect.
		/// </summary>
		/// <param name="sty">Font style to be added.</param>
		public void addStyle(FontStyleFlag sty)
		{
			_style |= (UInt32)sty;
		}