Ejemplo n.º 1
0
    private static bool DrawOnAddonHideTab(Configuration config, float scale)
    {
        var changed = false;

        if (!ImGui.BeginTabItem(i18n.tab_header_hiding_options))
        {
            return(changed);
        }

        ImGui.Text(i18n.hide_compass_text);
        for (var i = 1; i <= config.ShouldHideOnUiObject.Length; i++)
        {
            if (i % 2 == 0)
            {
                ImGui.SameLine(225 * scale);
            }
            changed |= ImGui.Checkbox(
                config.ShouldHideOnUiObject[i - 1].userFacingIdentifier
                , ref config.ShouldHideOnUiObject[i - 1].disable);
            if (changed)
            {
                config.ShouldHideOnUiObjectSerializer[i - 1] = config.ShouldHideOnUiObject[i - 1].disable;
            }
        }

        ImGui.EndTabItem();
        return(changed);
    }
            private void DrawFileListTabEdit()
            {
                if (ImGui.BeginTabItem(LabelFileListTab))
                {
                    UpdateFilenameList();
                    if (ImGui.IsItemHovered())
                    {
                        ImGui.SetTooltip(_editMode ? TooltipFilesTabEdit : TooltipFilesTab);
                    }

                    ImGui.SetNextItemWidth(-1);
                    if (ImGui.BeginListBox(LabelFileListHeader, AutoFillSize - new Vector2(0, 1.5f * ImGui.GetTextLineHeight())))
                    {
                        for (var i = 0; i < Mod !.Mod.ModFiles.Count; ++i)
                        {
                            DrawFileAndGamePaths(i);
                        }
                    }

                    ImGui.EndListBox();

                    DrawGroupRow();
                    ImGui.EndTabItem();
                }
                else
                {
                    _fullFilenameList = null;
                }
            }
Ejemplo n.º 3
0
        void DrawTopTabs()
        {
            //store tab state
            var typesState = new Dictionary <Type, bool>();

            if (ImGui.BeginTabBar("ClassInfoViewTopTab"))
            {
                foreach (var type in topTabs)
                {
                    bool opened = topTabs[type.Key];
                    if (opened && ImGui.BeginTabItem(type.Key.Name, ref opened, ImGuiTabItemFlags.None))
                    {
                        if (show)
                        {
                            Show(type.Key);
                        }
                        ImGui.EndTabItem();
                    }
                    typesState[type.Key] = opened;
                }

                //chage orgianl tab state
                foreach (var type in typesState)
                {
                    if (typesState[type.Key] == false)
                    {
                        topTabs.Remove(type.Key);
                    }
                }

                ImGui.EndTabBar();
            }
        }
        public static bool BeginTab(string menuKey, string text)
        {
            //Keep track of multiple loaded menus
            if (!selectedTabMenus.ContainsKey(menuKey))
            {
                selectedTabMenus.Add(menuKey, "");
            }

            var disabled = ImGui.GetStyle().Colors[(int)ImGuiCol.TextDisabled];
            var normal   = ImGui.GetStyle().Colors[(int)ImGuiCol.Text];

            if (selectedTabMenus[menuKey] == text)
            {
                ImGui.PushStyleColor(ImGuiCol.Text, normal);
            }
            else
            {
                ImGui.PushStyleColor(ImGuiCol.Text, disabled);
            }

            bool active = ImGui.BeginTabItem(text);

            if (active)
            {
                selectedTabMenus[menuKey] = text;
            }

            ImGui.PopStyleColor();
            return(active);
        }
Ejemplo n.º 5
0
        public static void Draw()
        {
            if (!FreeCam.Enabled && DalamudApi.GameGui.GetAddonByName("Title", 1) != IntPtr.Zero)
            {
                DrawFreeCamButton();
            }

            if (!isVisible)
            {
                return;
            }

            ImGui.SetNextWindowSizeConstraints(new Vector2(700, 660) * ImGuiHelpers.GlobalScale, new Vector2(9999));
            ImGui.Begin("Cammy Configuration", ref isVisible);

            if (ImGui.BeginTabBar("CammyTabs"))
            {
                if (ImGui.BeginTabItem("Presets"))
                {
                    DrawPresetList();
                    ImGui.EndTabItem();
                }

                if (ImGui.BeginTabItem("Other Settings"))
                {
                    DrawOtherSettings();
                    ImGui.EndTabItem();
                }

                ImGui.EndTabBar();
            }

            ImGui.End();
        }
