| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- using GadgetCore.API;
- using GadgetCore.API.ConfigMenu;
- using QuickStack.ConfigEnums;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace QuickStack
- {
- public class CustomMenu : BasicGadgetConfigMenu
- {
- public CustomMenu(Gadget g)
- {
- {
- var param = new string[] { "Only Main Inventory", "Only Toolbar", "Both" };
- AddComponent(new GadgetConfigLabelComponent(this, "Take From Title", "Were should items be taken from?"));
- AddComponent(new GadgetConfigDropdownComponent(this, "Take From", param[(int)Core.settingStackSource], param, new Action<string>((s) =>
- {
- for (int i = 0; i < param.Length; i++)
- {
- if (param[i] == s)
- Core.settingStackSource = (StackSourceInventoryEnum)i;
- }
- g.Config.WriteEnum("TakeFromAll", Core.settingStackSource);
- g.Config.Save();
- })));
- }
- AddComponent(new GadgetConfigSeparatorComponent(this, "Space"));
- {
- var param = new string[] { "Only Main Inventory", "Only Toolbar", "Both", "None" };
- AddComponent(new GadgetConfigLabelComponent(this, "Take Potions", "Were should potions be taken from?"));
- AddComponent(new GadgetConfigDropdownComponent(this, "Take From", param[(int)Core.settingStackPotionsSource], param, new Action<string>((s) =>
- {
- for (int i = 0; i < param.Length; i++)
- {
- if (param[i] == s)
- Core.settingStackPotionsSource = (StackSourceInventoryPotionsEnum)i;
- }
- g.Config.WriteEnum("TakeFromPotions", Core.settingStackPotionsSource);
- g.Config.Save();
- })));
- }
- AddComponent(new GadgetConfigSeparatorComponent(this, "Space"));
- {
- var param = new string[] { "Stacking Only", "Fill Page Containing", "Fill Page All" };
- AddComponent(new GadgetConfigLabelComponent(this, "Insert Title", "How should items be inserted?"));
- AddComponent(new GadgetConfigDropdownComponent(this, "Insert", param[(int)Core.settingStackMode], param, new Action<string>((s) =>
- {
- for (int i = 0; i < param.Length; i++)
- {
- if (param[i] == s)
- Core.settingStackMode = (StackModeEnum)i;
- }
- g.Config.WriteEnum("StackMode", Core.settingStackMode);
- g.Config.Save();
- })));
- }
- AddComponent(new GadgetConfigSeparatorComponent(this, "Space"));
- {
- var param = new string[] { "All Pages", "Open Page"};
- AddComponent(new GadgetConfigLabelComponent(this, "Insert Title", "Were should items be inserted?"));
- AddComponent(new GadgetConfigDropdownComponent(this, "Insert", param[(int)Core.settingStackRange], param, new Action<string>((s) =>
- {
- for (int i = 0; i < param.Length; i++)
- {
- if (param[i] == s)
- Core.settingStackRange = (StackRangeEnum)i;
- }
- g.Config.WriteEnum("StackRange", Core.settingStackRange);
- g.Config.Save();
- })));
- }
- }
- }
- }
|