Пример #1
0
        public void SetupGrid(int colorsPerPage, GameObject colorItemPrefab, GameObject colorPage, Action <string, object> onButtonClick, Color startColor, Color hoverColor, int maxInteractionRange = 5, string prevBtnNAme = "PrevBTN", string nextBtnName = "NextBTN", string gridName = "Grid", string paginatorName = "Paginator", string homeBtnName = "HomeBTN")
        {
            _colorsPerPage      = colorsPerPage;
            _colorItemPrefab    = colorItemPrefab;
            _colorPageContainer = InterfaceHelpers.FindGameObject(colorPage, gridName);
            _colorPageNumber    = InterfaceHelpers.FindGameObject(colorPage, paginatorName)?.GetComponent <Text>();

            #region Prev Color Button
            var prevColorBtn = InterfaceHelpers.FindGameObject(colorPage, prevBtnNAme);

            InterfaceHelpers.CreatePaginator(prevColorBtn, -1, ChangeColorPageBy, startColor, hoverColor);
            #endregion

            #region Next Color Button
            var nextColorBtn = InterfaceHelpers.FindGameObject(colorPage, nextBtnName);

            InterfaceHelpers.CreatePaginator(nextColorBtn, 1, ChangeColorPageBy, startColor, hoverColor);
            #endregion

            #region HomeButton
            var homeBTN = InterfaceHelpers.FindGameObject(colorPage, homeBtnName);

            InterfaceHelpers.CreateButton(homeBTN, "HomeBTN", InterfaceButtonMode.Background,
                                          onButtonClick, startColor, hoverColor, maxInteractionRange, HomeButtonMessage);

            #endregion

            _onButtonClick = onButtonClick;
            DrawColorPage(1);
        }
        public override bool FindAllComponents()
        {
            #region Canvas
            var canvasGameObject = gameObject.GetComponentInChildren <Canvas>()?.gameObject;

            if (canvasGameObject == null)
            {
                QuickLogger.Error("Canvas cannot be found");
                return(false);
            }
            #endregion

            #region L_Panel

            var lPanel = canvasGameObject.FindChild("Left_Panel")?.gameObject;

            if (lPanel == null)
            {
                QuickLogger.Error("Unable to find L_Panel GameObject");
                return(false);
            }
            #endregion

            #region R_Panel

            var rPanel = canvasGameObject.FindChild("Right_Panel")?.gameObject;

            if (rPanel == null)
            {
                QuickLogger.Error("Unable to find R_Panel GameObject");
                return(false);
            }
            #endregion

            #region Home

            var home = canvasGameObject.FindChild("Home")?.gameObject;

            if (home == null)
            {
                QuickLogger.Error("Unable to find Home GameObject");
                return(false);
            }
            #endregion

            #region confirmation

            var confirmation = canvasGameObject.FindChild("Confirmation")?.gameObject;

            if (confirmation == null)
            {
                QuickLogger.Error("Unable to find Home GameObject");
                return(false);
            }
            #endregion

            #region ColorPicker

            var colorPicker = canvasGameObject.FindChild("ColorPicker")?.gameObject;

            if (colorPicker == null)
            {
                QuickLogger.Error("Unable to find colorPicker GameObject");
                return(false);
            }
            #endregion

            #region Color Picker Button
            var colorPickerBtn = InterfaceHelpers.FindGameObject(rPanel, "ColorPickerBTN");

            if (colorPickerBtn == null)
            {
                return(false);
            }

            InterfaceHelpers.CreateButton(colorPickerBtn, "ColorPageBTN", InterfaceButtonMode.Background,
                                          OnButtonClick, _startColor, _hoverColor, MaxInteractionRange);
            #endregion

            #region Color Picker Button
            var renameBtn = InterfaceHelpers.FindGameObject(rPanel, "RenameBTN");

            if (renameBtn == null)
            {
                return(false);
            }

            InterfaceHelpers.CreateButton(renameBtn, "RenameBTN", InterfaceButtonMode.Background,
                                          OnButtonClick, _startColor, _hoverColor, MaxInteractionRange);
            #endregion

            #region Text Field

            _textField = InterfaceHelpers.FindGameObject(lPanel, "UnitName")?.GetComponent <Text>();

            #endregion

            #region Grid
            _teleportGrid.Setup(7, QuantumTeleporterBuildable.ItemPrefab, home, _startColor, _hoverColor, OnButtonClick,
                                5, "PrevBTN", "NextBTN", "Grid", "Paginator", string.Empty);
            _teleportGrid.OnLoadDisplay += OnLoadDisplay;
            #endregion

            #region Color Grid
            var _colorGrid = InterfaceHelpers.FindGameObject(colorPicker, "Grid");

            if (_colorGrid == null)
            {
                QuickLogger.Error <QTDisplayManager>("Cant find color page on home page");
                return(false);
            }
            #endregion

            #region Color Paginator
            var _colorPaginator = InterfaceHelpers.FindGameObject(colorPicker, "Paginator");

            if (_colorPaginator == null)
            {
                QuickLogger.Error <QTDisplayManager>("Cant find paginator on color picker page");
                return(false);
            }
            #endregion

            #region ColorPage
            _colorPage.SetupGrid(30, QuantumTeleporterBuildable.ColorItemPrefab, _colorGrid, _colorPaginator.GetComponent <Text>(), OnButtonClick);
            #endregion

            #region Home Button
            var homeBtn = InterfaceHelpers.FindGameObject(colorPicker, "HomeBTN");

            if (homeBtn == null)
            {
                return(false);
            }

            InterfaceHelpers.CreateButton(homeBtn, "HomeBTN", InterfaceButtonMode.Background,
                                          OnButtonClick, _startColor, _hoverColor, MaxInteractionRange);
            #endregion

            #region Prev Color Button
            var prevColorBtn = InterfaceHelpers.FindGameObject(colorPicker, "PrevBTN");

            if (prevColorBtn == null)
            {
                return(false);
            }

            InterfaceHelpers.CreatePaginator(prevColorBtn, -1, _colorPage.ChangeColorPageBy, _startColor, _hoverColor);
            #endregion

            #region Next Color Button
            var nextColorBtn = InterfaceHelpers.FindGameObject(colorPicker, "NextBTN");

            if (nextColorBtn == null)
            {
                return(false);
            }

            InterfaceHelpers.CreatePaginator(nextColorBtn, 1, _colorPage.ChangeColorPageBy, _startColor, _hoverColor);
            #endregion

            #region Global Toggle
            var isGlobalToggle = InterfaceHelpers.FindGameObject(lPanel, "Toggle");

            if (isGlobalToggle == null)
            {
                return(false);
            }

            var globalToggleLabel = InterfaceHelpers.FindGameObject(isGlobalToggle, "Label");
            if (globalToggleLabel == null)
            {
                return(false);
            }
            globalToggleLabel.GetComponent <Text>().text = QuantumTeleporterBuildable.MakeGlobalUnit();

            _isGlobalToggle = isGlobalToggle.GetComponent <Toggle>();
            _isGlobalToggle.onValueChanged.AddListener(delegate
            {
                ToggleValueChanged(_isGlobalToggle);
            });
            #endregion

            #region Intra Tele Button
            var intraTele = InterfaceHelpers.FindGameObject(home, "Intra_TeleBtn");

            if (intraTele == null)
            {
                return(false);
            }

            _intraTeleBtn = InterfaceHelpers.CreateButton(intraTele, "IntraTeleBtn", InterfaceButtonMode.Background,
                                                          OnButtonClick, Color.black, Color.white, MaxInteractionRange);
            _intraTeleBtn.ChangeText(QuantumTeleporterBuildable.LocalNetwork());
            #endregion

            #region GLobal Tele Button
            var globalTele = InterfaceHelpers.FindGameObject(home, "Global_TeleBtn");

            if (globalTele == null)
            {
                return(false);
            }

            _globalTeleBtn = InterfaceHelpers.CreateButton(globalTele, "GlobalTeleBtn", InterfaceButtonMode.Background,
                                                           OnButtonClick, Color.black, Color.white, MaxInteractionRange);
            _globalTeleBtn.ChangeText(QuantumTeleporterBuildable.GlobalNetwork());
            #endregion

            #region Information Label
            var unitInfo = InterfaceHelpers.FindGameObject(lPanel, "UnitNameInfo");

            if (unitInfo == null)
            {
                return(false);
            }

            var infoText = unitInfo.GetComponent <Text>();

            infoText.text = LeftPanelText();
            #endregion

            #region Yes Button
            var yesBTNGO = InterfaceHelpers.FindGameObject(confirmation, "YesBTN");

            if (yesBTNGO == null)
            {
                return(false);
            }

            var yesBTN = InterfaceHelpers.CreateButton(yesBTNGO, "ConfirmYesBtn", InterfaceButtonMode.Background,
                                                       OnButtonClick, Color.black, Color.white, MaxInteractionRange);
            yesBTN.ChangeText(QuantumTeleporterBuildable.Confirm());
            #endregion

            #region No Button
            var noBTNGO = InterfaceHelpers.FindGameObject(confirmation, "NoBTN");

            if (noBTNGO == null)
            {
                return(false);
            }

            var noBTN = InterfaceHelpers.CreateButton(noBTNGO, "ConfirmNoBtn", InterfaceButtonMode.Background,
                                                      OnButtonClick, Color.black, Color.white, MaxInteractionRange);
            noBTN.ChangeText(QuantumTeleporterBuildable.Cancel());
            #endregion

            #region Confirmation
            var confirmMessage = InterfaceHelpers.FindGameObject(confirmation, "Message");

            if (confirmMessage == null)
            {
                return(false);
            }

            confirmMessage.GetComponent <Text>().text = QuantumTeleporterBuildable.ConfirmMessage();
            #endregion

            #region Destination
            var destination = InterfaceHelpers.FindGameObject(confirmation, "Destination");

            if (destination == null)
            {
                return(false);
            }

            _destination = destination.GetComponent <Text>();
            #endregion

            return(true);
        }
        public override bool FindAllComponents()
        {
            try
            {
                if (_isInitialized)
                {
                    return(true);
                }
                #region Canvas
                var canvasGameObject = gameObject.GetComponentInChildren <Canvas>()?.gameObject;

                if (canvasGameObject == null)
                {
                    QuickLogger.Error("Canvas cannot be found");
                    return(false);
                }
                #endregion

                #region Home
                var home = InterfaceHelpers.FindGameObject(canvasGameObject, "Home");
                #endregion

                #region Amount
                _amountOfPodsCount = InterfaceHelpers.FindGameObject(home, "AmountOfPodsCount")?.GetComponent <Text>();
                #endregion

                #region GasPodButton
                var gasPodButtonObj = InterfaceHelpers.FindGameObject(home, "GasPodButton");

                InterfaceHelpers.CreateButton(gasPodButtonObj, "GasPodBTN", InterfaceButtonMode.Background,
                                              OnButtonClick, Color.black, Color.white, MAX_INTERACTION_DISTANCE, GaspodCollectorBuildable.TakeGaspod());

                var image   = gasPodButtonObj.transform.Find("Image");
                var guiIcon = image.gameObject.EnsureComponent <uGUI_Icon>();
                guiIcon.sprite = SpriteManager.Get(TechType.GasPod);

                #endregion

                #region DumpBTNButton
                var dumpBTNButtonObj = InterfaceHelpers.FindGameObject(home, "DumpBTN");

                InterfaceHelpers.CreateButton(dumpBTNButtonObj, "DumpBTN", InterfaceButtonMode.Background,
                                              OnButtonClick, Color.black, Color.white, MAX_INTERACTION_DISTANCE, GaspodCollectorBuildable.DumpPull(), GaspodCollectorBuildable.DumpMessage());
                #endregion

                #region Messages
                InterfaceHelpers.FindGameObject(home, "AmountOfPods").GetComponent <Text>().text = GaspodCollectorBuildable.AmountOfPodsMessage();
                InterfaceHelpers.FindGameObject(home, "ClickToTake").GetComponent <Text>().text  = GaspodCollectorBuildable.InstructionsMessage();
                InterfaceHelpers.FindGameObject(home, "Battery (1)").FindChild("Battery Label").GetComponent <Text>().text = $"{GaspodCollectorBuildable.Battery()} 1";
                InterfaceHelpers.FindGameObject(home, "Battery (2)").FindChild("Battery Label").GetComponent <Text>().text = $"{GaspodCollectorBuildable.Battery()} 2";
                #endregion

                #region ColorPicker Button

                var colorBTN = InterfaceHelpers.FindGameObject(home, "ColorBTN");

                InterfaceHelpers.CreateButton(colorBTN, "ColorBTN", InterfaceButtonMode.Background,
                                              OnButtonClick, _startColor, _hoverColor, MAX_INTERACTION_DISTANCE, GaspodCollectorBuildable.ColorPicker());

                #endregion

                #region Battery Button

                var batteryBTN = InterfaceHelpers.FindGameObject(home, "BatteryBTN").FindChild("Fill");

                InterfaceHelpers.CreateButton(batteryBTN, "BatteryBTN", InterfaceButtonMode.Background,
                                              OnButtonClick, _greenColor, _fireBrickColor, MAX_INTERACTION_DISTANCE, GaspodCollectorBuildable.BatteryReceptacle());

                #endregion

                #region ColorPicker

                var colorPicker = InterfaceHelpers.FindGameObject(canvasGameObject, "ColorPicker");
                #endregion

                #region Color Paginator
                var _colorPaginator = InterfaceHelpers.FindGameObject(colorPicker, "Paginator");
                #endregion

                #region Color Grid
                var _colorGrid = InterfaceHelpers.FindGameObject(colorPicker, "Grid");
                #endregion

                #region ColorPage
                _colorPage.SetupGrid(66, GaspodCollectorBuildable.ColorItemPrefab, _colorGrid, _colorPaginator.GetComponent <Text>(), OnButtonClick);
                #endregion

                #region Prev Color Button
                var prevColorBtn = InterfaceHelpers.FindGameObject(colorPicker, "PrevBTN");

                InterfaceHelpers.CreatePaginator(prevColorBtn, -1, _colorPage.ChangeColorPageBy, _startColor, _hoverColor);
                #endregion

                #region Next Color Button
                var nextColorBtn = InterfaceHelpers.FindGameObject(colorPicker, "NextBTN");

                InterfaceHelpers.CreatePaginator(nextColorBtn, 1, _colorPage.ChangeColorPageBy, _startColor, _hoverColor);
                #endregion

                #region HomeButton
                var homeBTN = InterfaceHelpers.FindGameObject(colorPicker, "HomeBTN");

                InterfaceHelpers.CreateButton(homeBTN, "HomeBTN", InterfaceButtonMode.Background,
                                              OnButtonClick, _startColor, _hoverColor, MAX_INTERACTION_DISTANCE, GaspodCollectorBuildable.GoHome());

                #endregion

                #region Batteries

                var b1 = InterfaceHelpers.FindGameObject(home, "Battery (1)");
                var b2 = InterfaceHelpers.FindGameObject(home, "Battery (2)");

                _b1Fill = InterfaceHelpers.FindGameObject(b1, "Fill")?.GetComponent <Image>();
                _b2Fill = InterfaceHelpers.FindGameObject(b2, "Fill")?.GetComponent <Image>();

                _b1Amount = InterfaceHelpers.FindGameObject(b1, "Amount")?.GetComponent <Text>();
                _b2Amount = InterfaceHelpers.FindGameObject(b2, "Amount")?.GetComponent <Text>();

                #endregion

                return(true);
            }
            catch (Exception e)
            {
                QuickLogger.Error <GasopodCollectorDisplayManager>($"{e.Message}\n{e.StackTrace}");
                return(false);
            }
        }