Ejemplo n.º 6
0
        public static void TabLabels(List <DockTab> tabs, ref DockTab selected)
        {
            if (tabs.Count > 0)
            {
                var flags = ImGuiTabBarFlags.Reorderable | ImGuiTabBarFlags.FittingPolicyScroll |
                            ImGuiTabBarFlags.AutoSelectNewTabs | ImGuiTabBarFlags.TabListPopupButton;
                ImGui.BeginTabBar("##tabbar", flags);
                for (int i = 0; i < tabs.Count; i++)
                {
                    bool isTabOpen = true;
                    if (ImGui.BeginTabItem(tabs[i].RenderTitle, ref isTabOpen, ImGuiTabItemFlags.None))
                    {
                        ImGui.EndTabItem();
                    }
                    if (!isTabOpen)
                    {
                        tabs[i].Dispose();
                        tabs.RemoveAt(i);
                        selected = null;
                    }
                    else
                    {
                        selected = tabs[i];
                    }
                }

                ImGui.EndTabBar();
            }
        }
Ejemplo n.º 7
0
        public void Draw()
        {
            if (m_ID2Item.Count == 0)
            {
                return;
            }
            bool onMenuEvent = false;

            if (ImGui.BeginTabBar("##TabBarViewTopTab", ImGuiTabBarFlags.AutoSelectNewTabs | ImGuiTabBarFlags.Reorderable))
            {
                foreach (var pair in m_ID2Item)
                {
                    if (pair.Value.state && ImGui.BeginTabItem(pair.Value.obj.Name + "##" + pair.Key, ref pair.Value.state))
                    {
                        ProcessSelectTab(pair.Key, pair.Value.obj);
                        ImGui.EndTabItem();
                    }

                    //Call menu drawer when drawer is setted
                    MenuDrawer?.DrawMenuView(pair.Value.obj, out onMenuEvent);
                    if (onMenuEvent)
                    {
                        break;
                    }
                }
                ImGui.EndTabBar();

                ProcessTabState();
            }
        }
Ejemplo n.º 8
0
        private void DrawInformation()
        {
            if (!ImGui.BeginTabItem("Information"))
            {
                return;
            }

            ImGui.BeginChild("scrolling", new Vector2(0, 0), false);

            ImGui.TextColored(new Vector4(0, 1, 0, 1), "Intro");
            ImGui.TextWrapped("This plugin allows you to create and set custom title screens.");
            ImGui.TextWrapped("To create a title screen, open the Create tab, head to your favorite location, " +
                              "and point your camera in the direction you'd like.");
            ImGui.TextWrapped("Give it a name, set the weather, the BGM, and the time for the title screen," +
                              " then click Generate. You can then head over to the Settings tab and use the " +
                              "title screen you defined as your new title screen upon opening the game.");

            ImGui.TextColored(new Vector4(0, 1, 0, 1), "Tips and tricks");
            ImGui.TextWrapped("Selecting Random as your title screen shuffles all installed screens. " +
                              "Selecting Random (custom) allows you to shuffle between a set of screens.");
            ImGui.TextWrapped("Pressing Ctrl + T on the title screen will show the TitleEdit menu.");
            ImGui.TextWrapped("TitleEdit presets are stored in the pluginConfigs/TitleEdit folder! " +
                              "If you are changing a file that is not there, it does not exist to TitleEdit!");
            ImGui.TextWrapped("TitleEdit reserves the TE_ suffix on new titles to avoid overwriting player presets.");
            ImGui.TextWrapped("Accessing the lobby, then going back to the title screen will re-load " +
                              "the title screen preset file, allowing for fast iteration on presets.");

            ImGui.TextColored(new Vector4(0, 1, 0, 1), "Known issues");
            ImGui.TextWrapped("- The sun and moon do not exist on title screens.");
            ImGui.TextWrapped("");

            ImGui.EndChild();
            ImGui.EndTabItem();
        }
