Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMapModHighlightSettings.cs
More file actions
Latest commit
48 lines (41 loc) · 1.28 KB
/
Copy pathMapModHighlightSettings.cs
File metadata and controls
48 lines (41 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
usingSystem.Text.RegularExpressions;
usingExileCore.Shared.Attributes;
usingExileCore.Shared.Helpers;
usingExileCore.Shared.Interfaces;
usingExileCore.Shared.Nodes;
usingImGuiNET;
namespaceMapModHighlight;
publicclassMapModHighlightSettings:ISettings
{
publicToggleNodeEnable{get;set;}=newToggleNode(false);
publicContentNode<ModSettings>Crafts{get;set;}=newContentNode<ModSettings>
{EnableControls=true,EnableItemCollapsing=true,ItemFactory=()=>newModSettings()};
}
[Submenu(CollapsedByDefault=true)]
publicclassModSettings
{
publicModInputInput{get;set;}=newModInput();
publicColorNodeColor{get;set;}=newColorNode(System.Drawing.Color.Green.ToSharpDx());
publicoverridestringToString()
{
returnInput.Text+$"###{base.ToString()}";
}
}
[Submenu(RenderMethod=nameof(Render))]
publicclassModInput
{
publicstringText="";
internalRegexRegex;
publicvoidRender(MapModHighlightplugin)
{
LoadFilter();
if(ImGui.InputText("Regex",refText,2000))
{
Regex=newRegex(Text,RegexOptions.IgnoreCase);
}
}
internalRegexLoadFilter()
{
returnRegex??=newRegex(Text,RegexOptions.IgnoreCase);
}
}