public StashieSettings() { Enable = new ToggleNode(false); RequireHotkey = new ToggleNode(true); DropHotkey = Keys.F3; ExtraDelay = new RangeNode <int>(0, 0, 2000); MouseSpeed = new RangeNode <int>(10, 0, 50); BlockInput = new ToggleNode(false); UseArrow = new ToggleNode(true); RefillCurrency = new ToggleNode(false); CurrencyStashTab = new ListIndexNode(); AllowHaveMore = new ToggleNode(false); CustomFilterOptions = new Dictionary <string, ListIndexNode>(); CustomRefillOptions = new Dictionary <string, RangeNode <int> >(); VisitTabWhenDone = new ToggleNode(false); TabToVisitWhenDone = new RangeNode <int>(0, 0, 40); }
private void LoadCustomFilters() { var filterPath = Path.Combine(PluginDirectory, FITERS_CONFIG_FILE); var filtersLines = File.ReadAllLines(filterPath); var unused = new FilterParser(); _customFilters = FilterParser.Parse(filtersLines); var submenu = new Dictionary <string, MenuItem>(); foreach (var customFilter in _customFilters) { ListIndexNode indexNode; if (!Settings.CustomFilterOptions.TryGetValue(customFilter.Name, out indexNode)) { indexNode = new ListIndexNode { Value = "Ignore", Index = -1 }; Settings.CustomFilterOptions.Add(customFilter.Name, indexNode); } var parentMenu = PluginSettingsRootMenu; if (!string.IsNullOrEmpty(customFilter.SubmenuName)) { if (!submenu.TryGetValue(customFilter.SubmenuName, out parentMenu)) { parentMenu = MenuPlugin.AddChild(PluginSettingsRootMenu, customFilter.SubmenuName); submenu.Add(customFilter.SubmenuName, parentMenu); } } MenuPlugin.AddChild(parentMenu, customFilter.Name, indexNode); customFilter.StashIndexNode = indexNode; _settingsListNodes.Add(indexNode); } }
public StashieSettings() { Enable = new ToggleNode(false); Debug = new ToggleNode(false); DropHotkey = Keys.F4; ExtraDelay = new RangeNode <int>(0, 0, 2000); HoverItemDelay = new RangeNode <int>(5, 0, 2000); StashItemDelay = new RangeNode <int>(5, 0, 2000); BlockInput = new ToggleNode(false); AlwaysUseArrow = new ToggleNode(false); RefillCurrency = new ToggleNode(false); CurrencyStashTab = new ListIndexNode(); AllowHaveMore = new ToggleNode(false); CustomFilterOptions = new Dictionary <string, ListIndexNode>(); CustomRefillOptions = new Dictionary <string, RangeNode <int> >(); VisitTabWhenDone = new ToggleNode(false); TabToVisitWhenDone = new RangeNode <int>(0, 0, 40); BackToOriginalTab = new ToggleNode(false); }
private void OnSettingsStashNameChanged(ListIndexNode node, string newValue) { node.Index = GetInventIndexByStashName(newValue); }