Exemple #1
0
 /// <summary>
 ///     Builds a new handler for the given <see cref="MenuList" />.
 /// </summary>
 /// <param name="component">The <see cref="MenuList" /> where this handler is responsible for.</param>
 /// <returns>The handler</returns>
 public ADrawable<MenuList> BuildListHandler(MenuList component)
 {
     return new LightList2(component);
 }
Exemple #2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="BlueList" /> class.
 /// </summary>
 /// <param name="component">
 ///     The component.
 /// </param>
 public BlueList2(MenuList component)
     : base(component)
 {
     var arrowSize = MenuSettings.Font.MeasureText(null, "V", 0);
     this.dropDownButtonWidth = arrowSize.Width + (2 * ArrowSpacing);
 }
Exemple #3
0
        /// <summary>
        ///     Gets the list of dropdown item boundaries.
        /// </summary>
        /// <param name="component">The <see cref="MenuList" /></param>
        /// <returns>List of <see cref="Rectangle" /></returns>
        public List<Rectangle> DropDownListBoundaries(MenuList component)
        {
            var rectangles = new List<Rectangle>();
            for (var i = 0; i < component.Count; i++)
            {
                rectangles.Add(
                    new Rectangle(
                        (int)
                        (component.Position.X + component.MenuWidth - this.dropDownButtonWidth - (2 * TextSpacing)
                         - component.MaxStringWidth), 
                        (int)(component.Position.Y + ((i + 1) * MenuSettings.ContainerHeight)), 
                        this.dropDownButtonWidth + (2 * TextSpacing) + component.MaxStringWidth,
                        MenuSettings.ContainerHeight + 1));
            }

            return rectangles;
        }
Exemple #4
0
 /// <summary>
 ///     Gets the complete dropdown boundaries
 /// </summary>
 /// <param name="component">The <see cref="MenuList" /></param>
 /// <returns>The <see cref="Rectangle" /></returns>
 public Rectangle DropDownExpandedBoundaries(MenuList component)
 {
     return
         new Rectangle(
             (int)
             (component.Position.X + component.MenuWidth - this.dropDownButtonWidth - (2 * TextSpacing)
              - component.MaxStringWidth), 
             (int)component.Position.Y, 
             this.dropDownButtonWidth + (2 * TextSpacing) + component.MaxStringWidth, 
             (component.Count + 1) * MenuSettings.ContainerHeight);
 }
Exemple #5
0
 /// <summary>
 ///     Builds a new handler for the given <see cref="MenuList" />.
 /// </summary>
 /// <param name="component">The <see cref="MenuList" /> where this handler is responsible for.</param>
 /// <returns>The handler</returns>
 public ADrawable<MenuList> BuildListHandler(MenuList component)
 {
     return new TechList(component);
 }
Exemple #6
0
 public static HitChance getHit(MenuList combohit)
 {
     switch(combohit.Index)
     {
         case 1:
             return HitChance.Medium;
         case 2:
             return HitChance.High;
         case 3:
             return HitChance.VeryHigh;
     }
     return HitChance.Medium;
 }