Ejemplo n.º 9
0
        private static bool DrawGeneralTab(Configuration config, float scale)
        {
            if (!ImGui.BeginTabItem("General"))
            {
                return(false);
            }
            var changed = ImGui.Checkbox("Disable cooldown trigger while casting.",
                                         ref config.NoVibrationDuringCasting);

            changed |= ImGui.Checkbox("Disable cooldown trigger while weapon is sheathed.",
                                      ref config.NoVibrationWithSheathedWeapon);
            changed |= ImGui.Checkbox("Sense Aether Currents (out of combat).", ref config.SenseAetherCurrents);
            if (ImGui.IsItemHovered())
            {
                ImGui.BeginTooltip();
                ImGui.Text($"Gradually stronger vibration the closer you are to an Aether Current.");
                ImGui.EndTooltip();
            }

            if (config.SenseAetherCurrents)
            {
                ImGui.Indent();
                ImGui.SetNextItemWidth(250 * scale);
                var distance = (int)Math.Sqrt(config.MaxAetherCurrentSenseDistanceSquared);
                changed |= ImGui.SliderInt("##AetherSenseDistance", ref distance, 5, 115,
                                           "Max Sense Distance %d");
                config.MaxAetherCurrentSenseDistanceSquared = distance * distance;
                ImGui.Unindent();
            }

            ImGui.EndTabItem();
            return(changed);
        }
Ejemplo n.º 10
0
        private void DrawTab(bool installed, string statusText)
        {
            if (ImGui.BeginTabItem(installed ? Loc.Localize("InstallerInstalledPluginList", "Installed Plugins")
                                       : Loc.Localize("InstallerAvailablePluginList", "Available Plugins")))
            {
                ImGui.BeginChild(
                    "Scrolling" + (installed ? "Installed" : "Available"),
                    new Vector2(0, 384 * ImGui.GetIO().FontGlobalScale),
                    true,
                    ImGuiWindowFlags.HorizontalScrollbar | ImGuiWindowFlags.NoBackground);
                ImGui.SetCursorPosY(ImGui.GetCursorPosY() - 5);

                if (statusText != null)
                {
                    ImGui.TextColored(ImGuiColors.DalamudGrey, statusText);
                }
                else
                {
                    this.DrawPluginList(installed ? this.pluginListInstalled : this.pluginListAvailable, installed);
                }

                ImGui.EndChild();
                ImGui.EndTabItem();
            }
        }
Ejemplo n.º 11
0
    private static void DrawHelpTab()
    {
        if (!ImGui.BeginTabItem(i18n.tab_header_faq))
        {
            return;
        }
        ImGui.PushTextWrapPos(ImGui.GetFontSize() * 22f);

        if (ImGui.TreeNode(i18n.faq_how_does_this_work_header))
        {
            ImGui.TextWrapped(i18n.faq_how_does_this_work_entry);
            ImGui.TreePop();
        }

        if (ImGui.TreeNode(i18n.faq_limitations_header))
        {
            ImGui.TextWrapped(i18n.faq_limitations_entry);
            ImGui.TreePop();
        }

        if (ImGui.TreeNode(i18n.faq_wrong_placed_icons_header))
        {
            ImGui.TextWrapped(i18n.faq_wrong_placed_icons_entry);
            ImGui.TreePop();
        }

        if (ImGui.TreeNode(i18n.faq_resize_header))
        {
            ImGui.TextWrapped(i18n.faq_resize_entry);
            ImGui.TreePop();
        }

        if (ImGui.TreeNode(i18n.faq_fate_no_filter_circles_header))
        {
            ImGui.TextWrapped(i18n.faq_fate_no_filter_circles_entry);
            ImGui.TreePop();
        }

        if (ImGui.TreeNode(i18n.faq_use_map_header))
        {
            ImGui.TextWrapped(i18n.faq_use_map_entry);
            ImGui.TreePop();
        }

        if (ImGui.TreeNode(i18n.faq_use_map_tradeoffs_header))
        {
            ImGui.TextWrapped(i18n.faq_use_map_tradeoffs_entry);
            ImGui.TreePop();
        }

        if (ImGui.TreeNode(i18n.faq_compass_gone_header))
        {
            ImGui.TextWrapped(i18n.faq_compass_gone_entry);
            ImGui.TreePop();
        }


        ImGui.PopTextWrapPos();
        ImGui.EndTabItem();
    }
