public override void Draw(GameTime gameTime) { this.spriteBatch = base.ScreenManager.SpriteBatch; base.ScreenManager.sceneState.BeginFrameRendering(this.view, this.projection, gameTime, base.ScreenManager.environment, true); base.ScreenManager.editor.BeginFrameRendering(base.ScreenManager.sceneState); base.ScreenManager.inter.BeginFrameRendering(base.ScreenManager.sceneState); base.ScreenManager.GraphicsDevice.Clear(Color.Black); if (this.applyThruster) { this.thruster.draw(ref this.view, ref this.projection, this.ThrusterEffect); } base.ScreenManager.inter.RenderManager.Render(); Rectangle rectangle = new Rectangle(this.border.X, this.border.Y, 512, 512); this.spriteBatch.Begin(); Vector2 TitlePos = new Vector2(20f, 20f); HelperFunctions.DrawDropShadowText(base.ScreenManager, "Ship Mod Tools", TitlePos, Fonts.Arial20Bold); TitlePos.Y = TitlePos.Y + (float)(Fonts.Arial20Bold.LineSpacing + 3); base.ScreenManager.SpriteBatch.DrawString(Fonts.Arial12Bold, "Use this tool to create module patterns for your ships", TitlePos, Color.White); if (this.shipSO != null) { TitlePos = new Vector2((float)this.what.X, 20f); SpriteBatch spriteBatch = base.ScreenManager.SpriteBatch; SpriteFont arial12Bold = Fonts.Arial12Bold; float radius = this.shipSO.WorldBoundingSphere.Radius; spriteBatch.DrawString(arial12Bold, string.Concat("Radius: ", radius.ToString()), TitlePos, Color.White); TitlePos.Y = TitlePos.Y + 20f; string text = "If you can't see your model then your radius is likely too big or too small. A radius of 512 will fit snugly inside the box. Change the scale when you compile the model. If it is rotated oddly change the X, Y, and Z axis. If the model is off-center then you will need to re-export the 3D model from Blender, making sure to Set Origin to the desired pivot point of your model"; base.ScreenManager.SpriteBatch.DrawString(Fonts.Arial12Bold, HelperFunctions.parseText(Fonts.Arial12, text, 600f), TitlePos, Color.White); } Vector2 WhichSelectionPos = new Vector2((float)this.what.X, (float)(this.what.Y - Fonts.Arial20Bold.LineSpacing)); this.spriteBatch.DrawString(Fonts.Arial20Bold, string.Concat(this.DesignState, " - ", this.GetDesignStateText()), WhichSelectionPos, Color.Orange); WhichSelectionPos.X = WhichSelectionPos.X + 150f; WhichSelectionPos.Y = WhichSelectionPos.Y + (float)Fonts.Arial20Bold.LineSpacing; WhichSelectionPos.Y = WhichSelectionPos.Y - Fonts.Arial12Bold.MeasureString(HelperFunctions.parseText(Fonts.Arial12Bold, this.DescriptionOfState, 512f)).Y; Primitives2D.DrawRectangle(base.ScreenManager.SpriteBatch, this.what, Color.White); foreach (SlotStruct slot in this.SlotList) { if (!this.applyThruster && slot.pq.isFilled) { this.spriteBatch.Draw(this.moduleSlot, slot.pq.enclosingRect, Color.White); this.spriteBatch.DrawString(Fonts.Arial20Bold, string.Concat(" ", slot.Restrictions), new Vector2((float)slot.pq.enclosingRect.X, (float)slot.pq.enclosingRect.Y), Color.Navy, 0f, Vector2.Zero, 0.4f, SpriteEffects.None, 1f); } if (this.applyThruster || slot.ModuleUID == null) { continue; } if (slot.module.XSIZE > 1 || slot.module.YSIZE > 1) { this.spriteBatch.Draw(slot.tex, new Rectangle(slot.pq.enclosingRect.X, slot.pq.enclosingRect.Y, 16 * slot.module.XSIZE, 16 * slot.module.YSIZE), Color.White); } else { this.spriteBatch.Draw(slot.tex, slot.pq.enclosingRect, Color.White); } } this.DrawHorizontalLine(this.SelectionBox.Y); this.DrawHorizontalLine(this.SelectionBox.Y + this.SelectionBox.Height); this.DrawVerticalLine(this.SelectionBox.X); this.DrawVerticalLine(this.SelectionBox.X + this.SelectionBox.Width); foreach (ToggleButton button in this.DesignStateButtons) { button.Draw(base.ScreenManager); } if (this.ActiveModule != null) { this.spriteBatch.Draw(Ship_Game.ResourceManager.TextureDict[Ship_Game.ResourceManager.ShipModulesDict[this.ActiveModule.UID].IconTexturePath], new Rectangle(this.mouseStateCurrent.X, this.mouseStateCurrent.Y, 16 * this.ActiveModule.XSIZE, 16 * this.ActiveModule.YSIZE), Color.White); for (int i = 0; i < this.ActiveModule.XSIZE; i++) { for (int j = 0; j < this.ActiveModule.YSIZE; j++) { PrimitiveQuad pq = new PrimitiveQuad(new Rectangle(this.mouseStateCurrent.X + i * 16, this.mouseStateCurrent.Y + j * 16, 16, 16)); pq.Draw(this.spriteBatch, Color.White); } } } Vector2 InfoPos = new Vector2((float)(this.SaveHullButton.r.X - 50), (float)(this.SaveHullButton.r.Y - 20)); base.ScreenManager.SpriteBatch.DrawString(Fonts.Arial12Bold, "Hulls are saved to StarDrive/Ship Tools", InfoPos, Color.White); this.ShipNameBox.Draw(Fonts.Arial20Bold, base.ScreenManager.SpriteBatch, new Vector2((float)this.ShipNameBox.ClickableArea.X, (float)this.ShipNameBox.ClickableArea.Y), gameTime, Color.Orange); this.SaveHullButton.Draw(base.ScreenManager); this.LoadModelButton.Draw(base.ScreenManager); this.spriteBatch.End(); base.ScreenManager.inter.EndFrameRendering(); base.ScreenManager.editor.EndFrameRendering(); base.ScreenManager.sceneState.EndFrameRendering(); }