Ejemplo n.º 1
0
        public DragableMatrixV2(Vector2 size, int maxSlots)
        {
            // make sure valid w/h for number of max slots
            if (size.X * size.Y < maxSlots)
            {
                throw new Exception("More max slots then allowed by size of control!");
            }

            this.Size = size;

            containers    = new List <DragableContainer>();
            this.maxSlots = maxSlots;

            // setup containers relative to loc.

            // if this controls list doesnt have the context menu, add it once!
            contextMenu = new ItemStatsUI(new Vector2(150, 150))
            {
                IsDrawn = false
            };

            SetupContainers();

            mouseOrigin            = new Vector2(-1, -1);
            currentDragableControl = null;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// MUST BE SQUARE IN SIZE!
        /// </summary>
        public WeaponWheelUIV2(float sideLength)
        {
            this.sideLength = sideLength;
            this.Size = new Vector2(sideLength, sideLength);
            this.Border = new BorderInfo(Sprites.guiSpritesDictionary["weapon_wheel_border"]);
            this.Alignment = ControlAlignment.Center;

            // Weapon stats container
            weaponStatsContainer = new ItemStatsUI(this.Size * .4f);
            weaponStatsContainer.Border = new BorderInfo(Sprites.guiSpritesDictionary["weapon_wheel_border"]);
            weaponStatsContainer.Controls[1].Border = null;
            weaponStatsContainer.Alignment = ControlAlignment.Center;
            Add(weaponStatsContainer);

            //KeyClicked += WeaponWheelUIV2_KeyClicked;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// MUST BE SQUARE IN SIZE!
        /// </summary>
        public WeaponWheelUIV2(float sideLength)
        {
            this.sideLength = sideLength;
            this.Size       = new Vector2(sideLength, sideLength);
            this.Border     = new BorderInfo(Sprites.guiSpritesDictionary["weapon_wheel_border"]);
            this.Alignment  = ControlAlignment.Center;

            // Weapon stats container
            weaponStatsContainer                    = new ItemStatsUI(this.Size * .4f);
            weaponStatsContainer.Border             = new BorderInfo(Sprites.guiSpritesDictionary["weapon_wheel_border"]);
            weaponStatsContainer.Controls[1].Border = null;
            weaponStatsContainer.Alignment          = ControlAlignment.Center;
            Add(weaponStatsContainer);

            //KeyClicked += WeaponWheelUIV2_KeyClicked;
        }