consegue juntar AddBackground e AddPanel em uma só?
using System.Collections.Generic;
using Oxide.Core.Plugins;
using Oxide.Game.Rust.Cui;
using UnityEngine;

namespace Oxide.Plugins
{
    [Info("QuarryComputerUi", "Marte6", "1.0.11")]
    public class QuarryComputerUi : RustPlugin
    {
        private static readonly string[] UiElements = { "QuarryUi_Background", "QuarryUi_CloseButton" };

        private void Init() => RemoveUiFromAllPlayers();

        [ChatCommand("ui")]
        private void HandleOpenUiCommand(BasePlayer player)
        {
            RemoveUiFromPlayer(player);
            var container = new CuiElementContainer();
            AddBackground(container);
            AddPanel(container, "0.235 0.26", "0.4985 0.724", "QuarryUi_Full_Left");
            AddPanel(container, "0.4995 0.26", "0.765 0.724", "QuarryUi_Full_Right");
            AddInnerSquare(container, "QuarryUi_Full_Left", "0.05 0.05", "0.45 0.45", "0.8 0.2 0.2 1");
            AddInnerSquare(container, "QuarryUi_Full_Left", "0.55 0.55", "0.95 0.95", "0.2 0.2 0.8 1");
            AddInnerSquare(container, "QuarryUi_Full_Right", "0.05 0.05", "0.45 0.45", "0.8 0.8 0.2 1");
            AddInnerSquare(container, "QuarryUi_Full_Right", "0.55 0.55", "0.95 0.95", "0.2 0.8 0.2 1");
            AddCloseButton(container, "QuarryUi_Full_Right");
            CuiHelper.AddUi(player, container);
            player.SetPlayerFlag(BasePlayer.PlayerFlags.Spectating, true);
        }

        [ConsoleCommand("ui.close")]
        private void HandleCloseUiCommand(ConsoleSystem.Arg args)
        {
            var player = args?.Player();
            if (player != null)
                RemoveUiFromPlayer(player);
        }

        private void RemoveUiFromPlayer(BasePlayer player)
        {
            if (player == null)
                return;
            foreach (var element in UiElements)
                CuiHelper.DestroyUi(player, element);
            player.SetPlayerFlag(BasePlayer.PlayerFlags.Spectating, false);
            player.UpdateActiveItem(default);
        }

        private void RemoveUiFromAllPlayers()
        {
            foreach (var player in BasePlayer.activePlayerList)
                RemoveUiFromPlayer(player);
        }

        private void AddBackground(CuiElementContainer container)
        {
            container.Add(
                new CuiPanel
                {
                    Image =
                    {
                        Color = "0.5 0.5 0.5 0.9",
                        Material = "assets/content/ui/uibackgroundblur.mat",
                        Sprite = "assets/content/ui/ui.background.transparent.radial.psd",
                    },
                    RectTransform = { AnchorMin = "0 0", AnchorMax = "1 1" },
                    CursorEnabled = true,
                },
                "Overlay",
                "QuarryUi_Background"
            );
        }

        private void AddPanel(CuiElementContainer container, string anchorMin, string anchorMax, string panelName)
        {
            container.Add(
                new CuiPanel
                {
                    Image = { Color = "0 0 0 1" },
                    RectTransform = { AnchorMin = anchorMin, AnchorMax = anchorMax },
                },
                "QuarryUi_Background",
                panelName
            );
        }

        private void AddInnerSquare(
            CuiElementContainer container,
            string parent,
            string anchorMin,
            string anchorMax,
            string color
        )
        {
            container.Add(
                new CuiPanel
                {
                    Image = { Color = color },
                    RectTransform = { AnchorMin = anchorMin, AnchorMax = anchorMax },
                },
                parent
            );
        }

        private void AddCloseButton(CuiElementContainer container, string parent)
        {
            container.Add(
                new CuiButton
                {
                    Button =
                    {
                        Color = "1 0 0 1",
                        Command = "ui.close",
                        Close = "QuarryUi_Background",
                    },
                    RectTransform = { AnchorMin = "0.95 0.95", AnchorMax = "1 1" },
                    Text =
                    {
                        Color = "1 1 1 0.5",
                        Font = "robotocondensed-regular.ttf",
                        Text = "✖",
                        FontSize = 13,
                        Align = TextAnchor.MiddleCenter,
                    },
                },
                parent,
                "QuarryUi_CloseButton"
            );
        }
    }
}