示例#1
0
        public static Button_Description button(Inputs input, Texture2D description_texture, Rectangle description_rect, Vector2 loc)
        {
            Button_Description result;

            if (Input.ControlScheme == ControlSchemes.Touch)
            {
                result = new Button_Description_Touch(input, description_texture, description_rect);
            }
            else if (!Input.Controller_Active)
            {
                result = new Button_Description_Keyboard(input, description_texture, description_rect);
            }
            else
            {
                if (Global.gameSettings.Controls.IconSet == Options.ButtonIcons.Xbox360)
                {
                    result = new Button_Description_360(input, description_texture, description_rect);
                }
                else
                {
                    result = new Button_Description(input, description_texture, description_rect);
                }
            }
            result.loc = loc;
            return(result);
        }
示例#2
0
        public static Button_Description button(Buttons button)
        {
            Button_Description result;

            if (Global.gameSettings.Controls.IconSet == Options.ButtonIcons.Xbox360)
            {
                result = new Button_Description_360(button);
            }
            else
            {
                result = new Button_Description(button);
            }
            return(result);
        }
示例#3
0
 public Button_Icon(Buttons button, Texture2D texture) : this(Button_Description.ButtonIndex(button), texture)
 {
 }