Exemple #1
0
        public static dfPanel CreateMenuEntryTextbox(dfControl parent, string text, bool localize = false)
        {
            var ent = parent.AddPrefab(CachedOptionMenuEntry.gameObject) as dfPanel;

            CachedCentralPanel.StartCoroutine(CreateMenuEntryTextboxCoroutine(ent, parent, text, localize));

            return(ent);
        }
Exemple #2
0
        public static Patches.BraveOptionsMenuItem CreateMenuEntryOption(dfControl parent, string text, string[] entries, bool localize = false)
        {
            var ent = parent.AddPrefab(CachedOptionMenuEntry.gameObject) as dfPanel;

            var label = ent.transform.GetChild(0).GetChild(0).gameObject.GetComponent <dfLabel>();

            label.Text        = text;
            label.IsLocalized = localize;

            var menu_item = ent.GetComponent <BraveOptionsMenuItem>();

            menu_item.labelOptions = entries;
            menu_item.optionType   = BraveOptionsMenuItem.BraveOptionsOptionType.NONE;

            return((Patches.BraveOptionsMenuItem)menu_item);
        }
Exemple #3
0
        public static Patches.BraveOptionsMenuItem CreateMenuEntryCheckbox(dfControl parent, string text, bool localize = false)
        {
            var ent = parent.AddPrefab(CachedCheckboxMenuEntry.gameObject) as dfPanel;

            var checkbox = (Patches.dfCheckbox)ent.transform.GetChild(0).GetChild(1).gameObject.GetComponent <dfCheckbox>();

            checkbox.Label.Text        = text;
            checkbox.Label.IsLocalized = localize;

            var menu_item = ent.GetComponent <BraveOptionsMenuItem>();

            menu_item.optionType = BraveOptionsMenuItem.BraveOptionsOptionType.NONE;


            return((Patches.BraveOptionsMenuItem)menu_item);
        }