feat: add config for novice network
This commit is contained in:
@@ -12,6 +12,7 @@ internal class Configuration : IPluginConfiguration {
|
|||||||
public bool NativeItemTooltips = true;
|
public bool NativeItemTooltips = true;
|
||||||
public bool PrettierTimestamps = true;
|
public bool PrettierTimestamps = true;
|
||||||
public bool MoreCompactPretty;
|
public bool MoreCompactPretty;
|
||||||
|
public bool ShowNoviceNetwork;
|
||||||
public bool SidebarTabView;
|
public bool SidebarTabView;
|
||||||
public bool CanMove = true;
|
public bool CanMove = true;
|
||||||
public bool CanResize = true;
|
public bool CanResize = true;
|
||||||
@@ -27,6 +28,7 @@ internal class Configuration : IPluginConfiguration {
|
|||||||
this.NativeItemTooltips = other.NativeItemTooltips;
|
this.NativeItemTooltips = other.NativeItemTooltips;
|
||||||
this.PrettierTimestamps = other.PrettierTimestamps;
|
this.PrettierTimestamps = other.PrettierTimestamps;
|
||||||
this.MoreCompactPretty = other.MoreCompactPretty;
|
this.MoreCompactPretty = other.MoreCompactPretty;
|
||||||
|
this.ShowNoviceNetwork = other.ShowNoviceNetwork;
|
||||||
this.SidebarTabView = other.SidebarTabView;
|
this.SidebarTabView = other.SidebarTabView;
|
||||||
this.CanMove = other.CanMove;
|
this.CanMove = other.CanMove;
|
||||||
this.CanResize = other.CanResize;
|
this.CanResize = other.CanResize;
|
||||||
|
|||||||
@@ -407,7 +407,8 @@ internal sealed class ChatLog : IUiComponent {
|
|||||||
var afterIcon = ImGui.GetCursorPos();
|
var afterIcon = ImGui.GetCursorPos();
|
||||||
|
|
||||||
var buttonWidth = afterIcon.X - beforeIcon.X;
|
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();
|
var inputType = this._tempChannel?.ToChatType() ?? activeTab?.Channel?.ToChatType() ?? this.Ui.Plugin.Functions.Chat.Channel.channel.ToChatType();
|
||||||
if (this.Chat.Trim().StartsWith('/')) {
|
if (this.Chat.Trim().StartsWith('/')) {
|
||||||
@@ -505,11 +506,13 @@ internal sealed class ChatLog : IUiComponent {
|
|||||||
this.Ui.SettingsVisible ^= true;
|
this.Ui.SettingsVisible ^= true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (showNovice) {
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
|
|
||||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.Leaf)) {
|
if (ImGuiUtil.IconButton(FontAwesomeIcon.Leaf)) {
|
||||||
this.Ui.Plugin.Functions.ClickNoviceNetworkButton();
|
this.Ui.Plugin.Functions.ClickNoviceNetworkButton();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ImGui.End();
|
ImGui.End();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ internal sealed class Display : ISettingsTab {
|
|||||||
ImGui.Checkbox("More compact modern layout", ref this.Mutable.MoreCompactPretty);
|
ImGui.Checkbox("More compact modern layout", ref this.Mutable.MoreCompactPretty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.Checkbox("Show Novice Network join button", ref this.Mutable.ShowNoviceNetwork);
|
||||||
|
|
||||||
ImGui.DragFloat("Font size", ref this.Mutable.FontSize, .0125f, 12f, 36f, $"{this.Mutable.FontSize:N1}");
|
ImGui.DragFloat("Font size", ref this.Mutable.FontSize, .0125f, 12f, 36f, $"{this.Mutable.FontSize:N1}");
|
||||||
if (ImGui.DragFloat("Window opacity", ref this.Mutable.WindowAlpha, .0025f, 0f, 1f, $"{this.Mutable.WindowAlpha * 100f:N2}%%")) {
|
if (ImGui.DragFloat("Window opacity", ref this.Mutable.WindowAlpha, .0025f, 0f, 1f, $"{this.Mutable.WindowAlpha * 100f:N2}%%")) {
|
||||||
switch (this.Mutable.WindowAlpha) {
|
switch (this.Mutable.WindowAlpha) {
|
||||||
|
|||||||
Reference in New Issue
Block a user