feat: add config for novice network

This commit is contained in:
Anna
2022-02-03 20:07:31 -05:00
parent 20fbf4e004
commit 3331c0902e
3 changed files with 11 additions and 4 deletions
+7 -4
View File
@@ -407,7 +407,8 @@ internal sealed class ChatLog : IUiComponent {
var afterIcon = ImGui.GetCursorPos();
var buttonWidth = afterIcon.X - beforeIcon.X;
var inputWidth = ImGui.GetContentRegionAvail().X - buttonWidth * 2;
var showNovice = this.Ui.Plugin.Config.ShowNoviceNetwork && this.Ui.Plugin.Functions.IsMentor();
var inputWidth = ImGui.GetContentRegionAvail().X - buttonWidth * (showNovice ? 2 : 1);
var inputType = this._tempChannel?.ToChatType() ?? activeTab?.Channel?.ToChatType() ?? this.Ui.Plugin.Functions.Chat.Channel.channel.ToChatType();
if (this.Chat.Trim().StartsWith('/')) {
@@ -505,10 +506,12 @@ internal sealed class ChatLog : IUiComponent {
this.Ui.SettingsVisible ^= true;
}
ImGui.SameLine();
if (showNovice) {
ImGui.SameLine();
if (ImGuiUtil.IconButton(FontAwesomeIcon.Leaf)) {
this.Ui.Plugin.Functions.ClickNoviceNetworkButton();
if (ImGuiUtil.IconButton(FontAwesomeIcon.Leaf)) {
this.Ui.Plugin.Functions.ClickNoviceNetworkButton();
}
}
ImGui.End();