public ResearchQItem(Vector2 Position, TreeNode Node, ResearchScreenNew screen)
 {
     this.pos = Position;
     this.screen = screen;
     this.container = new Rectangle((int)Position.X, (int)Position.Y, 320, 110);
     this.Node = new TreeNode(new Vector2((float)this.container.X, (float)this.container.Y) + new Vector2(100f, 20f), Node.tech, screen);
     this.Up = new Rectangle(this.container.X + 15, this.container.Y + this.container.Height / 2 - 33, 30, 30);
     this.Down = new Rectangle(this.container.X + 15, this.container.Y + this.container.Height / 2 - 33 + 36, 30, 30);
     this.Cancel = new Rectangle(this.container.X + 15 + 30 + 12, this.container.Y + this.container.Height / 2 - 15, 30, 30);
     this.bup = new TexturedButton(this.Up, "ResearchMenu/button_queue_up", "ResearchMenu/button_queue_up_hover", "ResearchMenu/button_queue_up_press");
     this.bdown = new TexturedButton(this.Down, "ResearchMenu/button_queue_down", "ResearchMenu/button_queue_down_hover", "ResearchMenu/button_queue_down_press");
     this.bcancel = new TexturedButton(this.Cancel, "ResearchMenu/button_queue_cancel", "ResearchMenu/button_queue_cancel_hover", "ResearchMenu/button_queue_cancel_press");
 }
        public ShipListScreenEntry(Ship s, int x, int y, int width1, int height, ShipListScreen caller)
        {
            this.screen = caller;
            this.ship = s;
            this.TotalEntrySize = new Rectangle(x, y, width1 - 60, height);
            this.SysNameRect = new Rectangle(x, y, (int)((float)this.TotalEntrySize.Width * 0.10f), height);
            this.ShipNameRect = new Rectangle(x + this.SysNameRect.Width, y, (int)((float)this.TotalEntrySize.Width * 0.175f), height);
            this.RoleRect = new Rectangle(x + this.SysNameRect.Width + this.ShipNameRect.Width, y, (int)((float)this.TotalEntrySize.Width * 0.05f), height);
            this.OrdersRect = new Rectangle(x + this.SysNameRect.Width + this.ShipNameRect.Width + this.RoleRect.Width, y, (int)((float)this.TotalEntrySize.Width * 0.175f), height);
            this.RefitRect = new Rectangle(this.OrdersRect.X + this.OrdersRect.Width, y, 125, height);
            this.STRRect = new Rectangle(this.RefitRect.X + this.RefitRect.Width, y, 60, height);
            this.MaintRect = new Rectangle(this.STRRect.X + this.STRRect.Width, y, 60, height);
            this.TroopRect = new Rectangle(this.MaintRect.X + this.MaintRect.Width, y, 60, height);
            this.FTLRect = new Rectangle(this.TroopRect.X + this.TroopRect.Width, y, 60, height);
            this.STLRect = new Rectangle(this.FTLRect.X + this.FTLRect.Width, y, 60, height);
            this.Status_Text = ShipListScreenEntry.GetStatusText(this.ship);
            this.ShipIconRect = new Rectangle(this.ShipNameRect.X + 5, this.ShipNameRect.Y + 2, 28, 28);
            string shipName = (!string.IsNullOrEmpty(this.ship.VanityName) ? this.ship.VanityName : this.ship.Name);
            this.ShipNameEntry.ClickableArea = new Rectangle(this.ShipIconRect.X + this.ShipIconRect.Width + 10, 2 + this.SysNameRect.Y + this.SysNameRect.Height / 2 - Fonts.Arial20Bold.LineSpacing / 2, (int)Fonts.Arial20Bold.MeasureString(shipName).X, Fonts.Arial20Bold.LineSpacing);
            this.ShipNameEntry.Text = shipName;
            float width = (float)((int)((float)this.OrdersRect.Width * 0.8f));
            while (width % 10f != 0f)
            {
                width = width + 1f;
            }

            Rectangle refit = new Rectangle(this.RefitRect.X + this.RefitRect.Width / 2 - 5 - ResourceManager.TextureDict["NewUI/icon_queue_rushconstruction_hover1"].Width, this.RefitRect.Y + this.RefitRect.Height / 2 - ResourceManager.TextureDict["NewUI/icon_queue_rushconstruction_hover2"].Height / 2, ResourceManager.TextureDict["NewUI/icon_queue_rushconstruction_hover2"].Width, ResourceManager.TextureDict["NewUI/icon_queue_rushconstruction_hover2"].Height);

            this.ExploreButton = new TexturedButton(refit, "NewUI/icon_order_explore", "NewUI/icon_order_explore_hover1", "NewUI/icon_order_explore_hover2");
            this.PatrolButton = new TexturedButton(refit, "NewUI/icon_order_patrol", "NewUI/icon_order_patrol_hover1", "NewUI/icon_order_patrol_hover2");
            this.RefitButton = new TexturedButton(refit, "NewUI/icon_queue_rushconstruction", "NewUI/icon_queue_rushconstruction_hover1", "NewUI/icon_queue_rushconstruction_hover2");
            this.ScrapButton = new TexturedButton(refit, "NewUI/icon_queue_delete", "NewUI/icon_queue_delete_hover1", "NewUI/icon_queue_delete_hover2");

            if (this.ship.Role == "station" || this.ship.Role == "platform" || this.ship.Thrust <= 0f)
            {
                this.isScuttle = true;
            }
        }