示例#1
0
        private void SaveAndExit()
        {
            for (int i = 0; i < hotkeyButtons.Count; i++)
            {
                QSEConfig.Section_hotkeys[hotkeyLabels[i]] = hotkeyButtons[i];
            }

            int.TryParse(MaxSlotDropDownContent[MaxSlotDropDownSelection].text, out int MaxSlotsResult);

            if (MaxSlotsResult != QSEConfig.MAXSLOTS)
            {
                QSEConfig.MAXSLOTS = MaxSlotsResult;
            }

            Color TextColorResult = ColorHelper.GetColor(TextColorDropDownContent[TextColorDropDownSelection].text);

            if (TextColorResult != QSEConfig.TEXTCOLOR)
            {
                QSEConfig.TEXTCOLOR = TextColorResult;
            }

            QSEConfig.WriteConfig();
            QSEConfig.SetKeyBindings();
            Main.GameInput_OnBindingsChanged();
            ErrorMessage.AddMessage("Quick Slot Extender message:\nConfiguration saved.");
            Destroy(this);
        }
示例#2
0
        private void SaveAndExit()
        {
            for (int i = 0; i < labels.Count; i++)
            {
                QSEConfig.Section_hotkeys[labels[i]] = buttons[i];
            }

            QSEConfig.WriteConfig();
            QSEConfig.SetKeyBindings();
            Main.GameInput_OnBindingsChanged();
            Destroy(Instance);
        }