Ejemplo n.º 1
0
        public ModMenus(IModConsole console, IModEvents events)
        {
            MainMenu  = new ModMainMenu(console);
            PauseMenu = new ModPauseMenu(console);
            ModsMenu  = new ModsMenu(console, this);
            InputMenu = new ModInputMenu(console);

            events.Subscribe <SettingsManager>(Common.Events.AfterStart);
            events.Subscribe <TitleScreenManager>(Common.Events.AfterStart);
            events.OnEvent += OnEvent;
        }
Ejemplo n.º 2
0
        protected ModInputField(TwoButtonToggleElement toggle, IModMenu menu, IModInputMenu inputMenu) : base(toggle, menu)
        {
            ToggleElement = toggle;
            InputMenu     = inputMenu;

            Button          = new ModButton(toggle.GetValue <Button>("_buttonTrue"), menu);
            Button.OnClick += Open;

            var noButton = ToggleElement.GetValue <Button>("_buttonFalse");

            noButton.transform.parent.gameObject.SetActive(false);

            var buttonParent = Button.Button.transform.parent;
            var layoutGroup  = buttonParent.parent.GetComponent <HorizontalLayoutGroup>();

            layoutGroup.childControlWidth     = true;
            layoutGroup.childForceExpandWidth = true;

            buttonParent.GetComponent <LayoutElement>().preferredWidth = 100;
        }
Ejemplo n.º 3
0
 public ModNumberInput(TwoButtonToggleElement element, IModMenu menu, IModInputMenu inputMenu) : base(element, menu, inputMenu)
 {
 }
Ejemplo n.º 4
0
 protected ModFieldInput(TwoButtonToggleElement toggle, IModMenu menu, IModInputMenu inputMenu) : base(toggle, menu)
 {
     Button = new ModTitleButton(toggle.GetValue <Button>("_buttonTrue"), menu);
     Subscribe(Button);
     InputMenu = inputMenu;
 }