Пример #4
0
        public override bool FindAllComponents()
        {
            #region Canvas
            var canvasGameObject = gameObject.GetComponentInChildren <Canvas>()?.gameObject;

            if (canvasGameObject == null)
            {
                QuickLogger.Error("Canvas cannot be found");
                return(false);
            }
            #endregion

            #region Home

            var home = canvasGameObject.FindChild("Home")?.gameObject;

            if (home == null)
            {
                QuickLogger.Error("Unable to find Home GameObject");
                return(false);
            }
            #endregion

            #region Settings

            var settings = canvasGameObject.FindChild("Settings")?.gameObject;

            if (settings == null)
            {
                QuickLogger.Error("Unable to find Settings GameObject");
                return(false);
            }
            #endregion

            #region ColorPicker

            var colorPicker = canvasGameObject.FindChild("ColorPicker")?.gameObject;

            if (colorPicker == null)
            {
                QuickLogger.Error("Unable to find colorPicker GameObject");
                return(false);
            }
            #endregion

            #region Doors
            var doorsResult = InterfaceHelpers.FindGameObject(canvasGameObject, "Doors", out var doorsOutput);

            if (!doorsResult)
            {
                return(false);
            }

            var doors = doorsOutput;
            #endregion

            #region Start Button
            var startButtonResult = InterfaceHelpers.CreateButton(home, "Button", "startBTN", InterfaceButtonMode.Background,
                                                                  _startColor, _hoverColor, OnButtonClick, out var startButton);
            startButton.TextLineOne = "Start Cooking";

            if (!startButtonResult)
            {
                return(false);
            }
            _startButton = startButton;
            #endregion

            #region Color Picker
            var colorPickerResult = InterfaceHelpers.CreateButton(settings, "Paint_BTN", "colorPickerBTN", InterfaceButtonMode.Background,
                                                                  OnButtonClick, out var colorPickerButton);
            colorPickerButton.TextLineOne = "Color Picker Page";

            if (!colorPickerResult)
            {
                return(false);
            }
            #endregion

            #region Settings BTN
            var settingsResult = InterfaceHelpers.CreateButton(home, "Settings", "settingsBTN", InterfaceButtonMode.Background,
                                                               OnButtonClick, out var settingsButton);
            settingsButton.TextLineOne = SeaCookerBuildable.GoToSettingsPage();

            if (!settingsResult)
            {
                return(false);
            }
            #endregion

            #region Settings Color BTN
            var settingsCResult = InterfaceHelpers.CreateButton(colorPicker, "Home_BTN", "settingsBTN", InterfaceButtonMode.TextColor,
                                                                OnButtonClick, out var settings_C_BTN);
            settings_C_BTN.ChangeText($"< {SeaCookerBuildable.SettingsPage()}");
            settings_C_BTN.TextLineOne = $"{SeaCookerBuildable.GoToSettingsPage()}";

            if (!settingsCResult)
            {
                QuickLogger.Error($"Can't find settingsBTN");
                return(false);
            }
            #endregion

            #region Open Input BTN
            var openInputBTN = InterfaceHelpers.CreateButton(doors, "Open_Input", "openInputBTN", InterfaceButtonMode.TextColor,
                                                             OnButtonClick, out var openInputButton);
            openInputButton.TextLineOne = "Open Input Container";

            if (!openInputBTN)
            {
                return(false);
            }
            #endregion

            #region Open Export BTN
            var openExportBTN = InterfaceHelpers.CreateButton(doors, "Open_Export", "openExportBTN", InterfaceButtonMode.TextColor,
                                                              OnButtonClick, out var openExportButton);
            openExportButton.TextLineOne = "Open Export Container";

            if (!openExportBTN)
            {
                return(false);
            }
            #endregion

            #region Next BTN
            var nextBTN = InterfaceHelpers.CreatePaginator(colorPicker, "NextPage", 1, _colorPage.ChangeColorPageBy, out var nextButton);
            nextButton.TextLineOne = "Next Page";

            if (!nextBTN)
            {
                return(false);
            }
            #endregion

            #region Prev BTN
            var prevBTN = InterfaceHelpers.CreatePaginator(colorPicker, "PrevPage", -1, _colorPage.ChangeColorPageBy, out var prevButton);
            prevButton.TextLineOne = "Previous Page";

            if (!prevBTN)
            {
                return(false);
            }
            #endregion

            #region Color Grid
            var colorGridResult = InterfaceHelpers.FindGameObject(colorPicker, "Grid", out var colorGrid);

            if (!colorGridResult)
            {
                return(false);
            }
            _colorGrid = colorGrid;
            #endregion

            #region SeaBreeze Grid
            var seaBreezeGridResult = InterfaceHelpers.FindGameObject(settings, "Grid", out var seaBreezeGrid);

            if (!seaBreezeGridResult)
            {
                return(false);
            }

            _seaBreezeGrid.Setup(4, SeaCookerBuildable.SeaBreezeItemPrefab, settings, Color.white, new Color(0.07f, 0.38f, 0.7f, 1f), OnButtonClick);
            _seaBreezeGrid.OnLoadDisplay += OnLoadDisplay;
            #endregion

            #region From Image OMIT
            //var fromImage = InterfaceHelpers.FindGameObject(home, "from_Image", out var from_Image);

            //if (!fromImage)
            //{
            //    return false;
            //}
            //_fromImage = from_Image;
            //uGUI_Icon fromIcon = _fromImage.gameObject.AddComponent<uGUI_Icon>();
            #endregion

            #region To Image OMIT
            var toImage = InterfaceHelpers.FindGameObject(home, "to_Image", out var to_Image);

            if (!toImage)
            {
                return(false);
            }
            _toImage = to_Image;
            uGUI_Icon toIcon = _toImage.gameObject.AddComponent <uGUI_Icon>();
            #endregion

            #region Percentage Bar
            var percentageResult = InterfaceHelpers.FindGameObject(home, "Preloader_Bar", out var percentage);

            if (!percentageResult)
            {
                return(false);
            }
            _percentage = percentage.GetComponent <Image>();
            #endregion

            #region Version
            var versionResult = InterfaceHelpers.FindGameObject(canvasGameObject, "Version", out var version);

            if (!versionResult)
            {
                return(false);
            }
            var versionLbl = version.GetComponent <Text>();
            versionLbl.text = $"{SeaCookerBuildable.Version()}: {QPatch.Version}";
            #endregion

            #region Paginator
            var paginatorResult = InterfaceHelpers.FindGameObject(colorPicker, "Paginator", out var paginator);

            if (!paginatorResult)
            {
                return(false);
            }
            _paginator = paginator.GetComponent <Text>();
            #endregion

            #region Seabreeze Toggle
            var toggleResult = InterfaceHelpers.FindGameObject(settings, "Toggle_SB_Export", out var toggle);

            if (!toggleResult)
            {
                QuickLogger.Error($"Cannot find Toggle_SB_Export on GameObject");
                return(false);
            }

            _cusToggle               = toggle.AddComponent <CustomToggle>();
            _cusToggle.BtnName       = "seaBreezeToggle";
            _cusToggle.ButtonMode    = InterfaceButtonMode.Background;
            _cusToggle.OnButtonClick = OnButtonClick;
            _cusToggle.Tag           = _cusToggle;
            #endregion

            #region Auto Toggle
            var autoResult = InterfaceHelpers.FindGameObject(settings, "Auto_Toggle", out var autoToggle);

            if (!autoResult)
            {
                QuickLogger.Error($"Cannot find Auto_Toggle on GameObject");
                return(false);
            }

            _autoToggle               = autoToggle.AddComponent <CustomToggle>();
            _autoToggle.BtnName       = "autoToggle";
            _autoToggle.ButtonMode    = InterfaceButtonMode.Background;
            _autoToggle.OnButtonClick = OnButtonClick;
            _autoToggle.Tag           = _autoToggle;
            #endregion

            return(true);
        }
