Ejemplo n.º 1
0
 public Button(string name, GUIComponent parent, int rx, int ry, Texture2D texture, int width) : base(name, parent, rx, ry)
 {
     this.texture  = texture;
     textureIndex  = 0;
     this.width    = width;
     clickState    = MouseClickState.Released;
     locationState = MouseLocationState.Leaved;
 }
Ejemplo n.º 2
0
 public void MouseLeave()
 {
     if (locationState == MouseLocationState.Entered)
     {
         MouseLeaved?.Invoke(this, null);
         textureIndex  = 0;
         locationState = MouseLocationState.Leaved;
     }
 }
Ejemplo n.º 3
0
 public void MouseLeave()
 {
     if (locationState == MouseLocationState.Entered)
     {
         MouseLeaved?.Invoke(this, null);
         alpha         = 100;
         locationState = MouseLocationState.Leaved;
     }
 }
Ejemplo n.º 4
0
 public CheckBox(string name, GUIComponent parent, int rx, int ry, Texture2D texture, int width) : base(name, parent, rx, ry)
 {
     this.texture  = texture;
     textureIndex  = 0;
     this.width    = width;
     clickState    = MouseClickState.Released;
     locationState = MouseLocationState.Leaved;
     isChecked     = false;
     synchronized  = new List <CheckBox>();
 }
Ejemplo n.º 5
0
        public Soul(Hero hero, int x, int y) : base(x, y)
        {
            this.hero  = hero;
            aura       = Global.spriteBox.Pick("Auras");
            heroSprite = hero.sprite;
            collider   = new NullCollider();
            alpha      = 100;

            clickState    = MouseClickState.Released;
            locationState = MouseLocationState.Leaved;
        }
Ejemplo n.º 6
0
        public void MouseLeave()
        {
            if (locationState == MouseLocationState.Entered)
            {
                MouseLeaved?.Invoke(this, null);
                if (!isChecked)
                {
                    textureIndex = 0;
                    foreach (CheckBox checkBox in synchronized)
                    {
                        if (!checkBox.isChecked)
                        {
                            checkBox.SetTextureIndex(0);
                        }
                    }
                }

                locationState = MouseLocationState.Leaved;
            }
        }