Ejemplo n.º 12
0
        private void DrawActiveDocuments()
        {
            if (ImGui.BeginTabBar("Active documents", ImGuiTabBarFlags.Reorderable | ImGuiTabBarFlags.TabListPopupButton | ImGuiTabBarFlags.FittingPolicyScroll))
            {
                foreach (var document in documents)
                {
                    if (!document.IsOpen || !document.IsDocked)
                    {
                        continue;
                    }

                    var docOpen = document.IsOpen;
                    if (ImGui.BeginTabItem(document.Title, ref docOpen, ImGuiTabItemFlags.None))
                    {
                        document.Draw(context);
                        ImGui.EndTabItem();
                    }

                    document.IsOpen = docOpen;
                }

                ImGui.EndTabBar();
            }

            ImGui.End();
        }
    public void DrawDebugViz()
    {
        bool _active = gameObject.activeInHierarchy;

        if (ImGui.Checkbox("gameobject active", ref _active))
        {
            gameObject.SetActive(_active);
        }

        ImGui.Spacing();

        ImGuiTabBarFlags f = ImGuiTabBarFlags.NoCloseWithMiddleMouseButton | ImGuiTabBarFlags.TabListPopupButton
                             | ImGuiTabBarFlags.FittingPolicyDefault | ImGuiTabBarFlags.Reorderable;

        if (ImGui.BeginTabBar(gameObject.name, f))
        {
            gameObject.SendMessage <IDebugViz>
                ((cmp) =>
            {
                if (ImGui.BeginTabItem(cmp.GetType().Name))
                {
                    cmp.DrawDebugViz();
                    ImGui.EndTabItem();
                }
            });
            ImGui.EndTabBar();
        }
    }
    private static void ImGuiUn_Layout()
    {
        if (!doDebugViz)
        {
            return;
        }

        ImGuiWindowFlags flags = ImGuiWindowFlags.NoNavFocus | ImGuiWindowFlags.NoFocusOnAppearing
                                 | ImGuiWindowFlags.HorizontalScrollbar;

        ImGui.SetNextWindowBgAlpha(0.35f);
        ImGui.SetNextWindowSize(new Vector2(400, 300), ImGuiCond.FirstUseEver);
        if (ImGui.Begin("debug viz", ref p_open, flags))
        {
            ImGuiTabBarFlags f = ImGuiTabBarFlags.NoCloseWithMiddleMouseButton | ImGuiTabBarFlags.TabListPopupButton;
            if (ImGui.BeginTabBar("debug_viz_tab", f))
            {
                foreach (var v in vizs)
                {
                    if (ImGui.BeginTabItem(v.gameObject.name))
                    {
                        v.DrawDebugViz();
                        ImGui.EndTabItem();
                    }
                }
                ImGui.EndTabBar();
            }

            ImGui.End();
        }
    }
Ejemplo n.º 15
0
    public override void Draw()
    {
        DebugManager.ClickToCopyText($"{Common.InventoryManagerAddress.ToInt64():X}");
        if (ImGui.BeginTabBar("inventoryDebuggingTabs"))
        {
            if (ImGui.BeginTabItem("Container/Slot"))
            {
                ImGui.PushItemWidth(200);
                if (ImGui.BeginCombo("###containerSelect", $"{inventoryType} [{(int)inventoryType}]"))
                {
                    foreach (var i in (InventoryType[])Enum.GetValues(typeof(InventoryType)))
                    {
                        if (ImGui.Selectable($"{i} [{(int) i}]##inventoryTypeSelect", i == inventoryType))
                        {
                            inventoryType = i;
                        }
                    }
                    ImGui.EndCombo();
                }

                var container = Common.GetContainer(inventoryType);

                ImGui.PopItemWidth();


                if (container != null)
                {
                    ImGui.Text($"Container Address:");
                    ImGui.SameLine();
                    DebugManager.ClickToCopyText($"{(ulong)container:X}");

                    ImGui.SameLine();
                    DebugManager.PrintOutObject(*container, (ulong)container, new List <string>());

                    if (ImGui.TreeNode("Items##containerItems"))
                    {
                        for (var i = 0; i < container->SlotCount; i++)
                        {
                            var item     = container->Items[i];
                            var itemAddr = ((ulong)container->Items) + (ulong)sizeof(InventoryItem) * (ulong)i;
                            DebugManager.ClickToCopyText($"{itemAddr:X}");
                            ImGui.SameLine();
                            DebugManager.PrintOutObject(item, (ulong)&item, new List <string> {
                                $"Items[{i}]"
                            }, false, $"[{i:00}] {item.Item?.Name ?? "<Not Found>"}");
                        }
                        ImGui.TreePop();
                    }
                }
                else
                {
                    ImGui.Text("Container not found.");
                }
                ImGui.EndTabItem();
            }

            ImGui.EndTabBar();
        }
    }
