diff --git a/Dalamud/Interface/Internal/PluginCategoryManager.cs b/Dalamud/Interface/Internal/PluginCategoryManager.cs index bccd58162..b7a6a6d6c 100644 --- a/Dalamud/Interface/Internal/PluginCategoryManager.cs +++ b/Dalamud/Interface/Internal/PluginCategoryManager.cs @@ -149,10 +149,10 @@ namespace Dalamud.Interface.Internal foreach (var tag in pluginCategoryTags) { // only tags from whitelist can be accepted - int matchIdx = Array.FindIndex(this.CategoryList, x => x.Tag.Equals(tag, StringComparison.InvariantCultureIgnoreCase)); + var matchIdx = Array.FindIndex(this.CategoryList, x => x.Tag.Equals(tag, StringComparison.InvariantCultureIgnoreCase)); if (matchIdx >= 0) { - int categoryId = this.CategoryList[matchIdx].CategoryId; + var categoryId = this.CategoryList[matchIdx].CategoryId; if (categoryId >= FirstTagBasedCategoryId) { categoryList.Add(categoryId); @@ -202,7 +202,7 @@ namespace Dalamud.Interface.Internal { var groupInfo = this.groupList[this.currentGroupIdx]; - bool includeAll = (this.currentCategoryIdx == 0) || (groupInfo.GroupKind != GroupKind.Available); + var includeAll = (this.currentCategoryIdx == 0) || (groupInfo.GroupKind != GroupKind.Available); if (includeAll) { result.AddRange(plugins); @@ -215,7 +215,7 @@ namespace Dalamud.Interface.Internal { if (this.mapPluginCategories.TryGetValue(plugin, out var pluginCategoryIds)) { - int matchIdx = Array.IndexOf(pluginCategoryIds, selectedCategoryInfo.CategoryId); + var matchIdx = Array.IndexOf(pluginCategoryIds, selectedCategoryInfo.CategoryId); if (matchIdx >= 0) { result.Add(plugin); diff --git a/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs index d9c3156f9..02f0a3247 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs @@ -610,10 +610,10 @@ namespace Dalamud.Interface.Internal.Windows private void DrawPluginCategories() { - float useContentHeight = -40; // button height + spacing - float useMenuWidth = 180; // works fine as static value, table can be resized by user + var useContentHeight = -40f; // button height + spacing + var useMenuWidth = 180f; // works fine as static value, table can be resized by user - float useContentWidth = ImGui.GetContentRegionAvail().X; + var useContentWidth = ImGui.GetContentRegionAvail().X; if (ImGui.BeginChild("InstallerCategories", new Vector2(useContentWidth, useContentHeight * ImGuiHelpers.GlobalScale))) { @@ -654,7 +654,7 @@ namespace Dalamud.Interface.Internal.Windows } } - for (int groupIdx = 0; groupIdx < this.categoryManager.GroupList.Length; groupIdx++) + for (var groupIdx = 0; groupIdx < this.categoryManager.GroupList.Length; groupIdx++) { var groupInfo = this.categoryManager.GroupList[groupIdx]; var canShowGroup = (groupInfo.GroupKind != PluginCategoryManager.GroupKind.DevTools) || this.hasDevPlugins; @@ -673,11 +673,11 @@ namespace Dalamud.Interface.Internal.Windows ImGui.Indent(); var categoryItemSize = new Vector2(ImGui.GetContentRegionAvail().X - (5 * ImGuiHelpers.GlobalScale), ImGui.GetTextLineHeight()); - for (int categoryIdx = 0; categoryIdx < groupInfo.Categories.Count; categoryIdx++) + for (var categoryIdx = 0; categoryIdx < groupInfo.Categories.Count; categoryIdx++) { var categoryInfo = Array.Find(this.categoryManager.CategoryList, x => x.CategoryId == groupInfo.Categories[categoryIdx]); - bool hasSearchHighlight = this.categoryManager.IsCategoryHighlighted(categoryInfo.CategoryId); + var hasSearchHighlight = this.categoryManager.IsCategoryHighlighted(categoryInfo.CategoryId); if (hasSearchHighlight) { ImGui.PushStyleColor(ImGuiCol.Text, colorSearchHighlight);