From 33a01208812091b0cb406a6d90cfb06f7f07f344 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Sat, 11 May 2024 14:46:51 -0300 Subject: [PATCH] framework updates --- Libs/DF/dropdown.lua | 4 ++++ Libs/DF/panel.lua | 2 +- functions/profiles.lua | 13 +++++++------ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Libs/DF/dropdown.lua b/Libs/DF/dropdown.lua index 58628d10..351fbd42 100644 --- a/Libs/DF/dropdown.lua +++ b/Libs/DF/dropdown.lua @@ -399,6 +399,10 @@ function DropDownMetaFunctions:Select(optionName, byOptionNumber, bOnlyShown, ru local runOkay, optionsTable = xpcall(self.func, geterrorhandler(), self) + if (type(optionsTable) ~= "table") then + error("optionsTable for Dropdown:Select() is not of type 'table'. Check if the dropdown menu function is returning a table.") + end + if (#optionsTable == 0) then self:NoOption(true) return true diff --git a/Libs/DF/panel.lua b/Libs/DF/panel.lua index 65991a66..9646bd95 100644 --- a/Libs/DF/panel.lua +++ b/Libs/DF/panel.lua @@ -2580,7 +2580,7 @@ function detailsFramework:ShowTextPromptPanel(message, callback) textbox:SetPoint("topleft", promptFrame, "topleft", 10, -60) promptFrame.EntryBox = textbox - local buttonTrue = detailsFramework:CreateButton(promptFrame, nil, 60, 20, "Okey", nil, nil, nil, nil, nil, nil, options_dropdown_template) + local buttonTrue = detailsFramework:CreateButton(promptFrame, nil, 60, 20, "Okay", nil, nil, nil, nil, nil, nil, options_dropdown_template) buttonTrue:SetPoint("bottomright", promptFrame, "bottomright", -10, 5) promptFrame.button_true = buttonTrue diff --git a/functions/profiles.lua b/functions/profiles.lua index 167d39a1..113f3fd7 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -902,8 +902,8 @@ local default_profile = { }, --segments - segments_amount = 40, - segments_amount_to_save = 40, + segments_amount = 25, + segments_amount_to_save = 15, segments_panic_mode = false, segments_auto_erase = 1, @@ -2035,9 +2035,10 @@ function Details:ImportProfile (profileString, newProfileName, bImportAutoRunCod mythicPlusSettings.mythicrun_chart_frame_minimized = {} mythicPlusSettings.finished_run_frame = {} - --make the max amount of segments be 30 - Details.segments_amount = 40 - Details.segments_amount_to_save = 40 + --max segments allowed + Details.segments_amount = 25 + --max segments to save between sections + Details.segments_amount_to_save = 15 --transfer instance data to the new created profile profileObject.instances = DetailsFramework.table.copy({}, profileData.instances) @@ -2105,7 +2106,7 @@ function Details.ShowImportProfileConfirmation(message, callback) checkboxLabel:SetJustifyH("left") promptFrame.checkboxLabel = checkboxLabel - local buttonTrue = detailsFramework:CreateButton(promptFrame, nil, 60, 20, "Okey", nil, nil, nil, nil, nil, nil, options_dropdown_template) + local buttonTrue = detailsFramework:CreateButton(promptFrame, nil, 60, 20, "Okay", nil, nil, nil, nil, nil, nil, options_dropdown_template) buttonTrue:SetPoint("bottomright", promptFrame, "bottomright", -10, 5) promptFrame.button_true = buttonTrue