Ejemplo n.º 16
0
 protected void TabItemView(string label, ImGuiExNative.Callback action, ref bool p_open, ImGuiTabItemFlags flags)
 {
     if (ImGui.BeginTabItem(label, ref p_open, flags))
     {
         action();
         ImGui.EndTabItem();
     }
     ;
 }
Ejemplo n.º 17
0
 protected void TabItemView(string label, ImGuiExNative.Callback action)
 {
     if (ImGui.BeginTabItem(label))
     {
         action();
         ImGui.EndTabItem();
     }
     ;
 }
Ejemplo n.º 18
0
        private void DrawTabs()
        {
            if (ImGui.BeginTabBar("PriceCheckSettingsTabBar", ImGuiTabBarFlags.NoTooltip))
            {
                if (ImGui.BeginTabItem(Loc.Localize("General", "General") + "###PriceCheck_General_Tab"))
                {
                    this.currentTab = Tab.General;
                    ImGui.EndTabItem();
                }

                if (ImGui.BeginTabItem(Loc.Localize("Overlay", "Overlay") + "###PriceCheck_Overlay_Tab"))
                {
                    this.currentTab = Tab.Overlay;
                    ImGui.EndTabItem();
                }

                if (ImGui.BeginTabItem(Loc.Localize("Chat", "Chat") + "###PriceCheck_Chat_Tab"))
                {
                    this.currentTab = Tab.Chat;
                    ImGui.EndTabItem();
                }

                if (ImGui.BeginTabItem(Loc.Localize("Toast", "Toast") + "###PriceCheck_Toast_Tab"))
                {
                    this.currentTab = Tab.Toast;
                    ImGui.EndTabItem();
                }

                if (ImGui.BeginTabItem(Loc.Localize("Keybind", "Keybind") + "###PriceCheck_Keybind_Tab"))
                {
                    this.currentTab = Tab.Keybind;
                    ImGui.EndTabItem();
                }

                if (ImGui.BeginTabItem(Loc.Localize("Filters", "Filters") + "###PriceCheck_Filters_Tab"))
                {
                    this.currentTab = Tab.Filters;
                    ImGui.EndTabItem();
                }

                if (ImGui.BeginTabItem(Loc.Localize("Thresholds", "Thresholds") + "###PriceCheck_Thresholds_Tab"))
                {
                    this.currentTab = Tab.Thresholds;
                    ImGui.EndTabItem();
                }

                if (ImGui.BeginTabItem(Loc.Localize("ContextMenu", "Context Menu") + "###PriceCheck_ContextMenu_Tab"))
                {
                    this.currentTab = Tab.ContextMenu;
                    ImGui.EndTabItem();
                }

                ImGui.EndTabBar();
                ImGui.Spacing();
            }
        }
