some shit
This commit is contained in:
parent
aef3dd0778
commit
6ad9dd02d9
|
@ -13,6 +13,8 @@ public class Configuration : IPluginConfiguration {
|
||||||
public bool RemoveGlow = true;
|
public bool RemoveGlow = true;
|
||||||
public bool AutoViewer;
|
public bool AutoViewer;
|
||||||
public bool AutoViewerClose = true;
|
public bool AutoViewerClose = true;
|
||||||
|
public bool LockViewer;
|
||||||
|
public bool ClickThroughViewer;
|
||||||
public bool HideTitlebar;
|
public bool HideTitlebar;
|
||||||
public float ViewerOpacity = 100.0f;
|
public float ViewerOpacity = 100.0f;
|
||||||
public int DefaultGlyph = 3;
|
public int DefaultGlyph = 3;
|
||||||
|
|
|
@ -25,16 +25,6 @@ internal class Settings : ITab {
|
||||||
anyChanged |= vfx |= ImGui.Checkbox("Disable in trials", ref this.Plugin.Config.DisableTrials);
|
anyChanged |= vfx |= ImGui.Checkbox("Disable in trials", ref this.Plugin.Config.DisableTrials);
|
||||||
anyChanged |= vfx |= ImGui.Checkbox("Disable in Deep Dungeons", ref this.Plugin.Config.DisableDeepDungeon);
|
anyChanged |= vfx |= ImGui.Checkbox("Disable in Deep Dungeons", ref this.Plugin.Config.DisableDeepDungeon);
|
||||||
anyChanged |= vfx |= ImGui.Checkbox("Remove glow effect from signs", ref this.Plugin.Config.RemoveGlow);
|
anyChanged |= vfx |= ImGui.Checkbox("Remove glow effect from signs", ref this.Plugin.Config.RemoveGlow);
|
||||||
anyChanged |= ImGui.Checkbox("Open the viewer automatically when near a sign", ref this.Plugin.Config.AutoViewer);
|
|
||||||
anyChanged |= ImGui.Checkbox("Close the viewer automatically when no signs are nearby", ref this.Plugin.Config.AutoViewerClose);
|
|
||||||
|
|
||||||
if (this.Plugin.Config.AutoViewerClose) {
|
|
||||||
ImGui.TreePush();
|
|
||||||
anyChanged |= ImGui.Checkbox("Hide viewer titlebar", ref this.Plugin.Config.HideTitlebar);
|
|
||||||
ImGui.TreePop();
|
|
||||||
}
|
|
||||||
|
|
||||||
anyChanged |= ImGui.SliderFloat("Viewer opacity", ref this.Plugin.Config.ViewerOpacity, 0f, 100.0f, $"{this.Plugin.Config.ViewerOpacity:N3}%%");
|
|
||||||
|
|
||||||
var glyph = this.Plugin.Config.DefaultGlyph + 1;
|
var glyph = this.Plugin.Config.DefaultGlyph + 1;
|
||||||
if (ImGui.InputInt("Default glyph", ref glyph)) {
|
if (ImGui.InputInt("Default glyph", ref glyph)) {
|
||||||
|
@ -42,6 +32,21 @@ internal class Settings : ITab {
|
||||||
anyChanged = true;
|
anyChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImGui.CollapsingHeader("Viewer settings")) {
|
||||||
|
anyChanged |= ImGui.SliderFloat("Viewer opacity", ref this.Plugin.Config.ViewerOpacity, 0f, 100.0f, $"{this.Plugin.Config.ViewerOpacity:N3}%%");
|
||||||
|
anyChanged |= ImGui.Checkbox("Open the viewer automatically when near a sign", ref this.Plugin.Config.AutoViewer);
|
||||||
|
anyChanged |= ImGui.Checkbox("Close the viewer automatically when no signs are nearby", ref this.Plugin.Config.AutoViewerClose);
|
||||||
|
|
||||||
|
if (this.Plugin.Config.AutoViewerClose) {
|
||||||
|
ImGui.TreePush();
|
||||||
|
anyChanged |= ImGui.Checkbox("Hide viewer titlebar", ref this.Plugin.Config.HideTitlebar);
|
||||||
|
ImGui.TreePop();
|
||||||
|
}
|
||||||
|
|
||||||
|
anyChanged |= ImGui.Checkbox("Lock viewer in place", ref this.Plugin.Config.LockViewer);
|
||||||
|
anyChanged |= ImGui.Checkbox("Click through viewer", ref this.Plugin.Config.ClickThroughViewer);
|
||||||
|
}
|
||||||
|
|
||||||
if (anyChanged) {
|
if (anyChanged) {
|
||||||
this.Plugin.SaveConfig();
|
this.Plugin.SaveConfig();
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,9 +21,10 @@ internal class Viewer {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var flags = this.Plugin.Config.HideTitlebar
|
var flags = ImGuiWindowFlags.NoBringToFrontOnFocus;
|
||||||
? ImGuiWindowFlags.NoTitleBar
|
flags |= this.Plugin.Config.HideTitlebar ? ImGuiWindowFlags.NoTitleBar : ImGuiWindowFlags.None;
|
||||||
: ImGuiWindowFlags.None;
|
flags |= this.Plugin.Config.LockViewer ? ImGuiWindowFlags.NoMove : ImGuiWindowFlags.None;
|
||||||
|
flags |= this.Plugin.Config.ClickThroughViewer ? ImGuiWindowFlags.NoInputs : ImGuiWindowFlags.None;
|
||||||
ImGui.SetNextWindowSize(new Vector2(350, 175), ImGuiCond.FirstUseEver);
|
ImGui.SetNextWindowSize(new Vector2(350, 175), ImGuiCond.FirstUseEver);
|
||||||
ImGui.SetNextWindowBgAlpha(this.Plugin.Config.ViewerOpacity / 100.0f);
|
ImGui.SetNextWindowBgAlpha(this.Plugin.Config.ViewerOpacity / 100.0f);
|
||||||
if (!ImGui.Begin("Messages", ref this.Visible, flags)) {
|
if (!ImGui.Begin("Messages", ref this.Visible, flags)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user