forked from aly/qstbak
muffin v7.5.0
This commit is contained in:
parent
afafd5e377
commit
a6481e7b9a
67 changed files with 4281 additions and 2372 deletions
|
|
@ -30,69 +30,97 @@ internal sealed class NotificationConfigComponent : ConfigComponent
|
|||
|
||||
public override void DrawTab()
|
||||
{
|
||||
using ImRaii.IEndObject endObject = ImRaii.TabItem("Notifications###Notifications");
|
||||
if (!endObject)
|
||||
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0141: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0146: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0148: Unknown result type (might be due to invalid IL or missing references)
|
||||
TabItemDisposable val = ImRaii.TabItem((ImU8String)"Notifications###Notifications");
|
||||
try
|
||||
{
|
||||
return;
|
||||
}
|
||||
bool v = base.Configuration.Notifications.Enabled;
|
||||
if (ImGui.Checkbox("Enable notifications when manual interaction is required", ref v))
|
||||
{
|
||||
base.Configuration.Notifications.Enabled = v;
|
||||
Save();
|
||||
}
|
||||
using (ImRaii.Disabled(!base.Configuration.Notifications.Enabled))
|
||||
{
|
||||
using (ImRaii.PushIndent())
|
||||
if (!val)
|
||||
{
|
||||
int num = Array.IndexOf(_xivChatTypes, base.Configuration.Notifications.ChatType);
|
||||
if (num == -1)
|
||||
return;
|
||||
}
|
||||
bool v = base.Configuration.Notifications.Enabled;
|
||||
if (ImGui.Checkbox("Enable notifications when manual interaction is required", ref v))
|
||||
{
|
||||
base.Configuration.Notifications.Enabled = v;
|
||||
Save();
|
||||
}
|
||||
DisabledDisposable val2 = ImRaii.Disabled(!base.Configuration.Notifications.Enabled);
|
||||
try
|
||||
{
|
||||
IndentDisposable val3 = ImRaii.PushIndent(1, true);
|
||||
try
|
||||
{
|
||||
num = 0;
|
||||
}
|
||||
string text = ((num >= 0 && num < _chatTypeNames.Length) ? _chatTypeNames[num] : "Unknown");
|
||||
if (ImGui.BeginCombo("Chat channel", text, ImGuiComboFlags.HeightLarge))
|
||||
{
|
||||
if (!_chatChannelComboJustOpened)
|
||||
int num = Array.IndexOf(_xivChatTypes, base.Configuration.Notifications.ChatType);
|
||||
if (num == -1)
|
||||
{
|
||||
ImGui.SetKeyboardFocusHere();
|
||||
_chatChannelComboJustOpened = true;
|
||||
num = 0;
|
||||
}
|
||||
ImGui.SetNextItemWidth(-1f);
|
||||
ImGui.InputTextWithHint("##ChatChannelSearch", "Search chat channels...", ref _chatChannelSearchText, 256);
|
||||
ImGui.Separator();
|
||||
using (ImRaii.IEndObject endObject2 = ImRaii.Child("##ChatChannelScrollArea", new Vector2(0f, 300f), border: false))
|
||||
string text = ((num >= 0 && num < _chatTypeNames.Length) ? _chatTypeNames[num] : "Unknown");
|
||||
if (ImGui.BeginCombo("Chat channel", text, ImGuiComboFlags.HeightLarge))
|
||||
{
|
||||
if (endObject2)
|
||||
if (!_chatChannelComboJustOpened)
|
||||
{
|
||||
string value = _chatChannelSearchText.ToUpperInvariant();
|
||||
for (int i = 0; i < _chatTypeNames.Length; i++)
|
||||
ImGui.SetKeyboardFocusHere();
|
||||
_chatChannelComboJustOpened = true;
|
||||
}
|
||||
ImGui.SetNextItemWidth(-1f);
|
||||
ImGui.InputTextWithHint("##ChatChannelSearch", "Search chat channels...", ref _chatChannelSearchText, 256);
|
||||
ImGui.Separator();
|
||||
ChildDisposable val4 = ImRaii.Child((ImU8String)"##ChatChannelScrollArea", new Vector2(0f, 300f), false);
|
||||
try
|
||||
{
|
||||
if (ChildDisposable.op_Implicit(val4))
|
||||
{
|
||||
if (string.IsNullOrEmpty(_chatChannelSearchText) || _chatTypeNames[i].ToUpperInvariant().Contains(value, StringComparison.Ordinal))
|
||||
string value = _chatChannelSearchText.ToUpperInvariant();
|
||||
for (int i = 0; i < _chatTypeNames.Length; i++)
|
||||
{
|
||||
bool flag = i == num;
|
||||
if (ImGui.Selectable(_chatTypeNames[i], flag))
|
||||
if (string.IsNullOrEmpty(_chatChannelSearchText) || _chatTypeNames[i].ToUpperInvariant().Contains(value, StringComparison.Ordinal))
|
||||
{
|
||||
base.Configuration.Notifications.ChatType = _xivChatTypes[i];
|
||||
Save();
|
||||
_chatChannelSearchText = string.Empty;
|
||||
ImGui.CloseCurrentPopup();
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
ImGui.SetItemDefaultFocus();
|
||||
bool flag = i == num;
|
||||
if (ImGui.Selectable(_chatTypeNames[i], flag))
|
||||
{
|
||||
base.Configuration.Notifications.ChatType = _xivChatTypes[i];
|
||||
Save();
|
||||
_chatChannelSearchText = string.Empty;
|
||||
ImGui.CloseCurrentPopup();
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
ImGui.SetItemDefaultFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((ChildDisposable)(ref val4)).Dispose();
|
||||
}
|
||||
ImGui.EndCombo();
|
||||
}
|
||||
else
|
||||
{
|
||||
_chatChannelComboJustOpened = false;
|
||||
}
|
||||
ImGui.EndCombo();
|
||||
}
|
||||
else
|
||||
finally
|
||||
{
|
||||
_chatChannelComboJustOpened = false;
|
||||
((IDisposable)val3)?.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val2)?.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((TabItemDisposable)(ref val)).Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue