예제 #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);
        }
예제 #2
0
        public override void Draw(float t)
        {
            base.Draw(t);
            this.drawOutline();
            DateTime  now        = DateTime.Now;
            Rectangle bounds     = this.bounds;
            Rectangle fullArea   = Utils.InsetRectangle(new Rectangle(bounds.X, bounds.Y, Math.Min(bounds.Width, bounds.Height), Math.Min(bounds.Width, bounds.Height)), 1);
            Rectangle rectangle1 = new Rectangle(bounds.X + fullArea.Width, bounds.Y, bounds.Width - fullArea.Width, bounds.Height);

            this.DrawRadialPointer((float)now.Hour / 24f, fullArea, (float)fullArea.Width / 5f, Color.Gray, false);
            this.DrawRadialPointer((float)now.Minute / 60f, fullArea, (float)fullArea.Width / 3f, this.os.moduleColorStrong, false);
            this.DrawRadialPointer((float)now.Second / 60f, fullArea, (float)fullArea.Width / 2.25f, this.os.highlightColor * 0.5f, true);
            this.DrawRadialPointer((float)now.Millisecond / 1000f, fullArea, (float)fullArea.Width / 2f, this.os.topBarColor * 0.2f, true);
            Rectangle rectangle2 = new Rectangle(rectangle1.X, rectangle1.Y + 1, rectangle1.Width - 1, 9);

            this.spriteBatch.Draw(Utils.gradientLeftRight, rectangle2, this.os.exeModuleTopBar);
            rectangle2.Y += 5;
            TextItem.doRightAlignedBackingLabel(rectangle2, "ClockV2.exe", GuiData.detailfont, Color.Transparent, this.os.exeModuleTitleText);
            if (this.isLargeMode)
            {
                rectangle1 = new Rectangle(this.bounds.X + 80, this.bounds.Y + this.bounds.Height - 41, this.bounds.Width - 81, 40);
                rectangle2 = new Rectangle(rectangle1.X, rectangle1.Y + 1, rectangle1.Width - 1, 9);
            }
            string    text       = " " + now.ToShortTimeString();
            Rectangle rectangle3 = new Rectangle(rectangle2.X, rectangle2.Y + rectangle2.Height - 5, rectangle2.Width, rectangle1.Height - rectangle2.Height);
            Vector2   vector2    = GuiData.font.MeasureString(text);
            float     scale      = vector2.X / (float)rectangle3.Width;
            float     num        = (float)(rectangle3.Height / 2) - (float)((double)vector2.Y * (double)scale / 2.0);
            Vector2   position   = new Vector2((float)rectangle3.X, (float)rectangle3.Y + num);

            for (int index = 0; index < text.Length; ++index)
            {
                this.spriteBatch.DrawString(GuiData.font, string.Concat((object)text[index]), position, Utils.AddativeWhite * 0.8f, 0.0f, Vector2.Zero, scale, SpriteEffects.None, 0.5f);
                position.X += (float)rectangle3.Width / (float)text.Length;
            }
        }