From 5887877b4bf05cb6dae31287af5322001ba8009d Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Thu, 11 Mar 2021 13:34:50 -0300 Subject: [PATCH] Maximum amount of segments raised to 40, this change will help with the mythic+ overall segment --- frames/window_options2_sections.lua | 6 +++--- functions/profiles.lua | 12 ++++++++---- startup.lua | 3 +++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/frames/window_options2_sections.lua b/frames/window_options2_sections.lua index 5482e7a6..5100e8b1 100644 --- a/frames/window_options2_sections.lua +++ b/frames/window_options2_sections.lua @@ -374,7 +374,7 @@ do afterUpdate() end, min = 1, - max = 30, + max = 40, step = 1, name = Loc ["STRING_OPTIONS_MAXSEGMENTS"], desc = Loc ["STRING_OPTIONS_MAXSEGMENTS_DESC"], @@ -388,7 +388,7 @@ do afterUpdate() end, min = 1, - max = 30, + max = 40, step = 1, name = Loc ["STRING_OPTIONS_SEGMENTSSAVE"], desc = Loc ["STRING_OPTIONS_SEGMENTSSAVE_DESC"], @@ -656,7 +656,7 @@ do } - DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template) + DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize+20, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template) end tinsert(Details.optionsSection, buildSection) --optionsSection is declared on boot.lua diff --git a/functions/profiles.lua b/functions/profiles.lua index 1f315f90..3cccc430 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -873,8 +873,8 @@ local default_profile = { }, --> segments - segments_amount = 18, - segments_amount_to_save = 18, + segments_amount = 40, + segments_amount_to_save = 40, segments_panic_mode = false, segments_auto_erase = 1, @@ -1715,10 +1715,14 @@ function Details:ImportProfile (profileString, newProfileName) mythicPlusSettings.mythicrun_chart_frame = {} mythicPlusSettings.mythicrun_chart_frame_minimized = {} mythicPlusSettings.mythicrun_chart_frame_ready = {} - + + --make the max amount of segments be 30 + Details.segments_amount = 40 + Details.segments_amount_to_save = 40 + --transfer instance data to the new created profile profileObject.instances = DetailsFramework.table.copy ({}, profileData.instances) - + Details:ApplyProfile (newProfileName) Details:Msg ("profile successfully imported.")--localize-me diff --git a/startup.lua b/startup.lua index c6933bf7..19b4d788 100644 --- a/startup.lua +++ b/startup.lua @@ -510,6 +510,9 @@ function Details:StartMeUp() --I'll never stop! Details.boss_mods_timers.encounter_timers_dbm = Details.boss_mods_timers.encounter_timers_dbm or {} Details.boss_mods_timers.encounter_timers_bw = Details.boss_mods_timers.encounter_timers_bw or {} + Details.segments_amount = 40 + Details.segments_amount_to_save = 40 + --clear overall data on new session if (_detalhes.overall_clear_logout) then _detalhes.tabela_overall = _detalhes.combate:NovaTabela()