Ejemplo n.º 19
0
 private unsafe void SubmitEditorWindow()
 {
     ImGui.PushStyleVar(ImGuiStyleVar.WindowRounding, 0);
     ImGui.SetNextWindowSizeConstraints(Vector2.One * 500 * RuntimeOptions.Current.UiScale, Vector2.One * Controller.Context.Width);
     if (ImGui.Begin("Shader Editor"))
     {
         ImGui.PushFont(RuntimeOptions.Current.EditorFont);
         if (ImGui.BeginTabBar("editor mode"))
         {
             if (ImGui.BeginTabItem("Advanced"))
             {
                 basicMode = false;
                 SubmitAdvancedEditor();
                 ImGui.EndTabItem();
             }
             if (ImGui.BeginTabItem("Basic"))
             {
                 basicMode = true;
                 if (ImGui.BeginChild("editor basic", Vector2.Zero, true))
                 {
                     Vector2 editorWindowSize = ImGui.GetWindowSize();
                     float   textSize         = ImGui.CalcTextSize(fragmentCode).Y + 32;
                     ImGui.PushItemWidth(-1);
                     ImGui.InputTextMultiline("",
                                              ref fragmentCode,
                                              MAXEDITORSTRINGLENGTH,
                                              new Vector2(editorWindowSize.X - 16, textSize > editorWindowSize.Y ? textSize : editorWindowSize.Y - 16),
                                              ImGuiInputTextFlags.AllowTabInput);
                     ImGui.PopItemWidth();
                 }
                 ImGui.EndTabItem();
             }
             ImGui.EndTabBar();
         }
         ImGui.PopFont();
         ImGui.End();
     }
     if (errorMessages.Count != 0)
     {
         ImGui.SetNextWindowSizeConstraints(new Vector2(500, 16), new Vector2(500, 500));
         ImGui.BeginTooltip();
         ImGui.PushTextWrapPos();
         for (int i = 0; i < errorMessages.Count; i++)
         {
             string errorMessage = errorMessages[i];
             if (string.IsNullOrWhiteSpace(errorMessage))
             {
                 continue;
             }
             ImGui.TextColored(RgbaFloat.Red.ToVector4(), errorMessage);
         }
         ImGui.PopTextWrapPos();
         ImGui.EndTooltip();
     }
     ImGui.PopStyleVar();
 }
Ejemplo n.º 20
0
            public void Draw()
            {
                var ret = ImGui.BeginTabItem("Available Mods");

                if (!ret)
                {
                    return;
                }

                ImGui.Text("woah");
                ImGui.EndTabItem();
            }
Ejemplo n.º 21
0
 private void DrawCredits()
 {
     if (!ImGui.BeginTabItem("Credits"))
     {
         return;
     }
     ImGui.Text("attick - Title Edit 1.0 and many functions of 2.0");
     ImGui.Text("perchbird - Custom title screens and supporting features");
     ImGui.Text("ff-meli - BGM now playing code");
     ImGui.Text("goat - being a caprine individual");
     ImGui.EndTabItem();
 }
Ejemplo n.º 22
0
        void DrawResourceMods()
        {
            var ret = ImGui.BeginTabItem("Resource Mods");

            if (!ret)
            {
                return;
            }

            DrawModsSelector();

            ImGui.SameLine();

            if (_selectedMod != null)
            {
                try
                {
                    ImGui.BeginChild("selectedModInfo", AutoFillSize, true);

                    ImGui.Text(_selectedMod.Meta.Name);
                    ImGui.SameLine();
                    ImGui.TextColored(new Vector4(1f, 1f, 1f, 0.66f), "by");
                    ImGui.SameLine();
                    ImGui.Text(_selectedMod.Meta.Author);

                    ImGui.TextWrapped(_selectedMod.Meta.Description ?? "");

                    ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 12);

                    // list files
                    ImGui.Text("Files:");
                    ImGui.SetNextItemWidth(-1);
                    if (ImGui.ListBoxHeader("##", AutoFillSize))
                    {
                        foreach (var file in _selectedMod.ModFiles)
                        {
                            ImGui.Selectable(file.FullName);
                        }
                    }

                    ImGui.ListBoxFooter();

                    ImGui.EndChild();
                }
                catch (Exception ex)
                {
                    PluginLog.LogError(ex, "f**k");
                }
            }

            ImGui.EndTabItem();
        }
Ejemplo n.º 23
0
        private static bool DrawTriggerTab(Configuration config, DalamudPluginInterface pi, float scale,
                                           IEnumerable <ClassJob> jobs, IReadOnlyCollection <FFXIVAction> allActions)
        {
            if (!ImGui.BeginTabItem("Cooldown Triggers"))
            {
                return(false);
            }
            var changed = false;

            changed |= DrawCooldownTriggers(config, scale, jobs, allActions);
            ImGui.EndTabItem();
            return(changed);
        }
