public UIButton(Rectangle zone, UIMenu baseController) : base(zone, baseController) { }
protected override void Initialize() { GameConfiguration.ScreenBounds = this.Window.ClientBounds; GameConfiguration.ScreenResolution = new Vector2(this.GraphicsDevice.Viewport.Width, this.GraphicsDevice.Viewport.Height); // TODO: Add your initialization logic here base.Initialize(); //graphics.IsFullScreen = true; device = this.GraphicsDevice; mouseManager = new MouseManager(); map = Tools.MaxRes.loadWrl(SystemConfiguration.AppPath + "\\data\\maps\\Snow_5.wrl"); map.mapDraw = new GraphicMap(map); Animator.Instance.AddAObject(map, map.AddFrame, 150.0); GraphicMap.mapShader.Parameters["ViewportSize"].SetValue(GameConfiguration.ScreenResolution); map.clearLoadData(); AIREXPLD = maxres.loadMultiImage("TANK"); camera = new Camera(map); userInterface = new UI.UIManager(Game1.device); CashedTexture2D t2d = ImageCache.Instance.GetImage("ENDGAME6",TextureType.Paletted); UI.UIMenu menu = new UI.UIMenu(new Rectangle(100, 100, 55, 32)); userInterface.maincontrol.AddChild(menu); UI.UIFixedStateButton button = new UI.UIFixedStateButton(new Rectangle(0, 0, 55, 16), menu); button.SetIdleImage(new ImagePart(ImageCache.Instance.GetImage("AMMO_OF", TextureType.Simple), null)); button.SetPressedImage(new ImagePart(ImageCache.Instance.GetImage("AMMO_ON", TextureType.Simple), null)); UI.UIButton button1 = new UI.UIButton(new Rectangle(0, 16, 55, 16), menu); button1.SetIdleImage(new ImagePart(ImageCache.Instance.GetImage("AMMO_OF", TextureType.Simple), null)); button1.SetPressedImage(new ImagePart(ImageCache.Instance.GetImage("AMMO_ON", TextureType.Simple), null)); UI.UILabel label = new UI.UILabel(new Rectangle(52, 33, 100, 100)); label.Font = UI.UIFontHelper.CourierNew12RegularBold; label.Text = "test text"; label.Color = Color.Red; userInterface.maincontrol.AddChild(label); }