Adjustable chat log position through sliders
This commit is contained in:
@@ -8,15 +8,15 @@ namespace ChatTwo.Ui.SettingsTabs;
|
||||
|
||||
internal sealed class ChatColours : ISettingsTab
|
||||
{
|
||||
private Configuration Mutable { get; }
|
||||
private Plugin Plugin { get; }
|
||||
private Configuration Mutable { get; }
|
||||
|
||||
public string Name => Language.Options_ChatColours_Tab + "###tabs-chat-colours";
|
||||
|
||||
internal ChatColours(Configuration mutable, Plugin plugin)
|
||||
internal ChatColours(Plugin plugin, Configuration mutable)
|
||||
{
|
||||
Mutable = mutable;
|
||||
Plugin = plugin;
|
||||
Mutable = mutable;
|
||||
|
||||
#if DEBUG
|
||||
// Users can set colours for ExtraChat linkshells in the ExtraChat plugin directly.
|
||||
|
||||
@@ -8,12 +8,14 @@ namespace ChatTwo.Ui.SettingsTabs;
|
||||
|
||||
internal sealed class ChatLog : ISettingsTab
|
||||
{
|
||||
private readonly Plugin Plugin;
|
||||
private Configuration Mutable { get; }
|
||||
|
||||
public string Name => Language.Options_ChatLog_Tab + "###tabs-chatlog";
|
||||
|
||||
internal ChatLog(Configuration mutable)
|
||||
internal ChatLog(Plugin plugin, Configuration mutable)
|
||||
{
|
||||
Plugin = plugin;
|
||||
Mutable = mutable;
|
||||
}
|
||||
|
||||
@@ -59,6 +61,18 @@ internal sealed class ChatLog : ISettingsTab
|
||||
|
||||
ImGuiUtil.OptionCheckbox(ref Mutable.OverrideStyle, Language.Options_OverrideStyle_Name, Language.Options_OverrideStyle_Name_Desc);
|
||||
ImGui.Spacing();
|
||||
|
||||
ImGui.Spacing();
|
||||
ImGui.Separator();
|
||||
ImGui.Spacing();
|
||||
|
||||
ImGui.TextUnformatted(Language.Options_AdjustPosition_Name);
|
||||
var pos = Plugin.ChatLogWindow.LastWindowPos;
|
||||
ImGui.SetNextItemWidth(-1);
|
||||
if (ImGui.DragFloat2($"##{Language.Options_AdjustPosition_Name}", ref pos, 1, 0, float.MaxValue, "%.0fpx"))
|
||||
Plugin.ChatLogWindow.Position = pos;
|
||||
ImGuiUtil.WarningText(Language.Options_AdjustPosition_Warning);
|
||||
ImGui.Spacing();
|
||||
ImGui.PopTextWrapPos();
|
||||
|
||||
if (!Mutable.OverrideStyle)
|
||||
|
||||
@@ -12,12 +12,12 @@ namespace ChatTwo.Ui.SettingsTabs;
|
||||
|
||||
internal sealed class Database : ISettingsTab
|
||||
{
|
||||
private Configuration Mutable { get; }
|
||||
private Plugin Plugin { get; }
|
||||
private Configuration Mutable { get; }
|
||||
|
||||
public string Name => Language.Options_Database_Tab + "###tabs-database";
|
||||
|
||||
internal Database(Configuration mutable, Plugin plugin)
|
||||
internal Database(Plugin plugin, Configuration mutable)
|
||||
{
|
||||
Plugin = plugin;
|
||||
Mutable = mutable;
|
||||
|
||||
Reference in New Issue
Block a user