Ejemplo n.º 24
0
        /// <inheritdoc/>
        public override void Draw()
        {
            if (ImGui.BeginTabBar("###PlayerTrack_Config_TabBar", ImGuiTabBarFlags.None))
            {
                if (ImGui.BeginTabItem(Loc.Localize("DisplayConfig", "Display")))
                {
                    WindowManager.SpacerWithTabs();
                    this.DisplayConfig();
                    ImGui.EndTabItem();
                }

                if (ImGui.BeginTabItem(Loc.Localize("ProcessingConfig", "Processing")))
                {
                    WindowManager.SpacerWithTabs();
                    this.ProcessingConfig();
                    ImGui.EndTabItem();
                }

                if (ImGui.BeginTabItem(Loc.Localize("IconConfig", "Icons")))
                {
                    WindowManager.SpacerWithTabs();
                    this.IconConfig();
                    ImGui.EndTabItem();
                }

                if (ImGui.BeginTabItem(Loc.Localize("NamePlateConfig", "NamePlates")))
                {
                    WindowManager.SpacerWithTabs();
                    this.NamePlateConfig();
                    ImGui.EndTabItem();
                }

                if (ImGui.BeginTabItem(Loc.Localize("IntegrationConfig", "Integrations")))
                {
                    WindowManager.SpacerWithTabs();
                    this.IntegrationsConfig();
                    ImGui.EndTabItem();
                }

                if (ImGui.BeginTabItem(Loc.Localize("CategoryConfig", "Categories")))
                {
                    WindowManager.SpacerWithTabs();
                    this.CategoryConfig();
                    ImGui.EndTabItem();
                }

                ImGui.EndTabBar();
            }

            ImGui.Spacing();
        }
Ejemplo n.º 25
0
        public override void Draw()
        {
            if (ImGui.BeginTabBar(Name))
            {
                if (ImGui.BeginTabItem($"Sheet Cache##luminaDebugging"))
                {
                    cacheField ??= Plugin.PluginInterface.Data.Excel.GetType().GetField("_sheetCache", BindingFlags.Instance | BindingFlags.NonPublic);

                    if (cacheField == null)
                    {
                        ImGui.Text("Missing Field: _sheetCache");
                        return;
                    }

                    var cache = (Dictionary <Tuple <Language, ulong>, ExcelSheetImpl>)(cacheField.GetValue(Plugin.PluginInterface.Data.Excel));
                    if (ImGui.Button("Clear all Cache"))
                    {
                        cache.Clear();
                    }
                    ImGui.Columns(4);

                    Tuple <Language, ulong> delete = null;

                    foreach (var kvp in cache)
                    {
                        ImGui.Text($"{kvp.Key.Item1}");
                        ImGui.NextColumn();
                        ImGui.Text($"{kvp.Value.Name}");
                        ImGui.NextColumn();
                        ImGui.Text($"{kvp.Key.Item2:X}");
                        ImGui.NextColumn();
                        if (ImGui.SmallButton($"Remove##{kvp.Key.Item2}_{kvp.Key.Item1}_{kvp.Value.Name}"))
                        {
                            delete = kvp.Key;
                        }
                        ImGui.NextColumn();
                    }

                    if (delete != null)
                    {
                        cache.Remove(delete);
                    }

                    ImGui.Columns();
                    ImGui.EndTabItem();
                }
                ImGui.EndTabBar();
            }
        }
Ejemplo n.º 26
0
            public void Draw()
            {
                var ret = ImGui.BeginTabItem(LabelTab);

                if (!ret)
                {
                    return;
                }

                using var raii = ImGuiRaii.DeferredEnd(ImGui.EndTabItem);

                Selector.Draw();
                ImGui.SameLine();
                ModPanel.Draw();
            }
Ejemplo n.º 27
0
 private void OnBuildUi_AboutTab()
 {
     if (ImGui.BeginTabItem("About"))
     {
         ImGui.TextWrapped("");
         ImGui.TextWrapped("- The scale is 1.0 for 'default', 2.0 for double etc.");
         ImGui.TextWrapped("- Use X and Y Adjust to make the icon appear where you want, relative to the player.");
         ImGui.TextWrapped("- The icons only apply to party members.");
         ImGui.TextWrapped("- If there is a problem, let me (Haplo) know on Discord.");
         ImGui.TextWrapped("\nShoutouts:");
         ImGui.TextWrapped("Big shoutout to daemitus for the second re-write of the code. Without them, many features would have been much harder!");
         ImGui.TextWrapped("And shoutouts to aers, adam, caraxi, goat and many others for allowing me to pester them for simple issues.");
         ImGui.EndTabItem();
     }
 }
