Beispiel #1
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);
        }