public GameScene() { dm = new DrawManager(); testsprite = new Sprite("Resources/InGame/Fields/infertile/Deserts/test.png"); testspriteforest = new Sprite("Resources/InGame/Fields/fertile/Forests/largetest.png"); cursor = new bCursor(); testspriteforest.x = testsprite.w; dm.Add(testsprite); dm.Add(testspriteforest); dm.Add(cursor); }
public LBTestScene() { listbox_01 = new bListbox(); bListboxEntry b1 = new bListboxEntry("Hello World"); b1.OnClick += HandleClick; listbox_01.Add(b1); dm.Add(listbox_01); }
public HostJoin() { //Create Objects dm = new DrawManager(); t = new Text(Convert.ToString(counter)); BackgroundSprite = new Sprite("Resources/MainMenu/background.png"); borderSprite = new Sprite("Resources/MainMenu/border.png"); testBackButton = new bButton("Resources/testBackButton.png", "Resources/testBackButtonHover.png"); hostButton = new bButton("Resources/MainMenu/nohover/host.png", "Resources/MainMenu/hover/host.png"); joinButton = new bButton("Resources/MainMenu/nohover/join.png", "Resources/MainMenu/hover/join.png"); cursor = new bCursor(); //Set Positions and W / H BackgroundSprite.w = 1680; BackgroundSprite.h = 1050; borderSprite.x = 1680 / 2 - borderSprite.w / 2; borderSprite.y = 180; testBackButton.y = 850; hostButton.x = 1680 / 2 - hostButton.w / 2; hostButton.y = 300; joinButton.x = 1680 / 2 - hostButton.w / 2; joinButton.y = hostButton.y + hostButton.h + 100; //Set OnClicks joinButton.OnClick += Click_JoinButton; hostButton.OnClick += Click_HostButton; testBackButton.OnClick += Click_testBackButton; //Add to Layers dm.Add(BackgroundSprite); dm.Add(borderSprite); dm.Add(testBackButton); dm.Add(joinButton); dm.Add(hostButton); dm.Add(cursor); dm.Add(t); count(); }
public MainMenuScene() { // init code Console.WriteLine("Initializing MainMenuScene"); dm = new DrawManager(); borderSprite = new Sprite("Resources/MainMenu/border.png"); borderSprite.x = 1680 / 2 - borderSprite.w / 2; borderSprite.y = 180; newGameButton = new bButton("Resources/MainMenu/nohover/newgame.png", "Resources/MainMenu/hover/newgame.png"); newGameButton.x = 1680 / 2 - newGameButton.w / 2; newGameButton.y = 230; optionsButton = new bButton("Resources/MainMenu/nohover/options.png", "Resources/MainMenu/hover/options.png"); optionsButton.x = 1680 / 2 - optionsButton.w / 2; optionsButton.y = newGameButton.y + newGameButton.h + 50; exitButton = new bButton("Resources/MainMenu/nohover/exit.png", "Resources/MainMenu/hover/exit.png"); exitButton.x = 1680 / 2 - exitButton.w / 2; exitButton.y = optionsButton.y + optionsButton.h + 50; cursor = new bCursor(); newGameButton.OnClick += Click_ButtonNewGame; optionsButton.OnClick += Click_ButtonOptions; exitButton.OnClick += Click_ButtonExit; BackgroundSprite = new Sprite("Resources/MainMenu/background.png"); BackgroundSprite.w = 1680; BackgroundSprite.h = 1050; //Layer System dm.Add(BackgroundSprite); dm.Add(borderSprite); dm.Add(newGameButton); dm.Add(optionsButton); dm.Add(exitButton); dm.Add(cursor); //Draw Cursor Last to have it on top Program.aw.Cursor = MouseCursor.Empty; }