Пример #5
0
        public override bool FindAllComponents()
        {
            #region Canvas
            var canvasGameObject = gameObject.GetComponentInChildren <Canvas>()?.gameObject;

            if (canvasGameObject == null)
            {
                QuickLogger.Error("Canvas cannot be found");
                return(false);
            }

            canvasGameObject.gameObject.GetComponent <GraphicRaycaster>().ignoreReversedGraphics = false;
            #endregion

            #region Home

            var home = canvasGameObject.FindChild("Home")?.gameObject;

            if (home == null)
            {
                QuickLogger.Error("Unable to find Home GameObject");
                return(false);
            }
            #endregion

            #region ColorPicker

            var colorPicker = canvasGameObject.FindChild("ColorPicker")?.gameObject;

            if (colorPicker == null)
            {
                QuickLogger.Error("Unable to find colorPicker GameObject");
                return(false);
            }
            #endregion



            var takeWaterResult = InterfaceHelpers.CreateButton(home, "Button_1", "takeWaterBTN", InterfaceButtonMode.Background,
                                                                _startColor, _hoverColor, OnButtonClick, out var takeWaterButton);
            takeWaterButton.TextLineOne = "Take Water";

            if (!takeWaterResult)
            {
                return(false);
            }
            _startButton = takeWaterButton;

            var colorPickerResult = InterfaceHelpers.CreateButton(home, "Paint_BTN", "colorPickerBTN", InterfaceButtonMode.Background,
                                                                  OnButtonClick, out var colorPickerButton);
            colorPickerButton.TextLineOne = "Color Picker Page";


            if (!colorPickerResult)
            {
                return(false);
            }

            var fuelTankResult = InterfaceHelpers.CreateButton(home, "Button_2", "waterContainerBTN", InterfaceButtonMode.Background,
                                                               _startColor, _hoverColor, OnButtonClick, out var fuelTankButton);
            fuelTankButton.TextLineOne = !QPatch.Configuration.AutoGenerateMode ? "Take Water Bottle" : "Open Water Container";


            if (!fuelTankResult)
            {
                return(false);
            }

            var homeBTN = InterfaceHelpers.CreateButton(colorPicker, "Home_BTN", "homeBTN", InterfaceButtonMode.Background,
                                                        OnButtonClick, out var homeButton);
            homeButton.TextLineOne       = "Home Page";
            homeButton.OnInterfaceButton = SetOnInterfaceButton;

            if (!homeBTN)
            {
                return(false);
            }

            var nextBTN = InterfaceHelpers.CreatePaginator(colorPicker, "NextPage", 1, _colorPage.ChangeColorPageBy, out var nextButton);
            nextButton.TextLineOne = "Next Page";


            if (!nextBTN)
            {
                return(false);
            }

            var prevBTN = InterfaceHelpers.CreatePaginator(colorPicker, "PrevPage", -1, _colorPage.ChangeColorPageBy, out var prevButton);
            prevButton.TextLineOne = "Previous Page";



            if (!prevBTN)
            {
                return(false);
            }

            var gridResult = InterfaceHelpers.FindGameObject(colorPicker, "Grid", out var grid);

            if (!gridResult)
            {
                return(false);
            }
            _grid = grid;

            var paginatorResult = InterfaceHelpers.FindGameObject(colorPicker, "Paginator", out var paginator);

            if (!paginatorResult)
            {
                return(false);
            }
            _paginator = paginator.GetComponent <Text>();

            var button1ProgressResult = InterfaceHelpers.FindGameObject(home, "Button_1_Progress", out var button1Progress);

            if (!button1ProgressResult)
            {
                return(false);
            }
            _button1Progress = button1Progress.GetComponent <Image>();

            var button1ProgressNumResult = InterfaceHelpers.FindGameObject(home, "Button_1_Progress_Number", out var button1ProgressNumber);

            if (!button1ProgressNumResult)
            {
                return(false);
            }
            _button1ProgressNumber      = button1ProgressNumber.GetComponent <Text>();
            _button1ProgressNumber.text = $"(0%)";

            var button2ProgressResult = InterfaceHelpers.FindGameObject(home, "Button_2_Progress", out var button2Progress);

            if (!button2ProgressResult)
            {
                return(false);
            }
            _button2Progress = button2Progress.GetComponent <Image>();

            if (!QPatch.Configuration.AutoGenerateMode)
            {
                _button2Progress.fillAmount = 1;
            }

            var button2ProgressNumResult = InterfaceHelpers.FindGameObject(home, "Button_2_Amount_Number", out var button2ProgressNumber);

            if (!button2ProgressNumResult)
            {
                return(false);
            }
            _button2ProgressNumber      = button2ProgressNumber.GetComponent <Text>();
            _button2ProgressNumber.text = QPatch.Configuration.AutoGenerateMode ? $"0 {MiniFountainFilterBuildable.Bottles()}" : string.Empty;

            //var versionResult = InterfaceHelpers.FindGameObject(canvasGameObject, "Version", out var version);

            //if (!versionResult)
            //{
            //    return false;
            //}
            //var versionLbl = version.GetComponent<Text>();
            //versionLbl.text = $"{MiniFountainFilterBuildable.Version()}: {QPatch.Version}";

            return(true);
        }