feat: add popped-out tab opacity

This commit is contained in:
Anna
2022-02-19 16:09:32 -05:00
parent 28545f1df6
commit e55bfcfb49
6 changed files with 77 additions and 1 deletions
+13 -1
View File
@@ -875,13 +875,25 @@ internal sealed class ChatLog : IUiComponent {
}
private void DrawPopOut(Tab tab) {
var flags = ImGuiWindowFlags.None;
if (!this.Ui.Plugin.Config.ShowPopOutTitleBar) {
flags |= ImGuiWindowFlags.NoTitleBar;
}
var alpha = tab.IndependentOpacity ? tab.Opacity / 100f : this.Ui.Plugin.Config.WindowAlpha;
ImGui.SetNextWindowBgAlpha(alpha);
ImGui.SetNextWindowSize(new Vector2(350, 350) * ImGuiHelpers.GlobalScale, ImGuiCond.FirstUseEver);
if (!ImGui.Begin($"{tab.Name}##popout", ref tab.PopOut)) {
if (!ImGui.Begin($"{tab.Name}##popout", ref tab.PopOut, flags)) {
goto End;
}
ImGui.PushID($"popout-{tab.Name}");
if (!this.Ui.Plugin.Config.ShowPopOutTitleBar) {
ImGui.TextUnformatted(tab.Name);
ImGui.Separator();
}
this.DrawMessageLog(tab, ImGui.GetContentRegionAvail().Y, false);
ImGui.PopID();