public ExampleMenu(Game game, String BackImg)
     : base(game,BackImg)
 {
     ButtonLoaderStruct tmp = new ButtonLoaderStruct
     {
         ButtonDefault = new LoadObject
         {
             FileName  = "2",
             FileType = fileType.Texture2D,
             InternalName = "btn_dft"
         },
         ButtonDown = new LoadObject
         {
             FileName = "3",
             FileType = fileType.Texture2D,
             InternalName = "btn_dwn"
         },
         ButtonOver = new LoadObject
         {
             FileName = "1",
             FileType = fileType.Texture2D,
             InternalName = "btn_ovr"
         },
     };
     MenuButton StartButton = new MenuButton(new Rectangle(60, 600, 500, 64),"btn", "Example", tmp);
     StartButton.Clicked += StartButton_Clicked;
     AddButton("start", StartButton);
 }
 public MenuButton(Rectangle bounds,String basename, String text, ButtonLoaderStruct Btnl)
 {
     _baseName = basename;
     Bounds = bounds;
     Position = new Point(Bounds.Left, Bounds.Right);
     LoaderFiles = Btnl;
     Active = true;
 }
示例#3
0
 public SoticeMenu(Game game)
     : base(game, "Textures/ALiftInPink")
 {
     ButtonLoaderStruct bls = new ButtonLoaderStruct
     {
         ButtonDefault = new LoadObject
         {
             FileName = "Textures/HortofGeld",
             FileType = fileType.Texture2D,
             InternalName = "Start_dft"
         },
         ButtonDefaultTint = Color.White,
         ButtonDown = new LoadObject
         {
             FileType = fileType.Texture2D,
             FileName = "Textures/BorkenHeartofGold",
             InternalName = "Start_dwn",
         },
         ButtonDownTint = Color.Black,
         ButtonOver = new LoadObject
         {
             FileName = "Textures/BorkenHeartofGold",
             FileType = fileType.Texture2D,
             InternalName = "Start_ovr"
         },
         ButtonOverTint = Color.White
     };
     MenuButton mb = new MenuButton(new Rectangle(700, 500, 444, 532),"Start","Start",bls);
     mb.Clicked += mb_Clicked;
     AddButton("StartBtn", mb);
 }