private void DrawHeaders(Rectangle dest, SpriteBatch sb) { if (barcodeEffect == null) { barcodeEffect = new BarcodeEffect(bounds.Width - 4, false, false); } barcodeEffect.Update((float)os.lastGameTime.ElapsedGameTime.TotalSeconds); barcodeEffect.Draw(dest.X, dest.Y, dest.Width - 4, Math.Min(30, bounds.Height - PANEL_HEIGHT), sb, themeColor); if (bounds.Height <= PANEL_HEIGHT + 60) { return; } TextItem.doFontLabel(new Vector2(dest.X + 2, dest.Y + 32), "Themechanger", GuiData.font, Utils.AddativeWhite * 0.8f, bounds.Width - 80, 30f); var width = 60; if ( !Button.doButton(PID + 228173, bounds.X + bounds.Width - width - 2, dest.Y + 38, width, 20, "Exit", os.lockedColor)) { return; } isExiting = true; }
public override void Draw(float t) { base.Draw(t); drawOutline(); drawTarget("app:"); DrawEffect(t); if (bounds.Height > 100) { var dest = new Rectangle(bounds.X + 1, bounds.Y + 60, (int)(bounds.Width * 0.7), 40); TextItem.doRightAlignedBackingLabelFill(dest, os.traceTracker.active ? "SUPPRESSION ACTIVE" : " SCANNING...", GuiData.titlefont, BoatBarColor, os.traceTracker.active ? Color.Lerp(Color.Red, os.brightLockedColor, Utils.rand(1f)) : Color.White * 0.8f); if (!os.traceTracker.active) { dest.Y += dest.Height + 2; dest.Height = 16; TextItem.doRightAlignedBackingLabel(dest, "TraceKill v0.8011", GuiData.detailfont, BoatBarColor, Color.DarkGray); } } if (bounds.Height <= 40) { return; } if (BotBarcode == null) { BotBarcode = new BarcodeEffect(bounds.Width - 2, true, false); } var maxHeight = 12; var height = 22; BotBarcode.Draw(bounds.X + 1, bounds.Y + bounds.Height - (maxHeight + height), bounds.Width - 2, maxHeight, spriteBatch, BoatBarColor); var destinationRectangle = new Rectangle(bounds.X + 1, bounds.Y + bounds.Height - height - 1, bounds.Width - 2, height); spriteBatch.Draw(Utils.white, destinationRectangle, BoatBarColor); var width = 130; if (Button.doButton(34004301, destinationRectangle.X + destinationRectangle.Width - width - 2, destinationRectangle.Y + 2, width, destinationRectangle.Height - 4, "EXIT", os.brightLockedColor)) { isExiting = true; } var dest1 = new Rectangle(destinationRectangle.X + 2, destinationRectangle.Y + 5, destinationRectangle.Width - width - 4, destinationRectangle.Height / 2); TextItem.doRightAlignedBackingLabel(dest1, traceActivityTimer.ToString("0.000000"), GuiData.detailfont, Color.Transparent, Color.White * 0.8f); dest1.Y += dest1.Height - 2; TextItem.doRightAlignedBackingLabel(dest1, os.connectedComp != null ? os.connectedComp.ip : "UNKNOWN", GuiData.detailfont, Color.Transparent, Color.White * 0.8f); }
private void doBaseBarcodeEffect(Rectangle bounds, SpriteBatch sb) { if (barcode == null || barcode.maxWidth != bounds.Width - 2 || !barcode.leftRightBias) { barcode = new BarcodeEffect(bounds.Width - 2, true, true); } barcode.Update((float)os.lastGameTime.ElapsedGameTime.TotalSeconds); var y = bounds.Y + 11 * (bounds.Height / 12) - 1; barcode.Draw(bounds.X + 1, y, bounds.Width - 2, bounds.Height / 12, sb, themeColor); }
private void doBaseBarcodeEffect(Rectangle bounds, SpriteBatch sb) { if (this.barcode == null || this.barcode.maxWidth != bounds.Width - 2 || !this.barcode.leftRightBias) { this.barcode = new BarcodeEffect(bounds.Width - 2, true, true); } this.barcode.Update((float)this.os.lastGameTime.ElapsedGameTime.TotalSeconds); int y = bounds.Y + 11 * (bounds.Height / 12) - 1; this.barcode.Draw(bounds.X + 1, y, bounds.Width - 2, bounds.Height / 12, sb, new Color?(this.themeColor)); }
private void doBarcodeEffect(Rectangle bounds, SpriteBatch sb) { if (this.barcode == null || this.barcode.maxWidth != bounds.Width - 2 || this.barcode.leftRightBias) { this.barcode = new BarcodeEffect(bounds.Width - 2, true, false); } this.barcode.Update((float)this.os.lastGameTime.ElapsedGameTime.TotalSeconds); this.barcode.Draw(bounds.X + 1, bounds.Y + 5 * (bounds.Height / 6) - 1, bounds.Width - 2, bounds.Height / 6, sb, new Color?(this.themeColor)); this.barcode.isInverted = false; this.barcode.Draw(bounds.X + 1, bounds.Y + 1, bounds.Width - 2, bounds.Height / 6, sb, new Color?(this.themeColor)); this.barcode.isInverted = true; }
private void DrawHeaders(Rectangle dest, SpriteBatch sb) { if (this.barcodeEffect == null) { this.barcodeEffect = new BarcodeEffect(this.bounds.Width - 4, false, false); } this.barcodeEffect.Update((float)this.os.lastGameTime.ElapsedGameTime.TotalSeconds); this.barcodeEffect.Draw(dest.X, dest.Y, dest.Width - 4, Math.Min(30, this.bounds.Height - Module.PANEL_HEIGHT), sb, new Color?(this.themeColor)); if (this.bounds.Height <= Module.PANEL_HEIGHT + 60) { return; } TextItem.doFontLabel(new Vector2((float)(dest.X + 2), (float)(dest.Y + 32)), "Themechanger", GuiData.font, new Color?(Utils.AddativeWhite * 0.8f), (float)(this.bounds.Width - 80), 30f, false); int width = 60; if (Button.doButton(this.PID + 228173, this.bounds.X + this.bounds.Width - width - 2, dest.Y + 38, width, 20, LocaleTerms.Loc("Exit"), new Color?(this.os.lockedColor))) { this.isExiting = true; } }