From 9e09de7f634d1fa99f860bf16174302697a60dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E6=B0=B4?= <1123993881@qq.com> Date: Mon, 14 Aug 2023 23:10:19 +0800 Subject: [PATCH] fixed: show result. --- Resources/AnimationLockTime.json | 610 ------------------ RotationSolver/UI/RotationConfigWindow.cs | 21 +- .../UI/RotationConfigWindow_Config.cs | 1 + 3 files changed, 11 insertions(+), 621 deletions(-) diff --git a/Resources/AnimationLockTime.json b/Resources/AnimationLockTime.json index e5df7fd20..e69de29bb 100644 --- a/Resources/AnimationLockTime.json +++ b/Resources/AnimationLockTime.json @@ -1,610 +0,0 @@ -{ - "3": 0.6, - "9": 0.6, - "15": 0.6, - "16": 0.6, - "17": 0.6, - "20": 0.6, - "22": 0.6, - "23": 0.6, - "24": 0.6, - "28": 0.6, - "29": 0.6, - "31": 0.6, - "37": 0.6, - "38": 0.6, - "40": 0.6, - "41": 0.6, - "42": 0.6, - "43": 0.6, - "44": 0.6, - "45": 0.6, - "46": 0.6, - "48": 0.6, - "52": 0.6, - "53": 0.6, - "54": 0.6, - "56": 0.6, - "61": 0.6, - "62": 0.6, - "65": 0.6, - "66": 0.6, - "69": 0.6, - "70": 0.6, - "74": 0.6, - "75": 0.6, - "78": 0.6, - "83": 0.6, - "85": 0.6, - "87": 0.6, - "90": 0.6, - "95": 0.8, - "96": 0.8, - "97": 0.6, - "98": 0.6, - "100": 0.6, - "101": 0.6, - "106": 0.6, - "107": 0.6, - "110": 0.6, - "113": 0.6, - "114": 0.6, - "116": 0.6, - "117": 0.6, - "118": 0.6, - "120": 0.1, - "121": 0.6, - "124": 0.1, - "125": 0.6, - "127": 0.1, - "131": 0.1, - "132": 0.6, - "133": 0.1, - "135": 0.1, - "136": 0.6, - "137": 0.6, - "139": 0.1, - "140": 0.6, - "141": 0.1, - "147": 0.1, - "149": 0.6, - "152": 0.6, - "153": 0.1, - "154": 0.1, - "156": 0.6, - "158": 0.6, - "159": 0.1, - "162": 0.1, - "167": 0.6, - "173": 0.6, - "181": 0.6, - "185": 0.1, - "190": 0.1, - "260": 0.6, - "265": 0.6, - "266": 0.6, - "2240": 0.6, - "2242": 0.6, - "2245": 0.6, - "2248": 0.6, - "2255": 0.6, - "2258": 0.6, - "2259": 0.35, - "2262": 0.8, - "2263": 0.35, - "2264": 0.6, - "2267": 0.6, - "2269": 0.6, - "2271": 0.6, - "2874": 0.6, - "2876": 0.6, - "2878": 0.6, - "2890": 0.6, - "3176": 0.1, - "3538": 0.6, - "3539": 0.6, - "3541": 0.1, - "3542": 0.6, - "3543": 0.6, - "3545": 0.6, - "3546": 0.6, - "3549": 0.6, - "3550": 0.6, - "3551": 0.6, - "3552": 0.6, - "3554": 0.6, - "3555": 0.6, - "3556": 0.6, - "3557": 0.6, - "3558": 0.6, - "3559": 0.6, - "3560": 0.6, - "3562": 0.6, - "3563": 0.6, - "3566": 0.6, - "3568": 0.1, - "3569": 0.6, - "3570": 0.6, - "3571": 0.6, - "3573": 0.6, - "3574": 0.6, - "3576": 0.1, - "3577": 0.1, - "3578": 0.6, - "3579": 0.1, - "3582": 0.6, - "3587": 0.6, - "3590": 0.6, - "3593": 0.6, - "3594": 0.1, - "3595": 0.6, - "3596": 0.1, - "3598": 0.1, - "3599": 0.6, - "3600": 0.6, - "3601": 0.1, - "3603": 0.6, - "3606": 0.6, - "3608": 0.6, - "3610": 0.1, - "3612": 0.6, - "3613": 0.6, - "3614": 0.6, - "3615": 0.1, - "3625": 0.6, - "4262": 0.6, - "4401": 0.6, - "4402": 0.6, - "4403": 0.6, - "4404": 0.6, - "4405": 0.6, - "4406": 0.6, - "4551": 1.1, - "4574": 0.6, - "4594": 1.1, - "4639": 0.6, - "4643": 0.6, - "4868": 2.1, - "6993": 2.1, - "7381": 0.6, - "7383": 0.6, - "7384": 0.6, - "7385": 0.6, - "7386": 0.6, - "7387": 0.6, - "7388": 0.6, - "7389": 0.6, - "7394": 0.6, - "7395": 0.6, - "7396": 0.6, - "7398": 0.6, - "7399": 0.6, - "7400": 0.6, - "7402": 0.6, - "7403": 0.6, - "7404": 0.6, - "7405": 0.6, - "7406": 0.6, - "7407": 0.6, - "7408": 0.6, - "7409": 0.6, - "7410": 0.6, - "7411": 0.6, - "7412": 0.6, - "7413": 0.6, - "7414": 0.6, - "7418": 0.6, - "7419": 0.8, - "7421": 0.6, - "7426": 0.6, - "7427": 0.6, - "7429": 0.6, - "7430": 0.6, - "7431": 0.1, - "7432": 0.6, - "7433": 0.6, - "7436": 0.6, - "7439": 0.6, - "7442": 0.1, - "7443": 0.6, - "7447": 0.1, - "7477": 0.6, - "7478": 0.6, - "7479": 0.6, - "7480": 0.6, - "7481": 0.6, - "7482": 0.6, - "7483": 0.6, - "7484": 0.6, - "7485": 0.6, - "7486": 0.6, - "7487": 0.1, - "7488": 0.1, - "7489": 0.1, - "7490": 0.6, - "7491": 0.6, - "7495": 0.6, - "7499": 0.6, - "7503": 0.1, - "7505": 0.6, - "7506": 0.6, - "7507": 0.6, - "7509": 0.6, - "7510": 0.1, - "7511": 0.1, - "7513": 0.6, - "7514": 0.6, - "7517": 0.6, - "7518": 0.6, - "7519": 0.6, - "7520": 0.6, - "7521": 0.6, - "7523": 0.6, - "7524": 0.1, - "7525": 0.6, - "7526": 0.6, - "7531": 0.6, - "7533": 0.6, - "7535": 0.6, - "7538": 0.6, - "7540": 0.6, - "7541": 0.6, - "7542": 0.6, - "7546": 0.6, - "7548": 0.6, - "7549": 0.6, - "7551": 0.6, - "7552": 0.1, - "7557": 0.6, - "7559": 0.6, - "7560": 0.6, - "7561": 0.6, - "7562": 0.6, - "7568": 0.1, - "7863": 0.6, - "8166": 2.1, - "8341": 0.1, - "8570": 0.1, - "8701": 2.1, - "9483": 0.6, - "9793": 0.1, - "10079": 2.1, - "10083": 0.1, - "11398": 0.1, - "11406": 0.1, - "11411": 0.1, - "11423": 0.6, - "11427": 0.6, - "12260": 0.1, - "12669": 1.1, - "14083": 2.1, - "14100": 2.1, - "14234": 2.1, - "14241": 2.1, - "14251": 2.1, - "14414": 1.3000001, - "14415": 0.5, - "14569": 0.1, - "14971": 1.1, - "15989": 0.6, - "15990": 0.6, - "15991": 0.6, - "15992": 0.6, - "15993": 0.6, - "15994": 0.6, - "15995": 0.6, - "15996": 0.6, - "15997": 0.6, - "15998": 0.6, - "15999": 0.6, - "16000": 0.6, - "16001": 0.6, - "16002": 0.6, - "16005": 0.6, - "16006": 0.6, - "16007": 0.6, - "16008": 0.6, - "16009": 0.6, - "16010": 0.6, - "16011": 0.6, - "16012": 0.6, - "16013": 0.6, - "16014": 0.6, - "16015": 0.6, - "16030": 2.1, - "16137": 0.6, - "16138": 0.6, - "16139": 0.6, - "16140": 0.6, - "16141": 0.6, - "16142": 0.6, - "16143": 0.6, - "16145": 0.6, - "16146": 0.70000005, - "16147": 0.5, - "16148": 0.6, - "16149": 0.6, - "16150": 0.77000004, - "16151": 0.6, - "16152": 0.6, - "16153": 0.6, - "16154": 0.6, - "16156": 0.6, - "16157": 0.6, - "16158": 0.6, - "16159": 0.6, - "16160": 0.6, - "16162": 0.6, - "16163": 0.6, - "16164": 0.6, - "16165": 0.6, - "16457": 0.6, - "16458": 0.6, - "16459": 0.6, - "16460": 0.6, - "16461": 0.6, - "16462": 0.6, - "16464": 0.6, - "16473": 0.6, - "16478": 0.8, - "16479": 0.6, - "16480": 1.5, - "16481": 0.6, - "16482": 0.6, - "16485": 0.6, - "16486": 0.6, - "16487": 0.6, - "16489": 0.6, - "16492": 0.6, - "16493": 0.6, - "16495": 0.6, - "16496": 0.6, - "16498": 0.6, - "16500": 0.6, - "16501": 0.6, - "16505": 0.1, - "16506": 0.6, - "16507": 0.6, - "16508": 0.6, - "16510": 0.6, - "16511": 0.1, - "16514": 0.6, - "16524": 0.1, - "16525": 0.1, - "16526": 0.6, - "16527": 0.6, - "16530": 0.6, - "16531": 0.6, - "16532": 0.6, - "16533": 0.1, - "16534": 0.6, - "16535": 0.6, - "16536": 0.6, - "16542": 0.6, - "16552": 0.6, - "16553": 0.6, - "16554": 0.6, - "16555": 0.6, - "16556": 0.6, - "16557": 0.6, - "16559": 0.6, - "16766": 0.1, - "16926": 0.1, - "17209": 0.6, - "17215": 0.1, - "17527": 2.1, - "17841": 2.1, - "17842": 2.1, - "17843": 2.1, - "18303": 0.1, - "18308": 0.1, - "18309": 0.1, - "18318": 0.1, - "18322": 0.1, - "18873": 0.6, - "18877": 0.6, - "18881": 0.6, - "19002": 0.6, - "19004": 0.6, - "19008": 0.6, - "19010": 0.6, - "19012": 0.6, - "19016": 0.6, - "19297": 0.6, - "20243": 0.1, - "20245": 0.1, - "20250": 0.1, - "20253": 0.1, - "20258": 0.1, - "20304": 0.6, - "20542": 2.1, - "20543": 2.1, - "20640": 2.1, - "20710": 0.1, - "20715": 0.6, - "20727": 0.6, - "21052": 2.1, - "21054": 2.1, - "21206": 0.6, - "21282": 2.1, - "21291": 2.1, - "21292": 2.1, - "21910": 2.1, - "21912": 2.1, - "21913": 2.1, - "21925": 0.1, - "22185": 0.6, - "22189": 0.6, - "22377": 2.1, - "22382": 0.1, - "22411": 1.1, - "22478": 2.1, - "22605": 2.1, - "23023": 2.1, - "23036": 2.1, - "23044": 0.1, - "23045": 0.1, - "23048": 0.1, - "23264": 0.1, - "23284": 0.1, - "23317": 2.1, - "23915": 0.1, - "23986": 2.1, - "24222": 2.1, - "24235": 2.1, - "24283": 0.1, - "24284": 0.1, - "24285": 0.6, - "24289": 0.6, - "24290": 2.1, - "24291": 0.6, - "24292": 0.6, - "24294": 0.6, - "24295": 0.70000005, - "24296": 0.6, - "24297": 0.6, - "24298": 0.6, - "24299": 0.6, - "24300": 2.1, - "24301": 0.6, - "24302": 0.6, - "24303": 0.6, - "24304": 0.6, - "24305": 0.6, - "24309": 0.6, - "24310": 0.6, - "24312": 0.1, - "24313": 0.6, - "24315": 0.6, - "24316": 0.6, - "24373": 0.6, - "24374": 0.6, - "24375": 0.6, - "24376": 0.6, - "24377": 0.6, - "24378": 0.6, - "24380": 0.6, - "24382": 0.6, - "24383": 0.6, - "24384": 0.6, - "24385": 0.6, - "24386": 0.1, - "24387": 0.6, - "24388": 0.6, - "24389": 0.6, - "24392": 0.6, - "24393": 0.6, - "24394": 0.6, - "24395": 0.6, - "24396": 0.6, - "24398": 0.1, - "24399": 0.6, - "24405": 0.6, - "24628": 2.1, - "24955": 0.1, - "25063": 2.1, - "25064": 2.1, - "25065": 2.1, - "25746": 0.6, - "25747": 0.6, - "25748": 0.6, - "25749": 0.6, - "25750": 0.6, - "25751": 0.6, - "25752": 0.6, - "25753": 1.15, - "25758": 0.6, - "25759": 0.6, - "25760": 0.6, - "25761": 0.6, - "25762": 0.6, - "25763": 0.6, - "25766": 0.6, - "25768": 0.6, - "25769": 0.6, - "25771": 0.6, - "25772": 0.6, - "25773": 0.6, - "25774": 0.6, - "25778": 0.6, - "25780": 0.6, - "25784": 0.6, - "25785": 0.6, - "25788": 0.6, - "25789": 0.6, - "25790": 0.6, - "25791": 0.6, - "25793": 0.1, - "25796": 0.6, - "25797": 0.6, - "25798": 0.1, - "25799": 0.6, - "25801": 0.6, - "25805": 0.6, - "25806": 0.6, - "25807": 0.6, - "25820": 0.6, - "25826": 0.1, - "25830": 0.6, - "25835": 0.75, - "25836": 0.6, - "25837": 0.1, - "25838": 0.6, - "25839": 0.6, - "25840": 0.6, - "25855": 0.6, - "25856": 0.6, - "25857": 0.6, - "25859": 0.1, - "25860": 0.1, - "25861": 0.6, - "25862": 0.6, - "25865": 0.1, - "25870": 0.6, - "25871": 0.6, - "25872": 0.1, - "25873": 0.6, - "25875": 0.6, - "25882": 0.6, - "25885": 0.6, - "26762": 0.1, - "26768": 0.1, - "26791": 2.1, - "26798": 2.1, - "26802": 2.1, - "26804": 0.6, - "28619": 2.1, - "28662": 0.1, - "28896": 2.1, - "28900": 2.1, - "28901": 2.1, - "28917": 2.1, - "28924": 2.1, - "29223": 0.1, - "29224": 0.1, - "29226": 0.6, - "29228": 0.6, - "29391": 0.1, - "29392": 0.6, - "29393": 0.6, - "29394": 0.6, - "29395": 0.6, - "29396": 0.6, - "29397": 0.6, - "29398": 0.6, - "29400": 0.6, - "29401": 2.5, - "29709": 0.1, - "30800": 0.1, - "31323": 2.1, - "31338": 2.1, - "31929": 0.1, - "31930": 0.1, - "31931": 0.1, - "33041": 2.1, - "33336": 0.1, - "33337": 0.1, - "33341": 0.1, - "33708": 2.1, - "33907": 2.1 -} \ No newline at end of file diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs index cc7f3f783..b785abb69 100644 --- a/RotationSolver/UI/RotationConfigWindow.cs +++ b/RotationSolver/UI/RotationConfigWindow.cs @@ -355,14 +355,15 @@ private void DrawBody() ImGui.SetCursorPos(ImGui.GetCursorPos() + Vector2.One * 8 * _scale); if (BeginChild("Rotation Solver Body", -Vector2.One)) { - ImGui.PushFont(ImGuiHelper.GetFont(18)); - ImGui.PushStyleColor(ImGuiCol.Text, ImGui.ColorConvertFloat4ToU32(ImGuiColors.DalamudYellow)); - ImGui.TextWrapped(LocalizationManager.RightLang.ConfigWindow_Search_Result); - ImGui.PopStyleColor(); - ImGui.PopFont(); - ImGui.Spacing(); if (_searchResults != null && _searchResults.Any()) { + ImGui.PushFont(ImGuiHelper.GetFont(18)); + ImGui.PushStyleColor(ImGuiCol.Text, ImGui.ColorConvertFloat4ToU32(ImGuiColors.DalamudYellow)); + ImGui.TextWrapped(LocalizationManager.RightLang.ConfigWindow_Search_Result); + ImGui.PopStyleColor(); + ImGui.PopFont(); + ImGui.Spacing(); + foreach (var searchable in _searchResults) { searchable?.Draw(Job, true); @@ -884,14 +885,14 @@ private static unsafe void DrawActions() ImGui.TableSetupColumn("Action Column", ImGuiTableColumnFlags.WidthFixed, ImGui.GetWindowWidth() / 2); ImGui.TableNextColumn(); - if (_actionsList != null && BeginChild("Rotation Solver Action List")) + if (_actionsList != null) { _actionsList.ClearCollapsingHeader(); if (RotationUpdater.RightNowRotation != null) { var size = 30 * _scale; - var count = Math.Max(1, (int)MathF.Floor(ImGui.GetWindowWidth() / (size + ImGui.GetStyle().ItemSpacing.X))); + var count = Math.Max(1, (int)MathF.Floor(ImGui.GetColumnWidth() / (size * 1.1f + ImGui.GetStyle().ItemSpacing.X))); foreach (var pair in RotationUpdater.AllGroupedActions) { _actionsList.AddCollapsingHeader(() => pair.Key, () => @@ -934,7 +935,6 @@ private static unsafe void DrawActions() } _actionsList.Draw(); - ImGui.EndChild(); } ImGui.TableNextColumn(); @@ -996,7 +996,7 @@ private static unsafe void DrawActions() ActionSequencerUpdater.DrawHeader(30 * _scale); - if (_sequencerList != null && _activeAction != null && BeginChild("Rotation Solver Sequencer List")) + if (_sequencerList != null && _activeAction != null) { var enable = _activeAction.IsEnabled; if (ImGui.Checkbox($"{_activeAction.Name}##{_activeAction.Name} Enabled", ref enable)) @@ -1016,7 +1016,6 @@ private static unsafe void DrawActions() } _sequencerList.Draw(); - ImGui.EndChild(); } ImGui.EndTable(); diff --git a/RotationSolver/UI/RotationConfigWindow_Config.cs b/RotationSolver/UI/RotationConfigWindow_Config.cs index f2a26cb3e..82e14ca09 100644 --- a/RotationSolver/UI/RotationConfigWindow_Config.cs +++ b/RotationSolver/UI/RotationConfigWindow_Config.cs @@ -33,6 +33,7 @@ private void SearchingBox() int index = 0; while (enumerator.MoveNext() && index < MAX_RESULT_LENGTH) { + if (_searchResults.Contains(enumerator.Current)) continue; _searchResults[index++] = enumerator.Current; } }