private void ResetLowRes() { this.LowRes = true; Vector2 Cursor = Vector2.Zero; this.res1 = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res1"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res1"].Height); Cursor.X = Cursor.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res1"].Width; this.res2 = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res2"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res2"].Height); Cursor.X = Cursor.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res2"].Width; this.res3 = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res3"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res3"].Height); Cursor.X = Cursor.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res3"].Width; this.res4 = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res4"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res4"].Height); Cursor.X = Cursor.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res4"].Width; Cursor.X = (float)(this.screen.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth - ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res5"].Width); this.res5 = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res5"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res5"].Height); EmpireUIOverlay.Button r1 = new EmpireUIOverlay.Button() { Rect = this.res1, NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res1"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res1_hover"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res1_press"] }; this.Buttons.Add(r1); r1.launches = "Research"; EmpireUIOverlay.Button r2 = new EmpireUIOverlay.Button() { Rect = this.res2, NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res2"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res2"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res2"] }; this.Buttons.Add(r2); r2.launches = "Research"; EmpireUIOverlay.Button r3 = new EmpireUIOverlay.Button() { Rect = this.res3, NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res3"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res3_hover"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res3_press"], launches = "Budget" }; this.Buttons.Add(r3); EmpireUIOverlay.Button r4 = new EmpireUIOverlay.Button() { Rect = this.res4, NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res4"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res4"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res4"] }; this.Buttons.Add(r4); EmpireUIOverlay.Button r5 = new EmpireUIOverlay.Button() { Rect = this.res5, NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res5"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res5"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res5"] }; this.Buttons.Add(r5); float rangeforbuttons = (float)(r5.Rect.X - (r4.Rect.X + r4.Rect.Width)); float roomoneitherside = (rangeforbuttons - 607f) / 2f; Cursor.X = (float)(r4.Rect.X + r4.Rect.Width) + roomoneitherside - 50f; EmpireUIOverlay.Button Shipyard = new EmpireUIOverlay.Button() { Rect = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"].Height), NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_hover"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_pressed"], Text = Localizer.Token(98), launches = "Shipyard" }; this.Buttons.Add(Shipyard); Cursor.X = Cursor.X + (float)(ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_hover"].Width + 18); EmpireUIOverlay.Button Empire = new EmpireUIOverlay.Button() { Rect = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"].Height), NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_hover"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_pressed"], launches = "Empire", Text = Localizer.Token(99) }; this.Buttons.Add(Empire); Cursor.X = Cursor.X + (float)(ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_hover"].Width + 18); EmpireUIOverlay.Button Espionage = new EmpireUIOverlay.Button() { Rect = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"].Height), NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_hover"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_pressed"], launches = "Espionage", Text = Localizer.Token(6088) }; this.Buttons.Add(Espionage); Cursor.X = Cursor.X + (float)(ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_hover"].Width + 6); EmpireUIOverlay.Button Diplomacy = new EmpireUIOverlay.Button() { Rect = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"].Height), NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_hover"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_pressed"], launches = "Diplomacy", Text = Localizer.Token(100) }; this.Buttons.Add(Diplomacy); Cursor.X = Cursor.X + (float)(ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_hover"].Width + 6); EmpireUIOverlay.Button MainMenu = new EmpireUIOverlay.Button() { Rect = new Rectangle(this.res5.X+ 52, 39, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_100px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_100px"].Height), NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_100px"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_100px_hover"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_100px_pressed"], launches = "Main Menu", Text = Localizer.Token(101) }; this.Buttons.Add(MainMenu); Cursor.X = Cursor.X + (float)(ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_100px_hover"].Width + 5); EmpireUIOverlay.Button Help = new EmpireUIOverlay.Button() { Rect = new Rectangle(this.res5.X + 72, 64, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_80px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_100px"].Height), NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_80px"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_80px_hover"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_80px_pressed"], Text = "Help", launches = "?" }; this.Buttons.Add(Help); }
//private float TipTimer = 0.35f; //private bool FirstRun = true; public EmpireUIOverlay(Ship_Game.Empire playerEmpire, GraphicsDevice device, UniverseScreen screen) { this.screen = screen; this.empire = playerEmpire; if (device.PresentationParameters.BackBufferWidth > 1366) { Vector2 Cursor = Vector2.Zero; this.res1 = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res1"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res1"].Height); Cursor.X = Cursor.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res1"].Width; this.res2 = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res2"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res2"].Height); Cursor.X = Cursor.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res2"].Width; this.res3 = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res3"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res3"].Height); Cursor.X = Cursor.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res3"].Width; this.res4 = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res4"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res4"].Height); Cursor.X = Cursor.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res4"].Width; Cursor.X = (float)(screen.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth - ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res5"].Width); this.res5 = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res5"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res5"].Height); EmpireUIOverlay.Button r1 = new EmpireUIOverlay.Button(); r1.Rect = this.res1; r1.NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res1"]; r1.HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res1_hover"]; r1.PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res1_press"]; r1.launches = "Research"; this.Buttons.Add(r1); EmpireUIOverlay.Button r2 = new EmpireUIOverlay.Button(); r2.Rect = this.res2; r2.NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res2"]; r2.HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res2"]; r2.PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res2"]; r2.launches = "Research"; this.Buttons.Add(r2); EmpireUIOverlay.Button r3 = new EmpireUIOverlay.Button(); r3.Rect = this.res3; r3.NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res3"]; r3.HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res3_hover"]; r3.PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res3_press"]; r3.launches = "Budget"; this.Buttons.Add(r3); EmpireUIOverlay.Button r4 = new EmpireUIOverlay.Button(); r4.Rect = this.res4; r4.NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res4"]; r4.HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res4"]; r4.PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res4"]; r4.launches = "Budget"; this.Buttons.Add(r4); EmpireUIOverlay.Button r5 = new EmpireUIOverlay.Button(); r5.Rect = this.res5; r5.NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res5"]; r5.HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res5"]; r5.PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_res5"]; this.Buttons.Add(r5); float rangeforbuttons = (float)(r5.Rect.X - (r4.Rect.X + r4.Rect.Width)); float roomoneitherside = (rangeforbuttons - 734f) / 2f; //Added by McShooterz: Shifted buttons to add new ones, added dummy espionage button Cursor.X = (float)(r4.Rect.X + r4.Rect.Width) + roomoneitherside; if (this.screen.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth >= 1920) { Cursor.X -= 220f; EmpireUIOverlay.Button ShipList = new EmpireUIOverlay.Button(); ShipList.Rect = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px"].Height); ShipList.NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_military"]; ShipList.HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_military_hover"]; ShipList.PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_military_pressed"]; ShipList.Text = Localizer.Token(104); ShipList.launches = "ShipList"; this.Buttons.Add(ShipList); Cursor.X = Cursor.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_hover"].Width + 5; EmpireUIOverlay.Button Fleets = new EmpireUIOverlay.Button(); Fleets.Rect = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px"].Height); Fleets.NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_military"]; Fleets.HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_military_hover"]; Fleets.PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_military_pressed"]; Fleets.Text = Localizer.Token(103); Fleets.launches = "Fleets"; this.Buttons.Add(Fleets); Cursor.X = Cursor.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_hover"].Width + 5; } else Cursor.X -= 50f; EmpireUIOverlay.Button Shipyard = new EmpireUIOverlay.Button(); Shipyard.Rect = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px"].Height); Shipyard.NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_military"]; Shipyard.HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_military_hover"]; Shipyard.PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_military_pressed"]; Shipyard.Text = Localizer.Token(98); Shipyard.launches = "Shipyard"; this.Buttons.Add(Shipyard); Cursor.X = Cursor.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_hover"].Width + 40; EmpireUIOverlay.Button Empire = new EmpireUIOverlay.Button(); Empire.Rect = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px"].Height); Empire.NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px"]; Empire.HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_hover"]; Empire.PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_pressed"]; Empire.launches = "Empire"; Empire.Text = Localizer.Token(99); this.Buttons.Add(Empire); Cursor.X = Cursor.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_hover"].Width + 40; EmpireUIOverlay.Button Espionage = new EmpireUIOverlay.Button(); Espionage.Rect = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px"].Height); Espionage.NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_dip"]; Espionage.HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_dip_hover"]; Espionage.PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_dip_pressed"]; Espionage.Text = Localizer.Token(6088); Espionage.launches = "Espionage"; this.Buttons.Add(Espionage); Cursor.X = Cursor.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_hover"].Width + 5; EmpireUIOverlay.Button Diplomacy = new EmpireUIOverlay.Button(); Diplomacy.Rect = new Rectangle((int)Cursor.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px"].Height); Diplomacy.NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_dip"]; Diplomacy.HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_dip_hover"]; Diplomacy.PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_dip_pressed"]; Diplomacy.launches = "Diplomacy"; Diplomacy.Text = Localizer.Token(100); this.Buttons.Add(Diplomacy); Cursor.X = Cursor.X + (float)(ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_168px_hover"].Width + 7); EmpireUIOverlay.Button MainMenu = new EmpireUIOverlay.Button(); MainMenu.Rect = new Rectangle(this.res5.X + 52, 39, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_132px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_132px"].Height); MainMenu.NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_132px_menu"]; MainMenu.HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_132px_menu_hover"]; MainMenu.PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_132px_menu_pressed"]; MainMenu.launches = "Main Menu"; MainMenu.Text = Localizer.Token(101); this.Buttons.Add(MainMenu); Cursor.X = Cursor.X + (float)(ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_132px_hover"].Width + 5); EmpireUIOverlay.Button Help = new EmpireUIOverlay.Button(); Help.Rect = new Rectangle(this.res5.X + 72, 64, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_68px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_132px"].Height); Help.NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_68px_menu"]; Help.HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_68px_menu_hover"]; Help.PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_btn_68px_menu_pressed"]; Help.Text = "Help"; Help.launches = "?"; this.Buttons.Add(Help); return; } this.LowRes = true; Vector2 Cursor0 = Vector2.Zero; this.res1 = new Rectangle((int)Cursor0.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res1"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res1"].Height); Cursor0.X = Cursor0.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res1"].Width; this.res2 = new Rectangle((int)Cursor0.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res2"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res2"].Height); Cursor0.X = Cursor0.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res2"].Width; this.res3 = new Rectangle((int)Cursor0.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res3"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res3"].Height); Cursor0.X = Cursor0.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res3"].Width; this.res4 = new Rectangle((int)Cursor0.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res4"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res4"].Height); Cursor0.X = Cursor0.X + (float)ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res4"].Width; Cursor0.X = (float)(screen.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth - ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res5"].Width); this.res5 = new Rectangle((int)Cursor0.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res5"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res5"].Height); EmpireUIOverlay.Button r1n = new EmpireUIOverlay.Button() { Rect = this.res1, NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res1"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res1_hover"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res1_press"] }; this.Buttons.Add(r1n); r1n.launches = "Research"; EmpireUIOverlay.Button r2n = new EmpireUIOverlay.Button() { Rect = this.res2, NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res2"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res2"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res2"] }; this.Buttons.Add(r2n); r2n.launches = "Research"; EmpireUIOverlay.Button r3n = new EmpireUIOverlay.Button() { Rect = this.res3, NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res3"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res3_hover"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res3_press"], launches = "Budget" }; this.Buttons.Add(r3n); EmpireUIOverlay.Button r4n = new EmpireUIOverlay.Button() { Rect = this.res4, NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res4"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res4"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res4"], launches = "Budget" }; this.Buttons.Add(r4n); EmpireUIOverlay.Button r5n = new EmpireUIOverlay.Button() { Rect = this.res5, NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res5"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res5"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_res5"] }; this.Buttons.Add(r5n); float rangeforbuttons0 = (float)(r5n.Rect.X - (r4n.Rect.X + r4n.Rect.Width)); float roomoneitherside0 = (rangeforbuttons0 - 607f) / 2f; Cursor0.X = (float)(r4n.Rect.X + r4n.Rect.Width) + roomoneitherside0 - 50f; EmpireUIOverlay.Button Shipyard0 = new EmpireUIOverlay.Button() { Rect = new Rectangle((int)Cursor0.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"].Height), NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_hover"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_pressed"], Text = Localizer.Token(98), launches = "Shipyard" }; this.Buttons.Add(Shipyard0); Cursor0.X = Cursor0.X + (float)(ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_hover"].Width + 18); EmpireUIOverlay.Button Empire0 = new EmpireUIOverlay.Button() { Rect = new Rectangle((int)Cursor0.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"].Height), NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_hover"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_pressed"], launches = "Empire", Text = Localizer.Token(99) }; this.Buttons.Add(Empire0); Cursor0.X = Cursor0.X + (float)(ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_hover"].Width + 18); EmpireUIOverlay.Button Espionage0 = new EmpireUIOverlay.Button() { Rect = new Rectangle((int)Cursor0.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"].Height), NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_hover"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_pressed"], launches = "Espionage", Text = Localizer.Token(6088) }; this.Buttons.Add(Espionage0); Cursor0.X = Cursor0.X + (float)(ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_hover"].Width + 6); EmpireUIOverlay.Button Diplomacy0 = new EmpireUIOverlay.Button() { Rect = new Rectangle((int)Cursor0.X, 2, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"].Height), NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_hover"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_pressed"], launches = "Diplomacy", Text = Localizer.Token(100) }; this.Buttons.Add(Diplomacy0); Cursor0.X = Cursor0.X + (float)(ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_124px_hover"].Width + 6); EmpireUIOverlay.Button MainMenu0 = new EmpireUIOverlay.Button() { Rect = new Rectangle(this.res5.X + 52, 39, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_100px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_100px"].Height), NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_100px"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_100px_hover"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_100px_pressed"], launches = "Main Menu", Text = Localizer.Token(101) }; this.Buttons.Add(MainMenu0); Cursor0.X = Cursor0.X + (float)(ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_100px_hover"].Width + 5); EmpireUIOverlay.Button Help0 = new EmpireUIOverlay.Button() { Rect = new Rectangle(this.res5.X + 72, 64, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_80px"].Width, ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_100px"].Height), NormalTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_80px"], HoverTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_80px_hover"], PressedTexture = ResourceManager.TextureDict["EmpireTopBar/empiretopbar_low_btn_80px_pressed"], Text = "Help", launches = "?" }; this.Buttons.Add(Help0); }