private void DrawPanel() { // Render the background bottom bar renderWindow.Draw(panelSprite, 0, new Point(0, 600)); renderWindow.Draw(panelSprite, 1, new Point(166, 600)); renderWindow.Draw(panelSprite, 2, new Point(294, 600)); renderWindow.Draw(panelSprite, 3, new Point(422, 600)); renderWindow.Draw(panelSprite, 4, new Point(550, 600)); renderWindow.Draw(panelSprite, 5, new Point(685, 600)); // Render the health bar renderWindow.Draw(healthManaSprite, 0, new Point(30, 587)); renderWindow.Draw(gameGlobeOverlapSprite, 0, new Point(28, 595)); // Render the mana bar renderWindow.Draw(healthManaSprite, 1, new Point(692, 588)); renderWindow.Draw(gameGlobeOverlapSprite, 1, new Point(693, 591)); if (showMinipanel) { minipanel.Render(); } runButton.Render(); menuButton.Render(); }
public void Render() { renderWindow.Draw(backgroundSprite, 4, 3, 0); btnExit.Render(); foreach (var label in fontLabels.Where(x => !x.Avaiable).Select(x => x.Label)) { renderWindow.Draw(label); } }
public void Render() { renderWindow.Draw(panelSprite, 2, 2, 1); if (IsSecondaryEquipped) { secondaryLeftButton.Render(); secondaryRightButton.Render(); secondaryLeftHandContainer.Render(); secondaryRightHandContainer.Render(); } else { leftHandContainer.Render(); rightHandContainer.Render(); } closeButton.Render(); goldButton.Render(); helmContainer.Render(); amuletContainer.Render(); armorContainer.Render(); beltContainer.Render(); ringtLeftContainer.Render(); ringtRightContainer.Render(); gloveContainer.Render(); bootsContainer.Render(); }
public void Render() { renderWindow.Draw(panelSprite, 2, 2, 1); if (IsSecondaryEquipped) { secondaryLeftButton.Render(); secondaryRightButton.Render(); secondaryLeftHandContainer.Render(); secondaryRightHandContainer.Render(); } else { leftHandContainer.Render(); rightHandContainer.Render(); } closeButton.Render(); goldButton.Render(); headContainer.Render(); neckContainer.Render(); torsoContainer.Render(); beltContainer.Render(); ringLeftContainer.Render(); ringRightContainer.Render(); gloveContainer.Render(); bootsContainer.Render(); }
public void Render() { renderWindow.Draw(backgroundSprite, 4, 3, 0); createNewCharacterButton.Render(); deleteCharacterButton.Render(); exitButton.Render(); okButton.Render(); }
private void DrawPanel() { switch (this.panelFrameType) { case ePanelFrameType.Left: renderWindow.Draw(sprite, 0, new Point(0, 256)); renderWindow.Draw(sprite, 1, new Point(256, 66)); renderWindow.Draw(sprite, 2, new Point(0, 256 + 231)); renderWindow.Draw(sprite, 3, new Point(0, 256 + 231 + 66)); renderWindow.Draw(sprite, 4, new Point(256, 256 + 231 + 66)); break; case ePanelFrameType.Right: renderWindow.Draw(sprite, 5, new Point(400 + 0, 66)); renderWindow.Draw(sprite, 6, new Point(400 + 145, 256)); renderWindow.Draw(sprite, 7, new Point(400 + 145 + 169, 256 + 231)); renderWindow.Draw(sprite, 8, new Point(400 + 145, 256 + 231 + 66)); renderWindow.Draw(sprite, 9, new Point(400 + 0, 256 + 231 + 66)); break; } }
public void Render() { if (IsLeftPanelVisible) { LeftPanel.Render(); leftPanelFrame.Render(); } if (IsRightPanelVisible) { RightPanel.Render(); rightPanelFrame.Render(); } // Render the background bottom bar renderWindow.Draw(panelSprite, 0, new Point(0, 600)); renderWindow.Draw(panelSprite, 1, new Point(166, 600)); renderWindow.Draw(panelSprite, 2, new Point(294, 600)); renderWindow.Draw(panelSprite, 3, new Point(422, 600)); renderWindow.Draw(panelSprite, 4, new Point(550, 600)); renderWindow.Draw(panelSprite, 5, new Point(685, 600)); // Render the health bar renderWindow.Draw(healthManaSprite, 0, new Point(30, 587)); renderWindow.Draw(gameGlobeOverlapSprite, 0, new Point(28, 595)); // Render the mana bar renderWindow.Draw(healthManaSprite, 1, new Point(692, 588)); renderWindow.Draw(gameGlobeOverlapSprite, 1, new Point(693, 591)); if (!IsLeftPanelVisible || !IsRightPanelVisible) { minipanel.Render(); } runButton.Render(); menuButton.Render(); addStatButton.Render(); addSkillButton.Render(); }
public void Render() { if (!isPanelVisible) { return; } renderWindow.Draw(sprite); foreach (var button in buttons) { button.Render(); } }
public void Render() { // Render the background renderWindow.Draw(backgroundSprite, 4, 3, 0); // Render the flaming diablo 2 logo renderWindow.Draw(diabloLogoLeftBlack, (int)(diabloLogoLeftBlack.TotalFrames * logoFrame)); renderWindow.Draw(diabloLogoRightBlack, (int)(diabloLogoRightBlack.TotalFrames * logoFrame)); renderWindow.Draw(diabloLogoLeft, (int)(diabloLogoLeft.TotalFrames * logoFrame)); renderWindow.Draw(diabloLogoRight, (int)(diabloLogoRight.TotalFrames * logoFrame)); // Render the text renderWindow.Draw(versionLabel); renderWindow.Draw(urlLabel); // Render the UI buttons btnSinglePlayer.Render(); btnWebsite.Render(); btnExit.Render(); //wideButton.Location = new Point(264, 290); //renderWindow.Draw(wideButton, 2, 1, 0); }
public MainMenu( IRenderWindow renderWindow, IPaletteProvider paletteProvider, IMPQProvider mpqProvider, IMouseInfoProvider mouseInfoProvider, IMusicProvider musicProvider, ISceneManager sceneManager, IResourceManager resourceManager, Func <eButtonType, IButton> createButton, Func <string, IScene> getScene // Temporary until SDL load functions are sped up ) { this.renderWindow = renderWindow; this.paletteProvider = paletteProvider; this.mpqProvider = mpqProvider; this.mouseInfoProvider = mouseInfoProvider; this.sceneManager = sceneManager; backgroundSprite = renderWindow.LoadSprite(ResourcePaths.GameSelectScreen, Palettes.Sky); diabloLogoLeft = renderWindow.LoadSprite(ResourcePaths.Diablo2LogoFireLeft, Palettes.Units, new Point(400, 120)); diabloLogoLeft.Blend = true; diabloLogoRight = renderWindow.LoadSprite(ResourcePaths.Diablo2LogoFireRight, Palettes.Units, new Point(400, 120)); diabloLogoRight.Blend = true; diabloLogoLeftBlack = renderWindow.LoadSprite(ResourcePaths.Diablo2LogoBlackLeft, Palettes.Units, new Point(400, 120)); diabloLogoRightBlack = renderWindow.LoadSprite(ResourcePaths.Diablo2LogoBlackRight, Palettes.Units, new Point(400, 120)); btnSinglePlayer = createButton(eButtonType.Wide); btnSinglePlayer.Text = "Single Player".ToUpper(); btnSinglePlayer.Location = new Point(264, 290); btnSinglePlayer.OnActivate = OnSinglePlayerClicked; btnWebsite = createButton(eButtonType.Wide); btnWebsite.Text = "Visit Github".ToUpper(); btnWebsite.Location = new Point(264, 460); btnWebsite.OnActivate = OnVisitWebsiteClicked; btnExit = createButton(eButtonType.Wide); btnExit.Text = "Exit Diablo II".ToUpper(); btnExit.Location = new Point(264, 500); btnExit.OnActivate = OnExitClicked; labelFont = renderWindow.LoadFont(ResourcePaths.Font16, Palettes.Static); versionLabel = renderWindow.CreateLabel(labelFont, new Point(50, 555), "v0.01 Pre-Alpha"); urlLabel = renderWindow.CreateLabel(labelFont, new Point(50, 569), "https://github.com/essial/OpenDiablo2/"); urlLabel.TextColor = Color.Magenta; var loadingSprite = renderWindow.LoadSprite(ResourcePaths.LoadingScreen, Palettes.Loading, new Point(300, 400)); // Pre-load all the scenes for now until we fix the sdl load problem var scenesToLoad = new string[] { "Select Hero Class" }; for (int i = 0; i < scenesToLoad.Count(); i++) { renderWindow.Clear(); renderWindow.Draw(loadingSprite, (int)((float)loadingSprite.TotalFrames * ((float)i / (float)scenesToLoad.Count()))); renderWindow.Sync(); getScene(scenesToLoad[i]); } /* * musicProvider.LoadSong(mpqProvider.GetStream("data\\global\\music\\introedit.wav")); * * musicProvider.PlaySong(); */ }
public void Render() { renderWindow.Draw(backgroundSprite, 4, 3, 0); RenderHeros(); renderWindow.Draw(campfireSprite, (int)(campfireSprite.TotalFrames * secondTimer)); renderWindow.Draw(headingLabel); if (selectedHero.HasValue) { renderWindow.Draw(heroClassLabel); renderWindow.Draw(heroDesc1Label); renderWindow.Draw(heroDesc2Label); renderWindow.Draw(heroDesc3Label); } exitButton.Render(); if (showEntryUi) { renderWindow.Draw(characterNameLabel); okButton.Render(); characterNameTextBox.Render(); } }
public void Render() { renderWindow.Draw(panelSprite, 2, 2, 0); closeButton.Render(); }
public void Render() { renderWindow.Draw(panelSprite, 2, 2, 0); treeButtons[ActivePanelIndex].Render(); }