public QueueComponent(Ship_Game.ScreenManager ScreenManager, Rectangle container, ResearchScreenNew screen)
 {
     this.container = container;
     this.screen = screen;
     this.ScreenManager = ScreenManager;
     this.Current = new Rectangle(container.X, container.Y, container.Width, 150);
     this.ShowQueue = new DanButton(new Vector2((float)(container.X + container.Width - 192), (float)(ScreenManager.GraphicsDevice.PresentationParameters.BackBufferHeight - 55)), Localizer.Token(2136));
     this.TimeLeft = new Rectangle(this.Current.X + this.Current.Width - 119, this.Current.Y + this.Current.Height - 24, 111, 20);
     this.csub = new Submenu(true, ScreenManager, this.Current);
     this.csub.AddTab(Localizer.Token(1405));
     this.Queue = new Rectangle(this.Current.X, this.Current.Y + 165, container.Width, container.Height - 165);
     this.qsub = new Submenu(true, ScreenManager, this.Queue);
     this.qsub.AddTab(Localizer.Token(1404));
     this.QSL = new ScrollList(this.qsub, 125);
 }
 //private string fmt = "0.#";
 public OrbitalAssetsUIElement(Rectangle r, Ship_Game.ScreenManager sm, UniverseScreen screen, Planet p)
 {
     this.p = p;
     this.screen = screen;
     this.ScreenManager = sm;
     this.ElementRect = r;
     this.sel = new Selector(this.ScreenManager, r, Color.Black);
     base.TransitionOnTime = TimeSpan.FromSeconds(0.25);
     base.TransitionOffTime = TimeSpan.FromSeconds(0.25);
     this.SliderRect = new Rectangle(r.X + r.Width - 100, r.Y + r.Height - 40, 500, 40);
     this.clickRect = new Rectangle(this.ElementRect.X + this.ElementRect.Width - 16, this.ElementRect.Y + this.ElementRect.Height / 2 - 11, 11, 22);
     this.LeftRect = new Rectangle(r.X, r.Y + 44, 200, r.Height - 44);
     this.RightRect = new Rectangle(r.X + 200, r.Y + 44, 200, r.Height - 44);
     this.BombardButton = new DanButton(new Vector2((float)(this.LeftRect.X + 20), (float)(this.LeftRect.Y + 25)), Localizer.Token(1431))
     {
         IsToggle = true,
         ToggledText = Localizer.Token(1426)
     };
     this.LandTroops = new DanButton(new Vector2((float)(this.LeftRect.X + 20), (float)(this.LeftRect.Y + 75)), Localizer.Token(1432))
     {
         IsToggle = true,
         ToggledText = Localizer.Token(1433)
     };
     this.flagRect = new Rectangle(r.X + r.Width - 31, r.Y + 22 - 13, 26, 26);
     this.DefenseRect = new Rectangle(this.LeftRect.X + 12, this.LeftRect.Y + 18, 22, 22);
     this.SoftAttackRect = new Rectangle(this.LeftRect.X + 12, this.DefenseRect.Y + 22 + 5, 16, 16);
     this.HardAttackRect = new Rectangle(this.LeftRect.X + 12, this.SoftAttackRect.Y + 16 + 5, 16, 16);
     this.DefenseRect.X = this.DefenseRect.X - 3;
     this.ItemDisplayRect = new Rectangle(this.LeftRect.X + 85, this.LeftRect.Y + 5, 85, 85);
     OrbitalAssetsUIElement.TippedItem bomb = new OrbitalAssetsUIElement.TippedItem()
     {
         r = this.BombardButton.r,
         TIP_ID = 32
     };
     this.ToolTipItems.Add(bomb);
     bomb = new OrbitalAssetsUIElement.TippedItem()
     {
         r = this.LandTroops.r,
         TIP_ID = 36
     };
     this.ToolTipItems.Add(bomb);
 }
 public AgentComponent(Rectangle r, EspionageScreen Escreen)
 {
     this.Escreen = Escreen;
     this.ComponentRect = r;
     this.ScreenManager = Ship.universeScreen.ScreenManager;
     this.SubRect = new Rectangle(this.ComponentRect.X, this.ComponentRect.Y + 25, this.ComponentRect.Width, this.ComponentRect.Height - 25);
     this.OpsSubRect = new Rectangle(Escreen.OperationsRect.X + 20, this.ComponentRect.Y + 25, this.ComponentRect.Width, this.ComponentRect.Height - 25);
     Submenu sub = new Submenu(this.ScreenManager, this.ComponentRect);
     this.AgentSL = new ScrollList(sub, 40);
     foreach (Agent agent in EmpireManager.GetEmpireByName(Ship.universeScreen.PlayerLoyalty).data.AgentList)
     {
         this.AgentSL.AddItem(agent);
     }
     Rectangle c = this.ComponentRect;
     c.X = this.OpsSubRect.X;
     Submenu opssub = new Submenu(this.ScreenManager, c);
     this.OpsSL = new ScrollList(opssub, 30);
     this.Training = new MissionEntry(AgentMission.Training, this);
     this.Infiltrate = new MissionEntry(AgentMission.Infiltrate, this);
     this.Assassinate = new MissionEntry(AgentMission.Assassinate, this);
     this.Sabotage = new MissionEntry(AgentMission.Sabotage, this);
     this.StealTech = new MissionEntry(AgentMission.StealTech, this);
     this.StealShip = new MissionEntry(AgentMission.Robbery, this);
     this.InciteRebellion = new MissionEntry(AgentMission.InciteRebellion, this);
     this.OpsSL.AddItem(this.Training);
     this.OpsSL.AddItem(this.Infiltrate);
     this.OpsSL.AddItem(this.Assassinate);
     this.OpsSL.AddItem(this.Sabotage);
     this.OpsSL.AddItem(this.StealTech);
     this.OpsSL.AddItem(this.StealShip);
     this.OpsSL.AddItem(this.InciteRebellion);
     this.RecruitButton = new DanButton(new Vector2((float)(this.ComponentRect.X), (float)(this.ComponentRect.Y + this.ComponentRect.Height + 5f)), Localizer.Token(2179))
     {
         Toggled = true
     };
 }
 public override void LoadContent()
 {
     Rectangle shipDesignsRect = new Rectangle(base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth / 2 - 140, 100, 280, 500);
     this.sub_ships = new Submenu(base.ScreenManager, shipDesignsRect);
     this.ShipSL = new ScrollList(this.sub_ships, 40);
     this.sub_ships.AddTab("Refit to...");
     foreach (string shipname in this.shiptorefit.loyalty.ShipsWeCanBuild)
     {
         if (!(ResourceManager.ShipsDict[shipname].GetShipData().Hull == this.shiptorefit.GetShipData().Hull) || !(shipname != this.shiptorefit.Name) || ResourceManager.ShipRoles[ResourceManager.ShipsDict[shipname].Role].Protected)
         {
             continue;
         }
         this.ShipSL.AddItem(shipname);
     }
     this.ConfirmRefit = new DanButton(new Vector2((float)shipDesignsRect.X, (float)(shipDesignsRect.Y + 505)), "Do Refit");
     this.RefitOne = new UIButton()
     {
         Rect = new Rectangle(shipDesignsRect.X + 25, shipDesignsRect.Y + 505, 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"],
         Text = Localizer.Token(2265)
     };
     this.RefitAll = new UIButton()
     {
         Rect = new Rectangle(shipDesignsRect.X + 140, shipDesignsRect.Y + 505, 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"],
         Text = Localizer.Token(2266)
     };
     base.LoadContent();
 }
 public void SetVisible()
 {
     this.ShowQueue = new DanButton(this.ShowQueue.Pos, Localizer.Token(2136));
     this.Visible = true;
 }
 public void SetInvisible()
 {
     this.ShowQueue = new DanButton(this.ShowQueue.Pos, Localizer.Token(2135));
     this.Visible = false;
 }
 public void HandleInput(InputState input)
 {
     if (input.RightMouseClick && this.Visible && HelperFunctions.CheckIntersection(this.Queue, input.CursorPosition) || input.Escaped)
     {
         this.screen.ExitScreen();
         return;
     }
     this.screen.qcomponent.QSL.Update();
     this.screen.qcomponent.QSL.HandleInput(input);
     if (this.Visible)
     {
         int i = this.QSL.indexAtTop;
         while (i < this.QSL.Entries.Count && i < this.QSL.indexAtTop + this.QSL.entriesToDisplay)
         {
             if (!(this.QSL.Copied[i].item as ResearchQItem).HandleInput(input))
             {
                 i++;
             }
             else
             {
                 AudioManager.PlayCue("sd_ui_research_select");
                 break;
             }
         }
         if (this.CurrentResearch != null && this.CurrentResearch.HandleInput(input))
         {
             AudioManager.PlayCue("sd_ui_research_select");
         }
         if (this.ShowQueue.HandleInput(input))
         {
             this.ShowQueue = new DanButton(this.ShowQueue.Pos, Localizer.Token(2135));
             this.Visible = false;
             return;
         }
     }
     else if (this.ShowQueue.HandleInput(input))
     {
         this.ShowQueue = new DanButton(this.ShowQueue.Pos, Localizer.Token(2136));
         this.Visible = true;
     }
 }
 public override void LoadContent()
 {
     float screenWidth = (float)base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth;
     float screenHeight = (float)base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferHeight;
     Rectangle titleRect = new Rectangle((int)screenWidth / 2 - 200, 44, 400, 80);
     this.TitleBar = new Menu2(base.ScreenManager, titleRect);
     this.TitlePos = new Vector2((float)(titleRect.X + titleRect.Width / 2) - Fonts.Laserian14.MeasureString(Localizer.Token(6089)).X / 2f, (float)(titleRect.Y + titleRect.Height / 2 - Fonts.Laserian14.LineSpacing / 2));
     Rectangle leftRect = new Rectangle((int)screenWidth / 2 - 640, (screenHeight > 768f ? titleRect.Y + titleRect.Height + 5 : 44), 1280, 660);
     this.DMenu = new Menu2(base.ScreenManager, leftRect);
     this.close = new CloseButton(new Rectangle(leftRect.X + leftRect.Width - 40, leftRect.Y + 20, 20, 20));
     this.SelectedInfoRect = new Rectangle(leftRect.X + 60, leftRect.Y + 250, 368, 376);
     this.IntelligenceRect = new Rectangle(this.SelectedInfoRect.X + this.SelectedInfoRect.Width + 30, this.SelectedInfoRect.Y, 368, 376);
     this.OperationsRect = new Rectangle(this.IntelligenceRect.X + this.IntelligenceRect.Width + 30, this.SelectedInfoRect.Y, 368, 376);
     this.OpSLRect = new Rectangle(this.OperationsRect.X + 20, this.OperationsRect.Y + 20, this.OperationsRect.Width - 40, this.OperationsRect.Height - 45);
     Submenu OpSub = new Submenu(base.ScreenManager, this.OpSLRect);
     this.OperationsSL = new ScrollList(OpSub, Fonts.Arial12Bold.LineSpacing + 5);
     Vector2 ExecutePos = new Vector2((float)(this.OperationsRect.X + this.OperationsRect.Width / 2 - 91), (float)(this.OperationsRect.Y + this.OperationsRect.Height - 60));
     this.ExecuteOperation = new DanButton(ExecutePos, "Execute Op")
     {
         Toggled = true
     };
     Rectangle ComponentRect = new Rectangle(this.SelectedInfoRect.X + 20, this.SelectedInfoRect.Y + 35, this.SelectedInfoRect.Width - 40, this.SelectedInfoRect.Height - 95);
     this.AgentComponent = new Ship_Game.AgentComponent(ComponentRect, this);
     foreach (Empire e in EmpireManager.EmpireList)
     {
         if (e != EmpireManager.GetEmpireByName(this.screen.PlayerLoyalty))
         {
             if (e.isFaction || e.MinorRace)
             {
                 continue;
             }
             RaceEntry re = new RaceEntry()
             {
                 e = e
             };
             this.Races.Add(re);
         }
         else
         {
             RaceEntry re = new RaceEntry()
             {
                 e = e
             };
             this.SelectedEmpire = e;
             this.Races.Add(re);
         }
     }
     Vector2 Cursor = new Vector2(screenWidth / 2f - (float)(148 * this.Races.Count / 2), (float)(leftRect.Y + 10));
     int j = 0;
     foreach (RaceEntry re in this.Races)
     {
         re.container = new Rectangle((int)Cursor.X + 10 + j * 148, leftRect.Y + 40, 124, 148);
         j++;
     }
     Rectangle rectangle = new Rectangle();
     this.SpyBudgetSlider = new GenericSlider(rectangle, Localizer.Token(1637), 0f, 100f)
     {
         amount = 0f
     };
     Rectangle rectangle1 = new Rectangle();
     this.CounterSpySlider = new GenericSlider(rectangle1, Localizer.Token(1637), 0f, 100f)
     {
         amount = 0f
     };
     base.ScreenManager.racialMusic.SetVolume(0f);
 }
 public override void Draw(GameTime gameTime)
 {
     string str;
     string str1;
     if (this.pgs == null)
     {
         return;
     }
     if (this.pgs.TroopsHere.Count == 0 && this.pgs.building == null)
     {
         return;
     }
     MathHelper.SmoothStep(0f, 1f, base.TransitionPosition);
     Primitives2D.FillRectangle(this.ScreenManager.SpriteBatch, this.sel.Menu, Color.Black);
     float x = (float)Mouse.GetState().X;
     MouseState state = Mouse.GetState();
     Vector2 MousePos = new Vector2(x, (float)state.Y);
     Header slant = new Header(new Rectangle(this.sel.Menu.X, this.sel.Menu.Y, this.sel.Menu.Width, 41), (this.pgs.TroopsHere.Count > 0 ? this.pgs.TroopsHere[0].Name : Localizer.Token(this.pgs.building.NameTranslationIndex)));
     Body body = new Body(new Rectangle(slant.leftRect.X, this.sel.Menu.Y + 44, this.sel.Menu.Width, this.sel.Menu.Height - 44));
     slant.Draw(this.ScreenManager);
     body.Draw(this.ScreenManager);
     this.ScreenManager.SpriteBatch.Draw(ResourceManager.TextureDict["UI/icon_shield"], this.DefenseRect, Color.White);
     this.ScreenManager.SpriteBatch.Draw(ResourceManager.TextureDict["Ground_UI/Ground_Attack"], this.SoftAttackRect, Color.White);
     this.ScreenManager.SpriteBatch.Draw(ResourceManager.TextureDict["Ground_UI/attack_hard"], this.HardAttackRect, Color.White);
     bool Troop = false;
     if (this.pgs.TroopsHere.Count > 0)
     {
         Troop = true;
     }
     Vector2 defPos = new Vector2((float)(this.DefenseRect.X + this.DefenseRect.Width + 2), (float)(this.DefenseRect.Y + 11 - Fonts.Arial12Bold.LineSpacing / 2));
     this.ScreenManager.SpriteBatch.DrawString(Fonts.Arial12Bold, (Troop ? this.pgs.TroopsHere[0].Strength.ToString(this.fmt) : this.pgs.building.Strength.ToString()), defPos, Color.White);
     defPos = new Vector2((float)(this.DefenseRect.X + this.DefenseRect.Width + 2), (float)(this.SoftAttackRect.Y + 8 - Fonts.Arial12Bold.LineSpacing / 2));
     SpriteBatch spriteBatch = this.ScreenManager.SpriteBatch;
     SpriteFont arial12Bold = Fonts.Arial12Bold;
     if (Troop)
     {
         int softAttack = this.pgs.TroopsHere[0].GetSoftAttack();
         str = softAttack.ToString(this.fmt);
     }
     else
     {
         str = this.pgs.building.SoftAttack.ToString();
     }
     spriteBatch.DrawString(arial12Bold, str, defPos, Color.White);
     defPos = new Vector2((float)(this.DefenseRect.X + this.DefenseRect.Width + 2), (float)(this.HardAttackRect.Y + 8 - Fonts.Arial12Bold.LineSpacing / 2));
     SpriteBatch spriteBatch1 = this.ScreenManager.SpriteBatch;
     SpriteFont spriteFont = Fonts.Arial12Bold;
     if (Troop)
     {
         int hardAttack = this.pgs.TroopsHere[0].GetHardAttack();
         str1 = hardAttack.ToString(this.fmt);
     }
     else
     {
         str1 = this.pgs.building.HardAttack.ToString();
     }
     spriteBatch1.DrawString(spriteFont, str1, defPos, Color.White);
     if (!Troop)
     {
         this.ItemDisplayRect = new Rectangle(this.LeftRect.X + 85 + 16, this.LeftRect.Y + 5 + 16, 64, 64);
         this.ScreenManager.SpriteBatch.Draw(ResourceManager.TextureDict[string.Concat("Buildings/icon_", this.pgs.building.Icon, "_64x64")], this.ItemDisplayRect, Color.White);
     }
     else
     {
         this.ItemDisplayRect = new Rectangle(this.LeftRect.X + 85 + 16, this.LeftRect.Y + 5 + 16, 64, 64);
         this.pgs.TroopsHere[0].Draw(this.ScreenManager.SpriteBatch, this.ItemDisplayRect);
         if (this.pgs.TroopsHere[0].GetOwner() != EmpireManager.GetEmpireByName(this.screen.PlayerLoyalty))
         {
             this.LaunchTroop = null;
         }
         else
         {
             this.LaunchTroop = new DanButton(new Vector2((float)(slant.leftRect.X + 5), (float)(this.ElementRect.Y + this.ElementRect.Height + 15)), string.Concat(Localizer.Token(1435), (this.pgs.TroopsHere[0].AvailableMoveActions >= 1 ? "" : string.Concat(" (", this.pgs.TroopsHere[0].MoveTimer.ToString("0"), ")"))));
             this.LaunchTroop.DrawBlue(this.ScreenManager);
         }
         if (this.pgs.TroopsHere[0].Level > 0)
         {
             for (int i = 0; i < this.pgs.TroopsHere[0].Level; i++)
             {
                 Rectangle star = new Rectangle(this.LeftRect.X + this.LeftRect.Width - 20 - 12 * i, this.LeftRect.Y + 12, 12, 11);
                 if (HelperFunctions.CheckIntersection(star, MousePos))
                 {
                     ToolTip.CreateTooltip(127, this.ScreenManager);
                 }
                 this.ScreenManager.SpriteBatch.Draw(ResourceManager.TextureDict["UI/icon_star"], star, Color.White);
             }
         }
     }
     Vector2 drawCurs = new Vector2((float)this.DefenseRect.X, (float)this.HardAttackRect.Y);
     for (int i = this.DescriptionSL.indexAtTop; i < this.DescriptionSL.Entries.Count && i < this.DescriptionSL.indexAtTop + this.DescriptionSL.entriesToDisplay; i++)
     {
         ScrollList.Entry e = this.DescriptionSL.Entries[i];
         drawCurs.Y = (float)e.clickRect.Y;
         string t1 = e.item as string;
         this.ScreenManager.SpriteBatch.DrawString(Fonts.Arial12, t1, drawCurs, Color.White);
     }
     this.DescriptionSL.Draw(this.ScreenManager.SpriteBatch);
 }
 public override void LoadContent()
 {
     base.ScreenManager.inter.ObjectManager.Clear();
     PrimitiveQuad.graphicsDevice = base.ScreenManager.GraphicsDevice;
     this.aspect = new Vector2((float)base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth, (float)base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferHeight);
     this.border = new PrimitiveQuad(this.aspect.X / 2f - 512f, this.aspect.Y / 2f - 512f, 1024f, 1024f);
     this.what = this.border.enclosingRect;
     ToggleButton Internal = new ToggleButton(new Rectangle(this.what.X - 32, this.what.Y + 5, 24, 24), "SelectionBox/button_formation_active", "SelectionBox/button_formation_inactive", "SelectionBox/button_formation_hover", "SelectionBox/button_formation_press", "I");
     this.DesignStateButtons.Add(Internal);
     Internal.Action = "I";
     ToggleButton InternalO = new ToggleButton(new Rectangle(this.what.X - 32, this.what.Y + 5 + 29, 24, 24), "SelectionBox/button_formation_active", "SelectionBox/button_formation_inactive", "SelectionBox/button_formation_hover", "SelectionBox/button_formation_press", "IO");
     this.DesignStateButtons.Add(InternalO);
     InternalO.Action = "IO";
     ToggleButton External = new ToggleButton(new Rectangle(this.what.X - 32, this.what.Y + 5 + 58, 24, 24), "SelectionBox/button_formation_active", "SelectionBox/button_formation_inactive", "SelectionBox/button_formation_hover", "SelectionBox/button_formation_press", "O");
     this.DesignStateButtons.Add(External);
     External.Action = "O";
     ToggleButton Engines = new ToggleButton(new Rectangle(this.what.X - 32, this.what.Y + 5 + 87, 24, 24), "SelectionBox/button_formation_active", "SelectionBox/button_formation_inactive", "SelectionBox/button_formation_hover", "SelectionBox/button_formation_press", "E");
     this.DesignStateButtons.Add(Engines);
     Engines.Action = "E";
     this.ModuleSlotTexture = base.ScreenManager.Content.Load<Texture2D>("Textures/Ships/singlebox");
     this.LoadModelButton = new DanButton(new Vector2(20f, (float)(base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferHeight - 50)), "Load Model");
     this.SaveHullButton = new DanButton(new Vector2((float)(base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth - 200), (float)(base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferHeight - 50)), "Save Hull");
     this.ShipNameBox = new UITextEntry()
     {
         ClickableArea = new Rectangle(base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth - 200, base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferHeight - 115, 180, 20),
         Text = this.HullName
     };
     LightRig rig = base.ScreenManager.Content.Load<LightRig>("example/ShipyardLightrig");
     base.ScreenManager.inter.LightManager.Clear();
     base.ScreenManager.inter.LightManager.Submit(rig);
     base.ScreenManager.environment = base.ScreenManager.Content.Load<SceneEnvironment>("example/scene_environment");
     float width = (float)base.ScreenManager.GraphicsDevice.Viewport.Width;
     Viewport viewport = base.ScreenManager.GraphicsDevice.Viewport;
     float aspectRatio = width / (float)viewport.Height;
     Vector3 camPos = this.cameraPosition * new Vector3(-1f, 1f, 1f);
     this.view = ((Matrix.CreateTranslation(0f, 0f, 0f) * Matrix.CreateRotationY(MathHelper.ToRadians(180f))) * Matrix.CreateRotationX(MathHelper.ToRadians(0f))) * Matrix.CreateLookAt(camPos, new Vector3(camPos.X, camPos.Y, 0f), new Vector3(0f, -1f, 0f));
     this.projection = Matrix.CreatePerspectiveFieldOfView(0.7853982f, aspectRatio, 1f, 10000f);
     this.moduleSlot = base.ScreenManager.Content.Load<Texture2D>("Textures/Ships/singlebox");
     this.DottedLine = base.ScreenManager.Content.Load<Texture2D>("Textures/UI/DottedLine");
     this.Center = new Vector2((float)(base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth / 2), (float)(base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferHeight / 2));
     this.ConfigureSlots();
     this.ThrusterEffect = base.ScreenManager.Content.Load<Effect>("Effects/Thrust");
     this.thruster = new Thruster();
     this.ScreenRect = new Rectangle(0, 0, base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth, base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferHeight);
     this.thruster.load_and_assign_effects(base.ScreenManager.Content, "Effects/ThrustCylinderB", "Effects/NoiseVolume", this.ThrusterEffect);
     base.LoadContent();
 }
 public override void LoadContent()
 {
     this.BlackBar = new Rectangle(0, base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferHeight - 70, 2000, 70);
     this.bottom_sep = new Rectangle(this.BlackBar.X, this.BlackBar.Y, this.BlackBar.Width, 1);
     this.HullSelectionRect = new Rectangle(base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth - 285, 100, 280, 400);
     this.hullSelectionSub = new Submenu(base.ScreenManager, this.HullSelectionRect, true);
     this.Fleets = new DanButton(new Vector2(21f, (float)(base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferHeight - 47)), "Fleets")
     {
         IsToggle = true,
         Toggled = true,
         ToggledText = "Fleets"
     };
     this.ShipList = new DanButton(new Vector2((float)(66 + this.Fleets.r.Width), (float)(base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferHeight - 47)), "Unlocks")
     {
         IsToggle = true,
         Toggled = true,
         ToggledText = "Ships List"
     };
     this.Shipyard = new DanButton(new Vector2((float)(66 + this.Fleets.r.Width + 45 + this.Fleets.r.Width), (float)(base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferHeight - 47)), "Shipyard")
     {
         IsToggle = true,
         ToggledText = "Shipyard"
     };
     this.SearchBar = new Rectangle(base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth - 585, this.Fleets.r.Y, 320, 25);
 }
 public override void LoadContent()
 {
     float screenWidth = (float)base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth;
     float screenHeight = (float)base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferHeight;
     Rectangle titleRect = new Rectangle((int)screenWidth / 2 - 200, 44, 400, 80);
     this.TitleBar = new Menu2(base.ScreenManager, titleRect);
     this.TitlePos = new Vector2((float)(titleRect.X + titleRect.Width / 2) - Fonts.Laserian14.MeasureString(Localizer.Token(1600)).X / 2f, (float)(titleRect.Y + titleRect.Height / 2 - Fonts.Laserian14.LineSpacing / 2));
     Rectangle leftRect = new Rectangle((int)screenWidth / 2 - 640, (screenHeight > 768f ? titleRect.Y + titleRect.Height + 5 : 44), 1280, 660);
     this.DMenu = new Menu2(base.ScreenManager, leftRect);
     this.close = new CloseButton(new Rectangle(leftRect.X + leftRect.Width - 40, leftRect.Y + 20, 20, 20));
     this.SelectedInfoRect = new Rectangle(leftRect.X + 60, leftRect.Y + 250, 368, 376);
     this.IntelligenceRect = new Rectangle(this.SelectedInfoRect.X + this.SelectedInfoRect.Width + 30, this.SelectedInfoRect.Y, 368, 376);
     this.OperationsRect = new Rectangle(this.IntelligenceRect.X + this.IntelligenceRect.Width + 30, this.SelectedInfoRect.Y, 368, 376);
     this.ArtifactsRect = new Rectangle(this.SelectedInfoRect.X + 20, this.SelectedInfoRect.Y + 180, this.SelectedInfoRect.Width - 40, 130);
     Submenu ArtifactsSub = new Submenu(base.ScreenManager, this.ArtifactsRect);
     this.ArtifactsSL = new ScrollList(ArtifactsSub, 40);
     this.Contact = new DanButton(new Vector2((float)(this.SelectedInfoRect.X + this.SelectedInfoRect.Width / 2 - 91), (float)(this.SelectedInfoRect.Y + this.SelectedInfoRect.Height - 45)), Localizer.Token(1644))
     {
         Toggled = true
     };
     foreach (Empire e in EmpireManager.EmpireList)
     {
         if (e != EmpireManager.GetEmpireByName(this.screen.PlayerLoyalty))
         {
             if (e.isFaction || e.MinorRace)
             {
                 continue;
             }
             RaceEntry re = new RaceEntry()
             {
                 e = e
             };
             this.Races.Add(re);
         }
         else
         {
             RaceEntry re = new RaceEntry()
             {
                 e = e
             };
             this.SelectedEmpire = e;
             this.ArtifactsSL.Entries.Clear();
             this.ArtifactsSL.indexAtTop = 0;
             ArtifactEntry entry = new ArtifactEntry();
             for (int i = 0; i < e.data.OwnedArtifacts.Count; i++)
             {
                 Artifact art = e.data.OwnedArtifacts[i];
                 SkinnableButton button = new SkinnableButton(new Rectangle(0, 0, 32, 32), string.Concat("Artifact Icons/", art.Name))
                 {
                     IsToggle = false,
                     ReferenceObject = art,
                     BaseColor = Color.White
                 };
                 if (entry.ArtifactButtons.Count < 5)
                 {
                     entry.ArtifactButtons.Add(button);
                 }
                 if (entry.ArtifactButtons.Count == 5 || i == e.data.OwnedArtifacts.Count - 1)
                 {
                     this.ArtifactsSL.AddItem(entry);
                     entry = new ArtifactEntry();
                 }
             }
             this.Races.Add(re);
         }
     }
     Vector2 Cursor = new Vector2(screenWidth / 2f - (float)(148 * this.Races.Count / 2), (float)(leftRect.Y + 10));
     int j = 0;
     foreach (RaceEntry re in this.Races)
     {
         re.container = new Rectangle((int)Cursor.X + 10 + j * 148, leftRect.Y + 40, 124, 148);
         j++;
     }
     base.ScreenManager.racialMusic.SetVolume(0f);
 }