public BuildPopupScreen(BaseGame game) : base("Build Screen Test") { this.game = game; ContentManager content = game.Content; // Flag that there is no need for the game to transition // off when the build popup is on top of it. IsPopup = true; //VARIOUS TEST CONTENT / CONTROLS ClickableObject buttonOne = new ClickableObject(game, new Vector2(100, 100), "Sprites/Player/"); ClickableObject buttonTwo = new ClickableObject(game, new Vector2(250, 100), "Sprites/MonsterA/"); objects.Add(buttonOne); objects.Add(buttonTwo); PictureBox pictureBox = new PictureBox(new Vector2(250, 250), content.Load<Texture2D>("TestPictureBox")); controls.AddControl("pictureBox", pictureBox); //TODO add Font utils helper to easily access fonts and add more fonts to library SpriteFont font = content.Load<SpriteFont>("Fonts/gamefont"); Label testLabel = new Label("This is a test label..", new Vector2(250, 400), font); controls.AddControl("testLabel", testLabel); Button testButton = new Button(content.Load<Texture2D>("Buttons/TestButton"), null, new Vector2(50, 250), "Button text goes here..."); testButton.Clicked += MonkeyEvents.TestButtonClickEvent; controls.AddControl("testButton", testButton); }
private Random random = new Random(354668); // Arbitrary, but constant seed #endregion Fields #region Constructors //Constructs a new Game public ClickEngineGame(IServiceProvider serviceProvider) { // Create a new content manager to load content used just by this level. this.Content = new ContentManager(serviceProvider, "Content"); //TODO LOAD STUFF! player = new Player(this, new Vector2(250, 250)); ClickableObject obj = new ClickableObject(this, new Vector2(150, 150), "Sprites/MonsterA/"); clickableEntities.Add(obj); }