示例#1
0
 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;
 }
示例#2
0
        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;
        }