Remove this. everywhere, add small note to override style
This commit is contained in:
@@ -6,8 +6,8 @@ internal class AutoCompleteInfo {
|
||||
internal int EndPos { get; }
|
||||
|
||||
internal AutoCompleteInfo(string toComplete, int startPos, int endPos) {
|
||||
this.ToComplete = toComplete;
|
||||
this.StartPos = startPos;
|
||||
this.EndPos = endPos;
|
||||
ToComplete = toComplete;
|
||||
StartPos = startPos;
|
||||
EndPos = endPos;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -169,7 +169,7 @@ internal sealed class FaceData {
|
||||
internal byte[] Data { get; }
|
||||
|
||||
internal FaceData(byte[] data) {
|
||||
this.Data = data;
|
||||
Data = data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,8 +178,8 @@ internal sealed class FontData {
|
||||
internal FaceData? Italic { get; }
|
||||
|
||||
internal FontData(FaceData regular, FaceData? italic) {
|
||||
this.Regular = regular;
|
||||
this.Italic = italic;
|
||||
Regular = regular;
|
||||
Italic = italic;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,8 +189,8 @@ internal sealed class Font {
|
||||
internal string ResourcePathItalic { get; }
|
||||
|
||||
internal Font(string name, string resourcePath, string resourcePathItalic) {
|
||||
this.Name = name;
|
||||
this.ResourcePath = resourcePath;
|
||||
this.ResourcePathItalic = resourcePathItalic;
|
||||
Name = name;
|
||||
ResourcePath = resourcePath;
|
||||
ResourcePathItalic = resourcePathItalic;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ internal sealed class ChatColours : ISettingsTab {
|
||||
public string Name => Language.Options_ChatColours_Tab + "###tabs-chat-colours";
|
||||
|
||||
internal ChatColours(Configuration mutable, Plugin plugin) {
|
||||
this.Mutable = mutable;
|
||||
this.Plugin = plugin;
|
||||
Mutable = mutable;
|
||||
Plugin = plugin;
|
||||
|
||||
#if DEBUG
|
||||
var sortable = ChatTypeExt.SortOrder
|
||||
@@ -36,23 +36,23 @@ internal sealed class ChatColours : ISettingsTab {
|
||||
foreach (var (_, types) in ChatTypeExt.SortOrder) {
|
||||
foreach (var type in types) {
|
||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.UndoAlt, $"{type}", Language.Options_ChatColours_Reset)) {
|
||||
this.Mutable.ChatColours.Remove(type);
|
||||
Mutable.ChatColours.Remove(type);
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
|
||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.LongArrowAltDown, $"{type}", Language.Options_ChatColours_Import)) {
|
||||
var gameColour = this.Plugin.Functions.Chat.GetChannelColour(type);
|
||||
this.Mutable.ChatColours[type] = gameColour ?? type.DefaultColour() ?? 0;
|
||||
var gameColour = Plugin.Functions.Chat.GetChannelColour(type);
|
||||
Mutable.ChatColours[type] = gameColour ?? type.DefaultColour() ?? 0;
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
|
||||
var vec = this.Mutable.ChatColours.TryGetValue(type, out var colour)
|
||||
var vec = Mutable.ChatColours.TryGetValue(type, out var colour)
|
||||
? ColourUtil.RgbaToVector3(colour)
|
||||
: ColourUtil.RgbaToVector3(type.DefaultColour() ?? 0);
|
||||
if (ImGui.ColorEdit3(type.Name(), ref vec, ImGuiColorEditFlags.NoInputs)) {
|
||||
this.Mutable.ChatColours[type] = ColourUtil.Vector3ToRgba(vec);
|
||||
Mutable.ChatColours[type] = ColourUtil.Vector3ToRgba(vec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,36 +11,36 @@ internal sealed class Database : ISettingsTab {
|
||||
public string Name => Language.Options_Database_Tab + "###tabs-database";
|
||||
|
||||
internal Database(Configuration mutable, Store store) {
|
||||
this.Store = store;
|
||||
this.Mutable = mutable;
|
||||
Store = store;
|
||||
Mutable = mutable;
|
||||
}
|
||||
|
||||
private bool _showAdvanced;
|
||||
|
||||
public void Draw(bool changed) {
|
||||
if (changed) {
|
||||
this._showAdvanced = ImGui.GetIO().KeyShift;
|
||||
_showAdvanced = ImGui.GetIO().KeyShift;
|
||||
}
|
||||
|
||||
ImGuiUtil.OptionCheckbox(ref this.Mutable.DatabaseBattleMessages, Language.Options_DatabaseBattleMessages_Name, Language.Options_DatabaseBattleMessages_Description);
|
||||
ImGuiUtil.OptionCheckbox(ref Mutable.DatabaseBattleMessages, Language.Options_DatabaseBattleMessages_Name, Language.Options_DatabaseBattleMessages_Description);
|
||||
ImGui.Spacing();
|
||||
|
||||
if (ImGuiUtil.OptionCheckbox(ref this.Mutable.LoadPreviousSession, Language.Options_LoadPreviousSession_Name, Language.Options_LoadPreviousSession_Description)) {
|
||||
if (this.Mutable.LoadPreviousSession) {
|
||||
this.Mutable.FilterIncludePreviousSessions = true;
|
||||
if (ImGuiUtil.OptionCheckbox(ref Mutable.LoadPreviousSession, Language.Options_LoadPreviousSession_Name, Language.Options_LoadPreviousSession_Description)) {
|
||||
if (Mutable.LoadPreviousSession) {
|
||||
Mutable.FilterIncludePreviousSessions = true;
|
||||
}
|
||||
}
|
||||
|
||||
ImGui.Spacing();
|
||||
|
||||
if (ImGuiUtil.OptionCheckbox(ref this.Mutable.FilterIncludePreviousSessions, Language.Options_FilterIncludePreviousSessions_Name, Language.Options_FilterIncludePreviousSessions_Description)) {
|
||||
if (!this.Mutable.FilterIncludePreviousSessions) {
|
||||
this.Mutable.LoadPreviousSession = false;
|
||||
if (ImGuiUtil.OptionCheckbox(ref Mutable.FilterIncludePreviousSessions, Language.Options_FilterIncludePreviousSessions_Name, Language.Options_FilterIncludePreviousSessions_Description)) {
|
||||
if (!Mutable.FilterIncludePreviousSessions) {
|
||||
Mutable.LoadPreviousSession = false;
|
||||
}
|
||||
}
|
||||
|
||||
ImGuiUtil.OptionCheckbox(
|
||||
ref this.Mutable.SharedMode,
|
||||
ref Mutable.SharedMode,
|
||||
Language.Options_SharedMode_Name,
|
||||
string.Format(Language.Options_SharedMode_Description, Plugin.PluginName)
|
||||
);
|
||||
@@ -48,16 +48,16 @@ internal sealed class Database : ISettingsTab {
|
||||
|
||||
ImGui.Spacing();
|
||||
|
||||
if (this._showAdvanced && ImGui.TreeNodeEx(Language.Options_Database_Advanced)) {
|
||||
if (_showAdvanced && ImGui.TreeNodeEx(Language.Options_Database_Advanced)) {
|
||||
ImGui.PushTextWrapPos();
|
||||
ImGuiUtil.WarningText(Language.Options_Database_Advanced_Warning);
|
||||
|
||||
if (ImGui.Button("Checkpoint")) {
|
||||
this.Store.Database.Checkpoint();
|
||||
Store.Database.Checkpoint();
|
||||
}
|
||||
|
||||
if (ImGui.Button("Rebuild")) {
|
||||
this.Store.Database.Rebuild();
|
||||
Store.Database.Rebuild();
|
||||
}
|
||||
|
||||
ImGui.PopTextWrapPos();
|
||||
|
||||
@@ -90,7 +90,7 @@ internal sealed class Display : ISettingsTab {
|
||||
ImGuiUtil.OptionCheckbox(ref Mutable.ShowPopOutTitleBar, Language.Options_ShowPopOutTitleBar_Name);
|
||||
ImGui.Spacing();
|
||||
|
||||
ImGui.Checkbox(Language.Options_OverrideStyle_Name, ref Mutable.OverrideStyle);
|
||||
ImGuiUtil.OptionCheckbox(ref Mutable.OverrideStyle, Language.Options_OverrideStyle_Name, Language.Options_OverrideStyle_Name_Desc);
|
||||
ImGui.Spacing();
|
||||
|
||||
if (Mutable.OverrideStyle)
|
||||
@@ -98,7 +98,7 @@ internal sealed class Display : ISettingsTab {
|
||||
var currentStyle = Mutable.ChosenStyle.Equals("") ? StyleModel.GetConfiguredStyle().Name : Mutable.ChosenStyle;
|
||||
if (ImGui.BeginCombo(Language.Options_OverrideStyleDropdown_Name, currentStyle)) {
|
||||
foreach (var style in StyleModel.GetConfiguredStyles()) {
|
||||
if (ImGui.Selectable(style.Name, this.Mutable.ChosenStyle == style.Name)) {
|
||||
if (ImGui.Selectable(style.Name, Mutable.ChosenStyle == style.Name)) {
|
||||
Mutable.ChosenStyle = style.Name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,45 +12,45 @@ public class Fonts : ISettingsTab {
|
||||
private List<string> JpFonts { get; set; } = new();
|
||||
|
||||
internal Fonts(Configuration mutable) {
|
||||
this.Mutable = mutable;
|
||||
this.UpdateFonts();
|
||||
Mutable = mutable;
|
||||
UpdateFonts();
|
||||
}
|
||||
|
||||
private void UpdateFonts() {
|
||||
this.GlobalFonts = Ui.Fonts.GetFonts();
|
||||
this.JpFonts = Ui.Fonts.GetJpFonts();
|
||||
GlobalFonts = Ui.Fonts.GetFonts();
|
||||
JpFonts = Ui.Fonts.GetJpFonts();
|
||||
}
|
||||
|
||||
public void Draw(bool changed) {
|
||||
if (changed) {
|
||||
this.UpdateFonts();
|
||||
UpdateFonts();
|
||||
}
|
||||
|
||||
ImGui.PushTextWrapPos();
|
||||
|
||||
ImGui.Checkbox(Language.Options_FontsEnabled, ref this.Mutable.FontsEnabled);
|
||||
ImGui.Checkbox(Language.Options_FontsEnabled, ref Mutable.FontsEnabled);
|
||||
ImGui.Spacing();
|
||||
|
||||
if (this.Mutable.FontsEnabled) {
|
||||
if (ImGuiUtil.BeginComboVertical(Language.Options_Font_Name, this.Mutable.GlobalFont)) {
|
||||
if (Mutable.FontsEnabled) {
|
||||
if (ImGuiUtil.BeginComboVertical(Language.Options_Font_Name, Mutable.GlobalFont)) {
|
||||
foreach (var font in Ui.Fonts.GlobalFonts) {
|
||||
if (ImGui.Selectable(font.Name, this.Mutable.GlobalFont == font.Name)) {
|
||||
this.Mutable.GlobalFont = font.Name;
|
||||
if (ImGui.Selectable(font.Name, Mutable.GlobalFont == font.Name)) {
|
||||
Mutable.GlobalFont = font.Name;
|
||||
}
|
||||
|
||||
if (ImGui.IsWindowAppearing() && this.Mutable.GlobalFont == font.Name) {
|
||||
if (ImGui.IsWindowAppearing() && Mutable.GlobalFont == font.Name) {
|
||||
ImGui.SetScrollHereY(0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
ImGui.Separator();
|
||||
|
||||
foreach (var name in this.GlobalFonts) {
|
||||
if (ImGui.Selectable(name, this.Mutable.GlobalFont == name)) {
|
||||
this.Mutable.GlobalFont = name;
|
||||
foreach (var name in GlobalFonts) {
|
||||
if (ImGui.Selectable(name, Mutable.GlobalFont == name)) {
|
||||
Mutable.GlobalFont = name;
|
||||
}
|
||||
|
||||
if (ImGui.IsWindowAppearing() && this.Mutable.GlobalFont == name) {
|
||||
if (ImGui.IsWindowAppearing() && Mutable.GlobalFont == name) {
|
||||
ImGui.SetScrollHereY(0.5f);
|
||||
}
|
||||
}
|
||||
@@ -62,25 +62,25 @@ public class Fonts : ISettingsTab {
|
||||
ImGuiUtil.WarningText(Language.Options_Font_Warning);
|
||||
ImGui.Spacing();
|
||||
|
||||
if (ImGuiUtil.BeginComboVertical(Language.Options_JapaneseFont_Name, this.Mutable.JapaneseFont)) {
|
||||
if (ImGuiUtil.BeginComboVertical(Language.Options_JapaneseFont_Name, Mutable.JapaneseFont)) {
|
||||
foreach (var (name, _) in Ui.Fonts.JapaneseFonts) {
|
||||
if (ImGui.Selectable(name, this.Mutable.JapaneseFont == name)) {
|
||||
this.Mutable.JapaneseFont = name;
|
||||
if (ImGui.Selectable(name, Mutable.JapaneseFont == name)) {
|
||||
Mutable.JapaneseFont = name;
|
||||
}
|
||||
|
||||
if (ImGui.IsWindowAppearing() && this.Mutable.JapaneseFont == name) {
|
||||
if (ImGui.IsWindowAppearing() && Mutable.JapaneseFont == name) {
|
||||
ImGui.SetScrollHereY(0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
ImGui.Separator();
|
||||
|
||||
foreach (var family in this.JpFonts) {
|
||||
if (ImGui.Selectable(family, this.Mutable.JapaneseFont == family)) {
|
||||
this.Mutable.JapaneseFont = family;
|
||||
foreach (var family in JpFonts) {
|
||||
if (ImGui.Selectable(family, Mutable.JapaneseFont == family)) {
|
||||
Mutable.JapaneseFont = family;
|
||||
}
|
||||
|
||||
if (ImGui.IsWindowAppearing() && this.Mutable.JapaneseFont == family) {
|
||||
if (ImGui.IsWindowAppearing() && Mutable.JapaneseFont == family) {
|
||||
ImGui.SetScrollHereY(0.5f);
|
||||
}
|
||||
}
|
||||
@@ -94,12 +94,12 @@ public class Fonts : ISettingsTab {
|
||||
if (ImGui.CollapsingHeader(Language.Options_ExtraGlyphs_Name)) {
|
||||
ImGuiUtil.HelpText(string.Format(Language.Options_ExtraGlyphs_Description, Plugin.PluginName));
|
||||
|
||||
var range = (int) this.Mutable.ExtraGlyphRanges;
|
||||
var range = (int) Mutable.ExtraGlyphRanges;
|
||||
foreach (var extra in Enum.GetValues<ExtraGlyphRanges>()) {
|
||||
ImGui.CheckboxFlags(extra.Name(), ref range, (int) extra);
|
||||
}
|
||||
|
||||
this.Mutable.ExtraGlyphRanges = (ExtraGlyphRanges) range;
|
||||
Mutable.ExtraGlyphRanges = (ExtraGlyphRanges) range;
|
||||
}
|
||||
|
||||
ImGui.Spacing();
|
||||
@@ -108,9 +108,9 @@ public class Fonts : ISettingsTab {
|
||||
const float speed = .0125f;
|
||||
const float min = 8f;
|
||||
const float max = 36f;
|
||||
ImGuiUtil.DragFloatVertical(Language.Options_FontSize_Name, ref this.Mutable.FontSize, speed, min, max, $"{this.Mutable.FontSize:N1}");
|
||||
ImGuiUtil.DragFloatVertical(Language.Options_JapaneseFontSize_Name, ref this.Mutable.JapaneseFontSize, speed, min, max, $"{this.Mutable.JapaneseFontSize:N1}");
|
||||
ImGuiUtil.DragFloatVertical(Language.Options_SymbolsFontSize_Name, ref this.Mutable.SymbolsFontSize, speed, min, max, $"{this.Mutable.SymbolsFontSize:N1}");
|
||||
ImGuiUtil.DragFloatVertical(Language.Options_FontSize_Name, ref Mutable.FontSize, speed, min, max, $"{Mutable.FontSize:N1}");
|
||||
ImGuiUtil.DragFloatVertical(Language.Options_JapaneseFontSize_Name, ref Mutable.JapaneseFontSize, speed, min, max, $"{Mutable.JapaneseFontSize:N1}");
|
||||
ImGuiUtil.DragFloatVertical(Language.Options_SymbolsFontSize_Name, ref Mutable.SymbolsFontSize, speed, min, max, $"{Mutable.SymbolsFontSize:N1}");
|
||||
ImGuiUtil.HelpText(Language.Options_SymbolsFontSize_Description);
|
||||
|
||||
ImGui.PopTextWrapPos();
|
||||
|
||||
@@ -10,14 +10,14 @@ internal sealed class Miscellaneous : ISettingsTab {
|
||||
public string Name => Language.Options_Miscellaneous_Tab + "###tabs-miscellaneous";
|
||||
|
||||
public Miscellaneous(Configuration mutable) {
|
||||
this.Mutable = mutable;
|
||||
Mutable = mutable;
|
||||
}
|
||||
|
||||
public void Draw(bool changed) {
|
||||
if (ImGuiUtil.BeginComboVertical(Language.Options_Language_Name, this.Mutable.LanguageOverride.Name())) {
|
||||
if (ImGuiUtil.BeginComboVertical(Language.Options_Language_Name, Mutable.LanguageOverride.Name())) {
|
||||
foreach (var language in Enum.GetValues<LanguageOverride>()) {
|
||||
if (ImGui.Selectable(language.Name())) {
|
||||
this.Mutable.LanguageOverride = language;
|
||||
Mutable.LanguageOverride = language;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,10 +27,10 @@ internal sealed class Miscellaneous : ISettingsTab {
|
||||
ImGuiUtil.HelpText(string.Format(Language.Options_Language_Description, Plugin.PluginName));
|
||||
ImGui.Spacing();
|
||||
|
||||
if (ImGuiUtil.BeginComboVertical(Language.Options_CommandHelpSide_Name, this.Mutable.CommandHelpSide.Name())) {
|
||||
if (ImGuiUtil.BeginComboVertical(Language.Options_CommandHelpSide_Name, Mutable.CommandHelpSide.Name())) {
|
||||
foreach (var side in Enum.GetValues<CommandHelpSide>()) {
|
||||
if (ImGui.Selectable(side.Name(), this.Mutable.CommandHelpSide == side)) {
|
||||
this.Mutable.CommandHelpSide = side;
|
||||
if (ImGui.Selectable(side.Name(), Mutable.CommandHelpSide == side)) {
|
||||
Mutable.CommandHelpSide = side;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ internal sealed class Miscellaneous : ISettingsTab {
|
||||
ImGuiUtil.HelpText(string.Format(Language.Options_CommandHelpSide_Description, Plugin.PluginName));
|
||||
ImGui.Spacing();
|
||||
|
||||
if (ImGuiUtil.BeginComboVertical(Language.Options_KeybindMode_Name, this.Mutable.KeybindMode.Name())) {
|
||||
if (ImGuiUtil.BeginComboVertical(Language.Options_KeybindMode_Name, Mutable.KeybindMode.Name())) {
|
||||
foreach (var mode in Enum.GetValues<KeybindMode>()) {
|
||||
if (ImGui.Selectable(mode.Name(), this.Mutable.KeybindMode == mode)) {
|
||||
this.Mutable.KeybindMode = mode;
|
||||
if (ImGui.Selectable(mode.Name(), Mutable.KeybindMode == mode)) {
|
||||
Mutable.KeybindMode = mode;
|
||||
}
|
||||
|
||||
if (ImGui.IsItemHovered()) {
|
||||
@@ -59,7 +59,7 @@ internal sealed class Miscellaneous : ISettingsTab {
|
||||
ImGuiUtil.HelpText(string.Format(Language.Options_KeybindMode_Description, Plugin.PluginName));
|
||||
ImGui.Spacing();
|
||||
|
||||
ImGui.Checkbox(Language.Options_SortAutoTranslate_Name, ref this.Mutable.SortAutoTranslate);
|
||||
ImGui.Checkbox(Language.Options_SortAutoTranslate_Name, ref Mutable.SortAutoTranslate);
|
||||
ImGuiUtil.HelpText(Language.Options_SortAutoTranslate_Description);
|
||||
ImGui.Spacing();
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ internal sealed class Tabs : ISettingsTab {
|
||||
private int _toOpen = -2;
|
||||
|
||||
internal Tabs(Plugin plugin, Configuration mutable) {
|
||||
this.Plugin = plugin;
|
||||
this.Mutable = mutable;
|
||||
Plugin = plugin;
|
||||
Mutable = mutable;
|
||||
}
|
||||
|
||||
public void Draw(bool changed) {
|
||||
@@ -28,29 +28,29 @@ internal sealed class Tabs : ISettingsTab {
|
||||
|
||||
if (ImGui.BeginPopup(addTabPopup)) {
|
||||
if (ImGui.Selectable(Language.Options_Tabs_NewTab)) {
|
||||
this.Mutable.Tabs.Add(new Tab());
|
||||
Mutable.Tabs.Add(new Tab());
|
||||
}
|
||||
|
||||
ImGui.Separator();
|
||||
|
||||
if (ImGui.Selectable(string.Format(Language.Options_Tabs_Preset, Language.Tabs_Presets_General))) {
|
||||
this.Mutable.Tabs.Add(TabsUtil.VanillaGeneral);
|
||||
Mutable.Tabs.Add(TabsUtil.VanillaGeneral);
|
||||
}
|
||||
|
||||
if (ImGui.Selectable(string.Format(Language.Options_Tabs_Preset, Language.Tabs_Presets_Event))) {
|
||||
this.Mutable.Tabs.Add(TabsUtil.VanillaEvent);
|
||||
Mutable.Tabs.Add(TabsUtil.VanillaEvent);
|
||||
}
|
||||
|
||||
ImGui.EndPopup();
|
||||
}
|
||||
|
||||
var toRemove = -1;
|
||||
var doOpens = this._toOpen > -2;
|
||||
for (var i = 0; i < this.Mutable.Tabs.Count; i++) {
|
||||
var tab = this.Mutable.Tabs[i];
|
||||
var doOpens = _toOpen > -2;
|
||||
for (var i = 0; i < Mutable.Tabs.Count; i++) {
|
||||
var tab = Mutable.Tabs[i];
|
||||
|
||||
if (doOpens) {
|
||||
ImGui.SetNextItemOpen(i == this._toOpen);
|
||||
ImGui.SetNextItemOpen(i == _toOpen);
|
||||
}
|
||||
|
||||
if (ImGui.TreeNodeEx($"{tab.Name}###tab-{i}")) {
|
||||
@@ -58,21 +58,21 @@ internal sealed class Tabs : ISettingsTab {
|
||||
|
||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.TrashAlt, tooltip: Language.Options_Tabs_Delete)) {
|
||||
toRemove = i;
|
||||
this._toOpen = -1;
|
||||
_toOpen = -1;
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
|
||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.ArrowUp, tooltip: Language.Options_Tabs_MoveUp) && i > 0) {
|
||||
(this.Mutable.Tabs[i - 1], this.Mutable.Tabs[i]) = (this.Mutable.Tabs[i], this.Mutable.Tabs[i - 1]);
|
||||
this._toOpen = i - 1;
|
||||
(Mutable.Tabs[i - 1], Mutable.Tabs[i]) = (Mutable.Tabs[i], Mutable.Tabs[i - 1]);
|
||||
_toOpen = i - 1;
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
|
||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.ArrowDown, tooltip: Language.Options_Tabs_MoveDown) && i < this.Mutable.Tabs.Count - 1) {
|
||||
(this.Mutable.Tabs[i + 1], this.Mutable.Tabs[i]) = (this.Mutable.Tabs[i], this.Mutable.Tabs[i + 1]);
|
||||
this._toOpen = i + 1;
|
||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.ArrowDown, tooltip: Language.Options_Tabs_MoveDown) && i < Mutable.Tabs.Count - 1) {
|
||||
(Mutable.Tabs[i + 1], Mutable.Tabs[i]) = (Mutable.Tabs[i], Mutable.Tabs[i + 1]);
|
||||
_toOpen = i + 1;
|
||||
}
|
||||
|
||||
ImGui.InputText(Language.Options_Tabs_Name, ref tab.Name, 512, ImGuiInputTextFlags.EnterReturnsTrue);
|
||||
@@ -160,7 +160,7 @@ internal sealed class Tabs : ISettingsTab {
|
||||
ImGui.TreePop();
|
||||
}
|
||||
|
||||
if (this.Plugin.ExtraChat.ChannelNames.Count > 0 && ImGui.TreeNodeEx(Language.Options_Tabs_ExtraChatChannels)) {
|
||||
if (Plugin.ExtraChat.ChannelNames.Count > 0 && ImGui.TreeNodeEx(Language.Options_Tabs_ExtraChatChannels)) {
|
||||
ImGui.Checkbox(Language.Options_Tabs_ExtraChatAll, ref tab.ExtraChatAll);
|
||||
|
||||
ImGui.Separator();
|
||||
@@ -169,7 +169,7 @@ internal sealed class Tabs : ISettingsTab {
|
||||
ImGui.BeginDisabled();
|
||||
}
|
||||
|
||||
foreach (var (id, name) in this.Plugin.ExtraChat.ChannelNames) {
|
||||
foreach (var (id, name) in Plugin.ExtraChat.ChannelNames) {
|
||||
var enabled = tab.ExtraChatChannels.Contains(id);
|
||||
if (!ImGui.Checkbox($"{name}##ec-{id}", ref enabled)) {
|
||||
continue;
|
||||
@@ -196,11 +196,11 @@ internal sealed class Tabs : ISettingsTab {
|
||||
}
|
||||
|
||||
if (toRemove > -1) {
|
||||
this.Mutable.Tabs.RemoveAt(toRemove);
|
||||
Mutable.Tabs.RemoveAt(toRemove);
|
||||
}
|
||||
|
||||
if (doOpens) {
|
||||
this._toOpen = -2;
|
||||
_toOpen = -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user