public TextButton(Menu menu, string text) : base(menu, "font", text) { OnMouseOver += () => { VertexColor = Color.Aquamarine; }; OnMouseOut += () => { VertexColor = Color.White; }; OnMouseDown += () => { VertexColor = Color.Blue; }; }
public Widget(Menu menuEnv) { Menu = menuEnv; }
public ImageButton(Menu menu, string normal, string over) : base(menu) { Texture = m_normal = menu.contentManager.Load<Texture2D>(normal); m_over = menu.contentManager.Load<Texture2D>(over); OnMouseOver += () => { Texture = m_over; }; OnMouseOut += () => { Texture = m_normal; VertexColor = Color.White; }; OnMouseDown += () => { Texture = m_over; VertexColor = Color.Gray; }; OnMouseUp += () => { Texture = m_normal; }; }
public RectangleWidget(Menu env, float width, float height) : base(env) { Height = height; FullWidth = width; Texture2D dummyTexture = new Texture2D(env.Controller.GraphicsDevice, 1, 1); dummyTexture.SetData(new Color[] { Color.White }); Texture = dummyTexture; }
public TextWidget(Menu menuEnv, string fontName, string text = "") : base(menuEnv) { Text = text; SetFont(fontName); }