Exemplo n.º 1
0
 //Summary
 //    Class for creating an on-screen Button with a Text
 public Button(string a_buttonTexture, Vector2 a_screenPosition, string a_buttonText, string a_textFont, Color a_textColor, Vector2 a_textOffset)
     : base(a_screenPosition)
 {
     m_text = new Text(a_textOffset, a_buttonText, a_textFont, a_textColor, false);
     m_text.setParent(this);
     m_buttonTexture = a_buttonTexture;
 }
Exemplo n.º 2
0
 //Summary
 //    Button-subclass for creating a button from a SpriteFont
 public TextButton(Vector2 a_position, string a_text, string a_font, Color a_normal, Color a_hover, Color a_pressed, Color a_toggle, Color a_disable)
     : base(a_position)
 {
     m_normalColor	= a_normal;
     m_hoverColor	= a_hover;
     m_pressedColor	= a_pressed;
     m_toggleColor	= a_toggle;
     m_text = new Text(m_parentOffset, a_text, a_font, a_normal, false);
 }
Exemplo n.º 3
0
 //Summary
 //    Button-subclass for creating a button from a SpriteFont
 public TextButton(Vector2 a_position, string a_text, string a_font)
     : base(a_position)
 {
     m_normalColor	= new Color(0	, 0	, 0);
     m_hoverColor	= new Color(62	, 67, 68);
     m_pressedColor	= new Color(40	, 40, 40);
     m_toggleColor	= new Color(0	, 0	, 255);
     m_disabledColor	= new Color(255	, 0	, 0);
     m_text = new Text(m_parentOffset, a_text, a_font, m_normalColor, false);
 }
Exemplo n.º 4
0
 public TextField(Vector2 a_position, int a_width, int a_height, bool a_acceptLetters, bool a_acceptNumbers, bool a_acceptSpecials, int a_maxLength)
     : base(a_position)
 {
     m_textToShow = new Text(a_position, "", "VerdanaBold", Color.Black, false);
     m_box = new Box(a_position, a_width, a_height, Color.White, Color.Black, 2, false);
     m_caret = new Line(m_box.p_position, m_box.p_position, new Vector2(5, 3), new Vector2(5, a_height - 3), Color.Black, 1, true);
     m_writing = false;
     m_acceptLetters = a_acceptLetters;
     m_acceptNumbers = a_acceptNumbers;
     m_acceptSpecials = a_acceptSpecials;
     m_maxLength = a_maxLength;
     m_currentLocale = "euSv";
     m_posV2 = a_position;
 }