-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b91c826
commit fad7e60
Showing
19 changed files
with
343 additions
and
29 deletions.
There are no files selected for viewing
Submodule CriticalCommonLib
updated
6 files
+14 −0 | Collections/ENpcCollection.cs | |
+1 −1 | CriticalCommonLib.csproj | |
+21 −0 | Extensions/ExcelSheetExtensions.cs | |
+13 −0 | Services/ExcelCache.cs | |
+25 −2 | Sheets/SpecialShopEx.cs | |
+3 −3 | packages.lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
InventoryTools/Logic/Settings/ContextMenuItemSearchScopeSetting.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
using System.Collections.Generic; | ||
using Dalamud.Interface.Colors; | ||
using ImGuiNET; | ||
using InventoryTools.Logic.Editors; | ||
using InventoryTools.Logic.Settings.Abstract; | ||
using InventoryTools.Services; | ||
using Microsoft.Extensions.Logging; | ||
using OtterGui; | ||
using OtterGui.Raii; | ||
|
||
namespace InventoryTools.Logic.Settings; | ||
|
||
|
||
|
||
public class ContextMenuItemSearchScopeSetting : Setting<List<InventorySearchScope>?> | ||
{ | ||
private readonly InventoryScopePicker _scopePicker; | ||
|
||
public ContextMenuItemSearchScopeSetting(ILogger<ContextMenuItemSearchScopeSetting> logger, ImGuiService imGuiService, InventoryScopePicker scopePicker) : base(logger, imGuiService) | ||
{ | ||
_scopePicker = scopePicker; | ||
} | ||
public override List<InventorySearchScope>? DefaultValue { get; set; } = null; | ||
public override List<InventorySearchScope>? CurrentValue(InventoryToolsConfiguration configuration) | ||
{ | ||
if (configuration.ItemSearchScope == null || configuration.ItemSearchScope.Count == 0) | ||
{ | ||
return DefaultValue; | ||
} | ||
return configuration.ItemSearchScope; | ||
} | ||
|
||
public override void Draw(InventoryToolsConfiguration configuration) | ||
{ | ||
var currentScopes = CurrentValue(configuration) ?? new List<InventorySearchScope>(); | ||
ImGui.SetNextItemWidth(LabelSize); | ||
if (ColourModified && HasValueSet(configuration)) | ||
{ | ||
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.HealerGreen); | ||
ImGui.LabelText("##" + Key + "Label", Name); | ||
ImGui.PopStyleColor(); | ||
} | ||
else | ||
{ | ||
ImGui.LabelText("##" + Key + "Label", Name); | ||
} | ||
|
||
ImGui.SetNextItemWidth(InputSize - 26); | ||
if (_scopePicker.Draw("##tooltipScope", currentScopes)) | ||
{ | ||
UpdateFilterConfiguration(configuration, currentScopes); | ||
} | ||
|
||
ImGui.SameLine(); | ||
ImGuiService.HelpMarker(HelpText, Image, ImageSize); | ||
if (!HideReset && HasValueSet(configuration)) | ||
{ | ||
ImGui.SameLine(); | ||
if (ImGui.Button("Reset##" + Key + "Reset")) | ||
{ | ||
Reset(configuration); | ||
} | ||
} | ||
} | ||
|
||
public override void UpdateFilterConfiguration(InventoryToolsConfiguration configuration, List<InventorySearchScope>? newValue) | ||
{ | ||
configuration.ItemSearchScope = newValue; | ||
} | ||
|
||
public override string Key { get; set; } = "ItemSearchScope"; | ||
public override string Name { get; set; } = "Context Menu - Search Scope"; | ||
public override string HelpText { get; set; } = "When searching for an item across the inventories AT knows about, which inventories should be searched?"; | ||
|
||
public override string WizardName { get; } = "Search Scope"; | ||
public override SettingCategory SettingCategory { get; set; } = SettingCategory.ContextMenu; | ||
public override SettingSubCategory SettingSubCategory { get; } = SettingSubCategory.General; | ||
public override string Version => "1.7.0.13"; | ||
} |
36 changes: 36 additions & 0 deletions
36
InventoryTools/Logic/Settings/ContextMenuItemSearchSetting.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using InventoryTools.Logic.Settings.Abstract; | ||
using InventoryTools.Services; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace InventoryTools.Logic.Settings | ||
{ | ||
public class ContextMenuItemSearchSetting : BooleanSetting | ||
{ | ||
public ContextMenuItemSearchSetting(ILogger<ContextMenuItemSearchSetting> logger, ImGuiService imGuiService) : base(logger, imGuiService) | ||
{ | ||
} | ||
|
||
public override bool DefaultValue { get; set; } = false; | ||
public override bool CurrentValue(InventoryToolsConfiguration configuration) | ||
{ | ||
return configuration.ItemSearchContextMenu; | ||
} | ||
|
||
public override void UpdateFilterConfiguration(InventoryToolsConfiguration configuration, bool newValue) | ||
{ | ||
configuration.ItemSearchContextMenu = newValue; | ||
} | ||
|
||
public override string Key { get; set; } = "ItemSearchContextMenu"; | ||
public override string Name { get; set; } = "Context Menu - Search"; | ||
|
||
public override string WizardName { get; } = "Search"; | ||
|
||
public override string HelpText { get; set; } = | ||
"Performs a search covering either all inventories or the scope defined below?"; | ||
|
||
public override SettingCategory SettingCategory { get; set; } = SettingCategory.ContextMenu; | ||
public override SettingSubCategory SettingSubCategory { get; } = SettingSubCategory.General; | ||
public override string Version => "1.7.0.13"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.