private Rectangle doListingScreenBackground(Rectangle bounds, SpriteBatch sb) { var destinationRectangle1 = new Rectangle(bounds.X + 1, bounds.Y + 1, bounds.Width - 2, bounds.Height - 2); sb.Draw(Utils.white, destinationRectangle1, themeColorBackground); doLoggedInScreenDetailing(bounds, sb); destinationRectangle1.Height = 5; destinationRectangle1.Width = 0; destinationRectangle1.Y += 12; if (thinBarcodeTop == null) { thinBarcodeTop = new ThinBarcode(bounds.Width - 4, 5); } if (thinBarcodeBot == null) { thinBarcodeBot = new ThinBarcode(bounds.Width - 4, 5); } thinBarcodeTop.Draw(sb, destinationRectangle1.X, destinationRectangle1.Y, themeColor); TextItem.doFontLabel(new Vector2(bounds.X + 20, destinationRectangle1.Y + 10), "MISSION LISTING", GuiData.titlefont, themeColor, bounds.Width - 40, 35f); destinationRectangle1.Y += 45; destinationRectangle1.X = bounds.X + 1; thinBarcodeBot.Draw(sb, destinationRectangle1.X, destinationRectangle1.Y, themeColor); destinationRectangle1.Y += 10; destinationRectangle1.X = bounds.X + 1; destinationRectangle1.Width = decorationPanel.Width; destinationRectangle1.Height = decorationPanel.Height; sb.Draw(decorationPanel, destinationRectangle1, themeColor); destinationRectangle1.X += destinationRectangle1.Width; destinationRectangle1.Width = bounds.Width - 2 - destinationRectangle1.Width; sb.Draw(decorationPanelSide, destinationRectangle1, themeColor); var pos = new Vector2(bounds.X + 6, destinationRectangle1.Y + decorationPanel.Height / 2 - 8); var height = (int)(decorationPanel.Height * 0.300000011920929); var num1 = (float)((decorationPanel.Height - (double)height) / 2.0); var destinationRectangle2 = new Rectangle(bounds.X + 1, (int)(destinationRectangle1.Y + (double)num1), decorationPanel.Width, height); var rectangle = new Rectangle(0, (int)((decorationPanel.Height - (double)height) / 2.0), decorationPanel.Width, height); var flag1 = Button.outlineOnly; var flag2 = Button.drawingOutline; Button.outlineOnly = true; Button.drawingOutline = false; var myID = 974748322; var color = GuiData.active == myID ? Color.Black : (GuiData.hot == myID ? themeColorLine : themeColorBackground); sb.Draw(decorationPanel, destinationRectangle2, rectangle, color, 0.0f, Vector2.Zero, SpriteEffects.None, 0.6f); if (Button.doButton(myID, bounds.X + 1, destinationRectangle1.Y + decorationPanel.Height / 6 + 4, decorationPanel.Width - 30, (int)(decorationPanel.Height - decorationPanel.Height / 6 * 3.20000004768372), "Back", Color.Transparent)) { screenTransition = 1f; state = HubState.Menu; } Button.outlineOnly = flag1; Button.drawingOutline = flag2; pos.X += decorationPanel.Width - 10; pos.Y += 4f; var text1 = "CSEC secure contract listing panel : Verified Connection : Token last verfied " + DateTime.Now; TextItem.doFontLabel(pos, text1, GuiData.detailfont, themeColor, destinationRectangle1.Width - 10f, 14f); pos.Y += 12f; if (missionListPageNumber > 0 && Button.doButton(188278101, (int)pos.X, (int)pos.Y, 45, 20, "<", new Color?())) { --missionListPageNumber; screenTransition = 1f; } destinationRectangle1.X += 50; var num2 = listingsFolder.files.Count / missionListDisplayed + 1; var text2 = (missionListPageNumber + 1).ToString() + "/" + num2; var num3 = (float)(50.0 - GuiData.smallfont.MeasureString(text2).X / 2.0); sb.DrawString(GuiData.smallfont, text2, new Vector2(destinationRectangle1.X + num3, (int)pos.Y + 1), Color.White); destinationRectangle1.X += 100; if (missionListPageNumber < num2 - 1 && Button.doButton(188278102, destinationRectangle1.X, (int)pos.Y, 45, 20, ">", new Color?())) { ++missionListPageNumber; screenTransition = 1f; } destinationRectangle1.Y += decorationPanel.Height + 4; destinationRectangle1.Width = bounds.Width - 2; destinationRectangle1.X = bounds.X + 1; destinationRectangle1.Height = 7; sb.Draw(Utils.white, destinationRectangle1, themeColor); destinationRectangle1.Y += destinationRectangle1.Height; return(new Rectangle(bounds.X, destinationRectangle1.Y, bounds.Width, bounds.Height - bounds.Height / 12 - (destinationRectangle1.Y - bounds.Y))); }
private Rectangle doListingScreenBackground(Rectangle bounds, SpriteBatch sb) { Rectangle destinationRectangle1 = new Rectangle(bounds.X + 1, bounds.Y + 1, bounds.Width - 2, bounds.Height - 2); sb.Draw(Utils.white, destinationRectangle1, this.themeColorBackground); this.doLoggedInScreenDetailing(bounds, sb); destinationRectangle1.Height = 5; destinationRectangle1.Width = 0; destinationRectangle1.Y += 12; if (this.thinBarcodeTop == null) { this.thinBarcodeTop = new ThinBarcode(bounds.Width - 4, 5); } if (this.thinBarcodeBot == null) { this.thinBarcodeBot = new ThinBarcode(bounds.Width - 4, 5); } this.thinBarcodeTop.Draw(sb, destinationRectangle1.X, destinationRectangle1.Y, this.themeColor); TextItem.doFontLabel(new Vector2((float)(bounds.X + 20), (float)(destinationRectangle1.Y + 10)), "MISSION LISTING", GuiData.titlefont, new Color?(this.themeColor), (float)(bounds.Width - 40), 35f, false); destinationRectangle1.Y += 45; destinationRectangle1.X = bounds.X + 1; this.thinBarcodeBot.Draw(sb, destinationRectangle1.X, destinationRectangle1.Y, this.themeColor); destinationRectangle1.Y += 10; destinationRectangle1.X = bounds.X + 1; destinationRectangle1.Width = this.decorationPanel.Width; destinationRectangle1.Height = this.decorationPanel.Height; sb.Draw(this.decorationPanel, destinationRectangle1, this.themeColor); destinationRectangle1.X += destinationRectangle1.Width; destinationRectangle1.Width = bounds.Width - 2 - destinationRectangle1.Width; sb.Draw(this.decorationPanelSide, destinationRectangle1, this.themeColor); Vector2 pos = new Vector2((float)(bounds.X + 6), (float)(destinationRectangle1.Y + this.decorationPanel.Height / 2 - 8)); int height = (int)((double)this.decorationPanel.Height * 0.300000011920929); float num1 = (float)(((double)this.decorationPanel.Height - (double)height) / 2.0); Rectangle destinationRectangle2 = new Rectangle(bounds.X + 1, (int)((double)destinationRectangle1.Y + (double)num1), this.decorationPanel.Width, height); Rectangle rectangle = new Rectangle(0, (int)(((double)this.decorationPanel.Height - (double)height) / 2.0), this.decorationPanel.Width, height); bool outlineOnly = Button.outlineOnly; bool drawingOutline = Button.drawingOutline; Button.outlineOnly = true; Button.drawingOutline = false; int myID = 974748322; Color color = GuiData.active == myID ? Color.Black : (GuiData.hot == myID ? this.themeColorLine : this.themeColorBackground); sb.Draw(this.decorationPanel, destinationRectangle2, new Rectangle?(rectangle), color, 0.0f, Vector2.Zero, SpriteEffects.None, 0.6f); if (Button.doButton(myID, bounds.X + 1, destinationRectangle1.Y + this.decorationPanel.Height / 6 + 4, this.decorationPanel.Width - 30, (int)((double)this.decorationPanel.Height - (double)(this.decorationPanel.Height / 6) * 3.20000004768372), LocaleTerms.Loc("Back"), new Color?(Color.Transparent))) { this.screenTransition = 1f; this.state = MissionHubServer.HubState.Menu; } Button.outlineOnly = outlineOnly; Button.drawingOutline = drawingOutline; pos.X += (float)(this.decorationPanel.Width - 10); pos.Y += 4f; string text1 = LocaleTerms.Loc(this.groupName + " secure contract listing panel : Verified Connection : Token last verified") + " " + DateTime.Now.ToString(); TextItem.doFontLabel(pos, text1, GuiData.detailfont, new Color?(this.themeColor), (float)destinationRectangle1.Width - 10f, 14f, false); pos.Y += 12f; if (this.missionListPageNumber > 0 && Button.doButton(188278101, (int)pos.X, (int)pos.Y, 45, 20, "<", new Color?())) { --this.missionListPageNumber; this.screenTransition = 1f; } destinationRectangle1.X += 50; int num2 = this.listingsFolder.files.Count / this.missionListDisplayed + 1; string text2 = (this.missionListPageNumber + 1).ToString() + "/" + (object)num2; float num3 = (float)(50.0 - (double)GuiData.smallfont.MeasureString(text2).X / 2.0); sb.DrawString(GuiData.smallfont, text2, new Vector2((float)destinationRectangle1.X + num3, (float)((int)pos.Y + 1)), Color.White); destinationRectangle1.X += 100; if (this.missionListPageNumber < num2 - 1 && Button.doButton(188278102, destinationRectangle1.X, (int)pos.Y, 45, 20, ">", new Color?())) { ++this.missionListPageNumber; this.screenTransition = 1f; } destinationRectangle1.Y += this.decorationPanel.Height + 4; destinationRectangle1.Width = bounds.Width - 2; destinationRectangle1.X = bounds.X + 1; destinationRectangle1.Height = 7; sb.Draw(Utils.white, destinationRectangle1, this.themeColor); destinationRectangle1.Y += destinationRectangle1.Height; return(new Rectangle(bounds.X, destinationRectangle1.Y, bounds.Width, bounds.Height - bounds.Height / 12 - (destinationRectangle1.Y - bounds.Y))); }