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;
 }
 private void doBarcodeEffect(Rectangle bounds, SpriteBatch sb)
 {
     if (barcode == null || barcode.maxWidth != bounds.Width - 2 || barcode.leftRightBias)
         barcode = new BarcodeEffect(bounds.Width - 2, true, false);
     barcode.Update((float) os.lastGameTime.ElapsedGameTime.TotalSeconds);
     barcode.Draw(bounds.X + 1, bounds.Y + 5*(bounds.Height/6) - 1, bounds.Width - 2, bounds.Height/6, sb,
         themeColor);
     barcode.isInverted = false;
     barcode.Draw(bounds.X + 1, bounds.Y + 1, bounds.Width - 2, bounds.Height/6, sb, themeColor);
     barcode.isInverted = true;
 }
 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);
 }
Exemple #4
0
 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);
 }