Beispiel #1
0
 public TextButton(Menu menu, string text)
     : base(menu, "font", text)
 {
     OnMouseOver += () => { VertexColor = Color.Aquamarine; };
     OnMouseOut += () => { VertexColor = Color.White; };
     OnMouseDown += () => { VertexColor = Color.Blue; };
 }
Beispiel #2
0
 public Widget(Menu menuEnv)
 {
     Menu = menuEnv;
 }
Beispiel #3
0
            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; };
            }
Beispiel #4
0
        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;
        }
Beispiel #5
0
 public TextWidget(Menu menuEnv, string fontName, string text = "")
     : base(menuEnv)
 {
     Text = text;
     SetFont(fontName);
 }