Ejemplo n.º 28
0
        public override void Draw()
        {
            ImGui.BeginTabBar("##tabs");
            int idx = typeIndex;

            ImGui.Combo("Type", ref typeIndex, typeNames, typeNames.Length);
            if (idx != typeIndex)
            {
                RecreateCurve();
            }
            if (ImGui.BeginTabItem("Points"))
            {
                ImGui.InputFloat4("Point", ref p);
                if (ImGui.Button("Add"))
                {
                    points.Add(p);
                    p = Vector4.Zero;
                    RecreateCurve();
                }

                ImGui.SameLine();
                if (ImGui.Button("Clear"))
                {
                    points.Clear();
                    RecreateCurve();
                }
                var height = ImGui.GetWindowHeight() - 110;
                ImGui.BeginChild("##points", new Vector2(-1, height), true);
                int ik = 0;
                foreach (var p in points)
                {
                    ImGui.Selectable(ImGuiExt.IDWithExtra(p.ToString(), ik++));
                }
                ImGui.EndChild();


                ImGui.EndTabItem();
            }

            if (ImGui.BeginTabItem("Graph"))
            {
                var gWidth  = ImGui.GetWindowContentRegionWidth() - 40;
                var gHeight = ImGui.GetWindowHeight() - 60;
                ImGui.PlotLines("##graph", ref values[0], values.Length, 0, "", scaleMin, scaleMax, new Vector2(gWidth, gHeight));
                ImGui.EndTabItem();
            }
            ImGui.EndTabBar();
        }
Ejemplo n.º 29
0
        static void GuiCostText(ComponentDesigner componentDesigner) //Prints a 2 col table with the costs of the part
        {
            //ImGui.BeginChild("Cost");
            if (componentDesigner != null) //If a part time is selected
            {
                ImGui.Columns(2);
                ImGui.BeginTabItem("Cost");

                ImGui.Text("Mass");
                ImGui.Text("Volume_km3");
                ImGui.Text("Crew Requred");
                ImGui.Text("Cost");
                ImGui.Text("Research Cost");
                ImGui.Text("Build Cost");
                ImGui.Text("Resource Costs");
                ImGui.NextColumn(); //Add all the cost names to col 1


                ImGui.Text(Stringify.Mass(componentDesigner.MassValue));
                ImGui.Text(Stringify.Volume(componentDesigner.VolumeM3Value));
                ImGui.Text(componentDesigner.CrewReqValue.ToString());
                ImGui.Text(componentDesigner.CreditCostValue.ToString());
                ImGui.Text(componentDesigner.ResearchCostValue.ToString() + " RP");
                ImGui.Text(componentDesigner.IndustryPointCostsValue.ToString() + " BP");
                ImGui.NextColumn(); //Add all the price values to col 2


                foreach (var kvp in componentDesigner.ResourceCostValues)
                {
                    var resource = StaticRefLib.StaticData.CargoGoods.GetAny(kvp.Key);
                    if (resource == null)
                    {
                        resource = (ICargoable)_state.Faction.GetDataBlob <FactionInfoDB>().IndustryDesigns[kvp.Key];
                    }
                    var xpos = ImGui.GetCursorPosX();
                    ImGui.SetCursorPosX(xpos + 12);
                    ImGui.Text(resource.Name);
                    ImGui.NextColumn();
                    ImGui.Text(kvp.Value.ToString());
                    ImGui.NextColumn();
                }
            }

            //ImGui.EndChild();
        }
Ejemplo n.º 30
0
        private void DrawPlayerModelTab()
        {
            if (!ImGui.BeginTabItem("Model Debug"))
            {
                return;
            }

            using var raii = ImGuiRaii.DeferredEnd(ImGui.EndTabItem);

            var player = Dalamud.ClientState.LocalPlayer;

            if (player == null)
            {
                return;
            }

            DrawPlayerModelInfo(player);
        }