diff --git a/reframework/autorun/MHR_Overlay.lua b/reframework/autorun/MHR_Overlay.lua index 7ea8bab..7f87006 100644 --- a/reframework/autorun/MHR_Overlay.lua +++ b/reframework/autorun/MHR_Overlay.lua @@ -46,6 +46,16 @@ local customization_menu = require("MHR_Overlay.UI.customization_menu"); local label_customization = require("MHR_Overlay.UI.Customizations.label_customization"); local bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization"); local line_customization = require("MHR_Overlay.UI.Customizations.line_customization"); + +local health_customization = require("MHR_Overlay.UI.Customizations.health_customization"); +local stamina_customization = require("MHR_Overlay.UI.Customizations.stamina_customization"); +local rage_customization = require("MHR_Overlay.UI.Customizations.rage_customization"); +local body_parts_customization = require("MHR_Overlay.UI.Customizations.body_parts_customization"); +local ailments_customization = require("MHR_Overlay.UI.Customizations.ailments_customization"); +local ailment_buildups_customization = require("MHR_Overlay.UI.Customizations.ailment_buildups_customization"); + +local large_monster_UI_customization = require("MHR_Overlay.UI.Customizations.large_monster_UI_customization"); + local drawing = require("MHR_Overlay.UI.drawing"); ------------------------INIT MODULES------------------------- @@ -87,6 +97,17 @@ customization_menu.init_module(); label_customization.init_module(); bar_customization.init_module(); line_customization.init_module(); +large_monster_UI_customization.init_module(); + +label_customization.init_module(); +bar_customization.init_module(); +health_customization.init_module(); +stamina_customization.init_module(); +rage_customization.init_module(); +body_parts_customization.init_module(); +ailments_customization.init_module(); +ailment_buildups_customization.init_module(); + drawing.init_module(); damage_meter_UI.init_module(); @@ -248,221 +269,6 @@ local function main_loop() end end end - - -- snow.player.PlayerManager -> - -- k_BackingField -> [0] - - -- Demondrug _AtkUpAlive = 5 1 - -- Mega Demondrug _AtkUpAlive = 7 1 - -- Armorskin _DefUpAlive = 15 1 - -- Mega Armorskin _DefUpAlive = 25 1 - -- Might Seed _AtkUpBuffSecond and _AtkUpBuffSecondTimer 1 - -- Demon Powder _AtkUpItemSecond and _AtkUpItemSecondTimer 1 - -- Adamant Seed _DefUpBuffSecond and _DefUpBuffSecondTimer 1 - -- Hardshell Powder _DefUpItemSecond and _DefUpItemSecondTimer 1 - -- Dash Juice _StaminaUpBuffSecondTimer 1 - -- Immunizer _VitalizerTimer 1 - - -- Attack Up - -- Defense Up - -- Affinity Up _AtkUpEcSecond and _AtkUpEcSecondTimer - -- Sharpness Loss Reduced - -- Elemental Attack Boost - -- Divine Protection - -- Health Regeneration - -- Natural Healing Up - -- Blight Negated - -- Immunity - -- Stamina Recovery Up - -- Stamina Use Reduced - -- Knockbacks Negated _DefUpEcSecond and _DefUpEcSecondTimer - -- Sonic Barrier - -- Earplugs (S) - -- Earplugs (L) - -- Tremor Negated - -- Enviroment Damage Negated - -- Stun Negated - -- Wind Pressure Negated - -- Gourmet Fish Effect - -- Self Improvement - -- Infernal Melody - - --[[ - local player_data_array = singletons.player_manager:get_field("k__BackingField"); - local player_data = player_data_array:get_element(0); - - local _AtkUpAlive = player_data:get_field("_AtkUpAlive"); - local _DefUpAlive = player_data:get_field("_DefUpAlive"); - - xy = "AtkUpAlive: " .. tostring(_AtkUpAlive); - xy = xy .. "\n_DefUpAlive: " .. tostring(_DefUpAlive); - - local _AtkUpBuffSecond = player_data:get_field("_AtkUpBuffSecond"); - local _DefUpBuffSecond = player_data:get_field("_DefUpBuffSecond"); - local _DefUpBuffSecondRate = player_data:get_field("_DefUpBuffSecondRate"); - - xy = xy .. "\n_AtkUpBuffSecond: " .. tostring(_AtkUpBuffSecond); - xy = xy .. "\n_DefUpBuffSecond: " .. tostring(_DefUpBuffSecond); - xy = xy .. "\n_DefUpBuffSecondRate: " .. tostring(_DefUpBuffSecondRate); - - local _AtkUpBuffSecondTimer = player_data:get_field("_AtkUpBuffSecondTimer"); - local _DefUpBuffSecondTimer = player_data:get_field("_DefUpBuffSecondTimer"); - local _DefUpBuffSecondRateTimer = player_data:get_field("_DefUpBuffSecondRateTimer"); - - xy = xy .. "\n_AtkUpBuffSecondTimer: " .. tostring(_AtkUpBuffSecondTimer); - xy = xy .. "\n_DefUpBuffSecondTimer: " .. tostring(_DefUpBuffSecondTimer); - xy = xy .. "\n_DefUpBuffSecondRateTimer: " .. tostring(_DefUpBuffSecondRateTimer); - - local _StaminaUpBuffSecondTimer = player_data:get_field("_StaminaUpBuffSecondTimer"); - - xy = xy .. "\n_StaminaUpBuffSecondTimer: " .. tostring(_StaminaUpBuffSecondTimer); - - local _AtkUpItemSecond = player_data:get_field("_AtkUpItemSecond"); - local _DefUpItemSecond = player_data:get_field("_DefUpItemSecond"); - - xy = xy .. "\n_AtkUpItemSecond: " .. tostring(_AtkUpItemSecond); - xy = xy .. "\n_DefUpItemSecond: " .. tostring(_DefUpItemSecond); - - local _AtkUpItemSecondTimer = player_data:get_field("_AtkUpItemSecondTimer"); - local _DefUpItemSecondTimer = player_data:get_field("_DefUpItemSecondTimer"); - - xy = xy .. "\n_AtkUpItemSecondTimer: " .. tostring(_AtkUpItemSecondTimer); - xy = xy .. "\n_DefUpItemSecondTimer: " .. tostring(_DefUpItemSecondTimer); - - local _SuperArmorItemTimer = player_data:get_field("_SuperArmorItemTimer"); - - xy = xy .. "\n_SuperArmorItemTimer: " .. tostring(_SuperArmorItemTimer); - - local _AtkUpEcSecondTimer = player_data:get_field("_AtkUpEcSecondTimer"); - local _AtkUpEcSecond = player_data:get_field("_AtkUpEcSecond"); - - xy = xy .. "\n_AtkUpEcSecondTimer: " .. tostring(_AtkUpEcSecondTimer); - xy = xy .. "\n_AtkUpEcSecond: " .. tostring(_AtkUpEcSecond); - - local _DefUpEcSecondTimer = player_data:get_field("_DefUpEcSecondTimer"); - local _DefUpEcSecond = player_data:get_field("_DefUpEcSecond"); - - xy = xy .. "\n_DefUpEcSecondTimer: " .. tostring(_DefUpEcSecondTimer); - xy = xy .. "\n_DefUpEcSecond: " .. tostring(_DefUpEcSecond); - - local _CritUpEcSecondTimer = player_data:get_field("_CritUpEcSecondTimer"); - local _CritChanceUpBowTimer = player_data:get_field("_CritChanceUpBowTimer"); - local _CritChanceUpBow = player_data:get_field("_CritChanceUpBow"); - - xy = xy .. "\n_CritUpEcSecondTimer: " .. tostring(_CritUpEcSecondTimer); - xy = xy .. "\n_CritChanceUpBowTimer: " .. tostring(_CritChanceUpBowTimer); - xy = xy .. "\n_CritChanceUpBow: " .. tostring(_CritChanceUpBow); - - local _MusicRegeneTimer = player_data:get_field("_MusicRegeneTimer"); - - xy = xy .. "\n_MusicRegeneTimer: " .. tostring(_MusicRegeneTimer); - - local _LeadEnemyTimer = player_data:get_field("_LeadEnemyTimer"); - local _IsLeadEnemy = player_data:get_field("_IsLeadEnemy"); - - xy = xy .. "\n_LeadEnemyTimer: " .. tostring(_LeadEnemyTimer); - xy = xy .. "\n_IsLeadEnemy: " .. tostring(_IsLeadEnemy); - - local _DebuffPreventionTimer = player_data:get_field("_DebuffPreventionTimer"); - - xy = xy .. "\n_DebuffPreventionTimer: " .. tostring(_DebuffPreventionTimer); - - local _FishRegeneTimer = player_data:get_field("_FishRegeneTimer"); - local _FishRegeneEnableTimer = player_data:get_field("_FishRegeneEnableTimer"); - - xy = xy .. "\n_FishRegeneTimer: " .. tostring(_FishRegeneTimer); - xy = xy .. "\n_FishRegeneEnableTimer: " .. tostring(_FishRegeneEnableTimer); - - local _VitalizerTimer = player_data:get_field("_VitalizerTimer"); - - xy = xy .. "\n_VitalizerTimer: " .. tostring(_VitalizerTimer); - - local _RunhighOtomoTimer = player_data:get_field("_RunhighOtomoTimer"); - local _KijinBulletTimer = player_data:get_field("_KijinBulletTimer"); - local _KoukaBulletTimer = player_data:get_field("_KoukaBulletTimer"); - local _EquipSkill_036_Timer = player_data:get_field("_EquipSkill_036_Timer"); - - xy = xy .. "\n_RunhighOtomoTimer: " .. tostring(_RunhighOtomoTimer); - xy = xy .. "\n_KijinBulletTimer: " .. tostring(_KijinBulletTimer); - xy = xy .. "\n_KoukaBulletTimer: " .. tostring(_KoukaBulletTimer); - xy = xy .. "\n_EquipSkill_036_Timer: " .. tostring(_EquipSkill_036_Timer); - - local _HyperArmorItemTimer = player_data:get_field("_HyperArmorItemTimer"); - - xy = xy .. "\n_HyperArmorItemTimer: " .. tostring(_HyperArmorItemTimer); - - local _KijinOtomoTimer = player_data:get_field("_KijinOtomoTimer"); - local _BeastRoarOtomoTimer = player_data:get_field("_BeastRoarOtomoTimer"); - local _ChallengeTimer = player_data:get_field("_ChallengeTimer"); - local _WholeBodyTimer = player_data:get_field("_WholeBodyTimer"); - - xy = xy .. "\n_KijinOtomoTimer: " .. tostring(_KijinOtomoTimer); - xy = xy .. "\n_BeastRoarOtomoTimer: " .. tostring(_BeastRoarOtomoTimer); - xy = xy .. "\n_ChallengeTimer: " .. tostring(_ChallengeTimer); - xy = xy .. "\n_WholeBodyTimer: " .. tostring(_WholeBodyTimer); - - local _SlidingTimer = player_data:get_field("_SlidingTimer"); - local _SlidingPowerupTimer = player_data:get_field("_SlidingPowerupTimer"); - - xy = xy .. "\n_SlidingTimer: " .. tostring(_SlidingTimer); - xy = xy .. "\n_SlidingPowerupTimer: " .. tostring(_SlidingPowerupTimer); - - local _WallRunTimer = player_data:get_field("_WallRunTimer"); - local _WallRunPowerupTimer = player_data:get_field("_WallRunPowerupTimer"); - - xy = xy .. "\n_WallRunTimer: " .. tostring(_WallRunTimer); - xy = xy .. "\n_WallRunPowerupTimer: " .. tostring(_WallRunPowerupTimer); - - local _CounterattackPowerupTimer = player_data:get_field("_CounterattackPowerupTimer"); - - xy = xy .. "\n_CounterattackPowerupTimer: " .. tostring(_CounterattackPowerupTimer); - - -- sic! - local _OnibiPowerUpTiemr = player_data:get_field("_OnibiPowerUpTiemr"); - local _OnibiPowerUpInterval = player_data:get_field("_OnibiPowerUpInterval"); - - xy = xy .. "\n_OnibiPowerUpTiemr: " .. tostring(_OnibiPowerUpTiemr); - xy = xy .. "\n_OnibiPowerUpInterval: " .. tostring(_OnibiPowerUpInterval); - - local _HyakuryuDragonPowerUpTimer = player_data:get_field("_HyakuryuDragonPowerUpTimer"); - local _HyakuryuDragonPowerUpCnt = player_data:get_field("_HyakuryuDragonPowerUpCnt"); - local _HyakuryuHyakuryuOnazutiPowerUpInterval = player_data:get_field("_HyakuryuHyakuryuOnazutiPowerUpInterval"); - - xy = xy .. "\n_HyakuryuDragonPowerUpTimer: " .. tostring(_HyakuryuDragonPowerUpTimer); - xy = xy .. "\n_HyakuryuDragonPowerUpCnt: " .. tostring(_HyakuryuDragonPowerUpCnt); - xy = xy .. "\n_HyakuryuHyakuryuOnazutiPowerUpInterval: " .. tostring(_HyakuryuHyakuryuOnazutiPowerUpInterval); - - local _KitchenSkill027Timer = player_data:get_field("_KitchenSkill027Timer"); - local _KitchenSkill045Timer = player_data:get_field("_KitchenSkill045Timer"); - - xy = xy .. "\n_KitchenSkill027Timer: " .. tostring(_KitchenSkill027Timer); - xy = xy .. "\n_KitchenSkill045Timer: " .. tostring(_KitchenSkill045Timer); - - -- sic! - local _ReduseUseStaminaKichenSkillActive = player_data:get_field("_ReduseUseStaminaKichenSkillActive"); - - xy = xy .. "\n_ReduseUseStaminaKichenSkillActive: " .. tostring(_ReduseUseStaminaKichenSkillActive); - - local _HeavyBowgunWyvernSnipeTimer = player_data:get_field("_HeavyBowgunWyvernSnipeTimer"); - local _HeavyBowgunWyvernMachineGunTimer = player_data:get_field("_HeavyBowgunWyvernMachineGunTimer"); - local _HeavyBowgunWyvernSnipeBullet = player_data:get_field("_HeavyBowgunWyvernSnipeBullet"); - local _HeavyBowgunWyvernMachineGunBullet = player_data:get_field("_HeavyBowgunWyvernMachineGunBullet"); - - xy = xy .. "\n_HeavyBowgunWyvernSnipeTimer: " .. tostring(_HeavyBowgunWyvernSnipeTimer); - xy = xy .. "\n_HeavyBowgunWyvernMachineGunTimer: " .. tostring(_HeavyBowgunWyvernMachineGunTimer); - xy = xy .. "\n_HeavyBowgunWyvernSnipeBullet: " .. tostring(_HeavyBowgunWyvernSnipeBullet); - xy = xy .. "\n_HeavyBowgunWyvernMachineGunBullet: " .. tostring(_HeavyBowgunWyvernMachineGunBullet); - - local _ChargeDragonSlayCannonTime = player_data:get_field("_ChargeDragonSlayCannonTime"); - - xy = xy .. "\n_ChargeDragonSlayCannonTime: " .. tostring(_ChargeDragonSlayCannonTime); - - local _WyvernBlastGauge = player_data:get_field("_WyvernBlastGauge"); - local _WyvernBlastReloadTimer = player_data:get_field("_WyvernBlastReloadTimer"); - - xy = xy .. "\n_WyvernBlastGauge: " .. tostring(_WyvernBlastGauge); - xy = xy .. "\n_WyvernBlastReloadTimer: " .. tostring(_WyvernBlastReloadTimer); - --]] end -- #endregion diff --git a/reframework/autorun/MHR_Overlay/Damage_Meter/player.lua b/reframework/autorun/MHR_Overlay/Damage_Meter/player.lua index aaa4294..845744f 100644 --- a/reframework/autorun/MHR_Overlay/Damage_Meter/player.lua +++ b/reframework/autorun/MHR_Overlay/Damage_Meter/player.lua @@ -18,7 +18,7 @@ function player.new(id, guid, name, master_rank, hunter_rank) local new_player = {}; new_player.id = id; new_player.guid = guid; - new_player.name = name; + new_player.name = name; -- 齁ODO new_player.hunter_rank = hunter_rank; new_player.master_rank = master_rank; @@ -423,11 +423,11 @@ function player.update_player_list_(hunter_info_field_) local myself_master_rank = get_master_rank_method:call(singletons.progress_manager) or 0; local myself_id = get_master_player_id_method:call(singletons.player_manager) or -1; - --if quest_status.is_online then - --myself_id = get_master_player_id_method:call(singletons.player_manager) or -1; - --else - --myself_id = myself_quest_index_field:call(singletons.lobby_manager) or -1; - --end + -- if quest_status.is_online then + -- myself_id = get_master_player_id_method:call(singletons.player_manager) or -1; + -- else + -- myself_id = myself_quest_index_field:call(singletons.lobby_manager) or -1; + -- end if myself_id == nil then customization_menu.status = "No myself player id"; @@ -440,16 +440,15 @@ function player.update_player_list_(hunter_info_field_) return; end - --local myself_guid_string = guid_tostring_method:call(myself_guid); - --if myself_guid_string == nil then + -- local myself_guid_string = guid_tostring_method:call(myself_guid); + -- if myself_guid_string == nil then -- customization_menu.status = "No myself guid string"; -- return; - --end + -- end if myself_id ~= player.myself.id then player.list[player.myself.id] = nil; - player.myself = player.new(myself_id, myself_guid, myself_player_name, myself_master_rank, - myself_hunter_rank); + player.myself = player.new(myself_id, myself_guid, myself_player_name, myself_master_rank, myself_hunter_rank); player.list[myself_id] = player.myself; end @@ -484,11 +483,11 @@ function player.update_player_list_(hunter_info_field_) return; end - --local player_guid_string = guid_tostring_method:call(player_guid); - --if player_guid_string == nil then + -- local player_guid_string = guid_tostring_method:call(player_guid); + -- if player_guid_string == nil then -- customization_menu.status = "No player guid string"; -- return; - --end + -- end local player_hunter_rank = hunter_rank_field:get_data(player_info) or 0; local player_master_rank = master_rank_field:get_data(player_info) or 0; @@ -498,15 +497,13 @@ function player.update_player_list_(hunter_info_field_) goto continue end - if player.list[player_id] == nil or - not guid_equals_method:call(player.list[player_id].guid, player_guid) - --player.list[player_id].guid ~= player_guid + if player.list[player_id] == nil or not guid_equals_method:call(player.list[player_id].guid, player_guid) -- player.list[player_id].guid ~= player_guid then local _player = player.new(player_id, player_guid, player_name, player_master_rank, player_hunter_rank); player.list[player_id] = _player; - if player_name == player.myself.name and player_hunter_rank == player.myself.hunter_rank and - player_master_rank == player.myself.master_rank then + if player_name == player.myself.name and player_hunter_rank == player.myself.hunter_rank and player_master_rank == + player.myself.master_rank then player.myself = _player; end end @@ -518,16 +515,9 @@ end function player.init_UI(_player) local cached_config = config.current_config.damage_meter_UI; - _player.damage_UI = damage_UI_entity.new( - cached_config.damage_bar, - cached_config.highlighted_damage_bar, - cached_config.player_name_label, - cached_config.dps_label, - cached_config.master_hunter_rank_label, - cached_config.damage_value_label, - cached_config.damage_percentage_label, - cached_config.cart_count_label - ); + _player.damage_UI = damage_UI_entity.new(cached_config.damage_bar, cached_config.highlighted_damage_bar, + cached_config.player_name_label, cached_config.dps_label, cached_config.master_hunter_rank_label, + cached_config.damage_value_label, cached_config.damage_percentage_label, cached_config.cart_count_label); end function player.init_total_UI(_player) @@ -544,9 +534,9 @@ function player.init_total_UI(_player) _player.damage_UI.total_damage_label.offset.y = _player.damage_UI.total_damage_label.offset.y * global_scale_modifier; _player.damage_UI.total_damage_value_label.offset.x = _player.damage_UI.total_damage_value_label.offset.x * - global_scale_modifier; + global_scale_modifier; _player.damage_UI.total_damage_value_label.offset.y = _player.damage_UI.total_damage_value_label.offset.y * - global_scale_modifier; + global_scale_modifier; _player.damage_UI.total_dps_label.offset.x = _player.damage_UI.total_dps_label.offset.x * global_scale_modifier; _player.damage_UI.total_dps_label.offset.y = _player.damage_UI.total_dps_label.offset.y * global_scale_modifier; diff --git a/reframework/autorun/MHR_Overlay/Misc/language.lua b/reframework/autorun/MHR_Overlay/Misc/language.lua index a5b29f4..45ccfdb 100644 --- a/reframework/autorun/MHR_Overlay/Misc/language.lua +++ b/reframework/autorun/MHR_Overlay/Misc/language.lua @@ -326,7 +326,7 @@ language.default_language = { hide_inactive_ailments_with_no_buildup_support = "Hide Inactive Ailments with no Buildup Support", hide_all_inactive_ailments = "Hide All Inactive Ailments", hide_all_active_ailments = "Hide All Active Ailments", - hide_disabled_ailments = "Hide Disabled Ailments", + hide_disabled_ailments = "Hide Disabled Ailments by Game", offset_is_relative_to_parts = "Offset is Relative to Parts", time_limit = "Time Limit (seconds)", ailment_name_label = "Ailment Name Label", diff --git a/reframework/autorun/MHR_Overlay/Monsters/ailment_buildup.lua b/reframework/autorun/MHR_Overlay/Monsters/ailment_buildup.lua index 90e9989..71e2b1f 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/ailment_buildup.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/ailment_buildup.lua @@ -10,8 +10,9 @@ local large_monster; local table_helpers; local drawing; -function ailment_buildup.draw_dynamic(monster, ailment_buildups_position_on_screen, opacity_scale) - local cached_config = config.current_config.large_monster_UI.dynamic.ailment_buildups; +function ailment_buildup.draw(monster, ailment_buildup_UI, cached_config, ailment_buildups_position_on_screen, opacity_scale) + + local cached_config = cached_config.ailment_buildups; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; if not cached_config.visibility then @@ -105,9 +106,7 @@ function ailment_buildup.draw_dynamic(monster, ailment_buildups_position_on_scre ailment_name = ailment_name .. "x" .. tostring(ailment.activate_count); end - drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_dynamic_UI.ailment_name_label, - ailment_buildups_position_on_screen, opacity_scale, ailment_name); - + drawing.draw_label(ailment_buildup_UI.ailment_name_label, ailment_buildups_position_on_screen, opacity_scale, ailment_name); local last_j = 0; for j, _player in ipairs(displayed_players) do @@ -116,143 +115,7 @@ function ailment_buildup.draw_dynamic(monster, ailment_buildups_position_on_scre y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * (j - 1) * global_scale_modifier; }; - ailment_buildup_UI_entity.draw_dynamic(_player, monster.ailments[ailments.stun_id].ailment_buildup_dynamic_UI, - ailment_buildup_position_on_screen, opacity_scale, top_buildup); - - last_j = j; - end - - - - local total_buildup_position_on_screen = { - x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * last_j * global_scale_modifier, - y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * last_j * global_scale_modifier; - }; - - drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_dynamic_UI.total_buildup_label, - total_buildup_position_on_screen, opacity_scale, language.current_language.UI.total_buildup); - - drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_dynamic_UI.total_buildup_value_label, - total_buildup_position_on_screen, opacity_scale, total_buildup); - - ailment_buildups_position_on_screen = { - x = total_buildup_position_on_screen.x + cached_config.ailment_spacing.x * global_scale_modifier, - y = total_buildup_position_on_screen.y + 17 + cached_config.ailment_spacing.y * global_scale_modifier - }; - - ::continue:: - end - - -end - -function ailment_buildup.draw_static(monster, ailment_buildups_position_on_screen, opacity_scale) - local cached_config = config.current_config.large_monster_UI.static.ailment_buildups; - local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; - - if not cached_config.visibility then - return; - end - - for id, ailment in pairs(monster.ailments) do - if id == ailments.stun_id then - if not cached_config.filter.stun then - goto continue - end - - elseif id == ailments.poison_id then - if not cached_config.filter.poison then - goto continue - end - elseif id == ailments.blast_id then - if not cached_config.filter.blast then - goto continue - end - else - goto continue - end - - if cached_config.settings.time_limit ~= 0 and - time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit then - goto continue - end - - local total_buildup = 0; - local top_buildup = 0; - - local displayed_players = {}; - for player_id, player_buildup in pairs(ailment.buildup) do - total_buildup = total_buildup + player_buildup; - - if player_buildup > top_buildup then - top_buildup = player_buildup; - end - - table.insert(displayed_players, - { - ["buildup"] = player_buildup, - ["buildup_share"] = ailment.buildup_share[player_id], - ["id"] = player_id - } - ); - end - - if total_buildup == 0 then - goto continue - end - - if cached_config.sorting.type == "Normal" then - if cached_config.sorting.reversed_order then - table.sort(displayed_players, function(left, right) - return left.id < right.id; - end); - else - table.sort(displayed_players, function(left, right) - return left.id > right.id; - end); - end - elseif cached_config.sorting.type == "Buildup" then - if cached_config.sorting.reversed_order then - table.sort(displayed_players, function(left, right) - return left.buildup < right.buildup; - end); - else - table.sort(displayed_players, function(left, right) - return left.buildup > right.buildup; - end); - end - elseif cached_config.sorting.type == "Buildup Percentage" then - if cached_config.sorting.reversed_order then - table.sort(displayed_players, function(left, right) - return left.buildup_share < right.buildup_share; - end); - else - table.sort(displayed_players, function(left, right) - return left.buildup_share > right.buildup_share; - end); - end - end - - local ailment_name = ""; - if cached_config.ailment_name_label.include.ailment_name then - ailment_name = ailment.name .. " "; - end - if cached_config.ailment_name_label.include.activation_count and ailment.activate_count ~= 0 then - ailment_name = ailment_name .. "x" .. tostring(ailment.activate_count); - end - - drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_static_UI.ailment_name_label, - ailment_buildups_position_on_screen, opacity_scale, ailment_name); - - local last_j = 0; - for j, _player in ipairs(displayed_players) do - local ailment_buildup_position_on_screen = { - x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * (j - 1) * global_scale_modifier, - y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * (j - 1) * global_scale_modifier; - }; - - ailment_buildup_UI_entity.draw_static(_player, monster.ailments[ailments.stun_id].ailment_buildup_static_UI, - ailment_buildup_position_on_screen, opacity_scale, top_buildup); + ailment_buildup_UI_entity.draw(_player, ailment_buildup_UI, cached_config, ailment_buildup_position_on_screen, opacity_scale, top_buildup); last_j = j; end @@ -262,277 +125,8 @@ function ailment_buildup.draw_static(monster, ailment_buildups_position_on_scree y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * last_j * global_scale_modifier; }; - drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_static_UI.total_buildup_label, - total_buildup_position_on_screen, opacity_scale, language.current_language.UI.total_buildup); - - drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_static_UI.total_buildup_value_label, - total_buildup_position_on_screen, opacity_scale, total_buildup); - - ailment_buildups_position_on_screen = { - x = total_buildup_position_on_screen.x + cached_config.ailment_spacing.x * global_scale_modifier, - y = total_buildup_position_on_screen.y + 17 + cached_config.ailment_spacing.y * global_scale_modifier - }; - - ::continue:: - end - - -end - -function ailment_buildup.draw_highlighted(monster, ailment_buildups_position_on_screen, opacity_scale) - local cached_config = config.current_config.large_monster_UI.highlighted.ailment_buildups; - local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; - - if not cached_config.visibility then - return; - end - - for id, ailment in pairs(monster.ailments) do - if id == ailments.stun_id then - if not cached_config.filter.stun then - goto continue - end - - elseif id == ailments.poison_id then - if not cached_config.filter.poison then - goto continue - end - elseif id == ailments.blast_id then - if not cached_config.filter.blast then - goto continue - end - else - goto continue - end - - if cached_config.settings.time_limit ~= 0 and - time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit then - goto continue - end - - local total_buildup = 0; - local top_buildup = 0; - - local displayed_players = {}; - for player_id, player_buildup in pairs(ailment.buildup) do - total_buildup = total_buildup + player_buildup; - - if player_buildup > top_buildup then - top_buildup = player_buildup; - end - - table.insert(displayed_players, - { - ["buildup"] = player_buildup, - ["buildup_share"] = ailment.buildup_share[player_id], - ["id"] = player_id - } - ); - end - - if total_buildup == 0 then - goto continue - end - - if cached_config.sorting.type == "Normal" then - if cached_config.sorting.reversed_order then - table.sort(displayed_players, function(left, right) - return left.id < right.id; - end); - else - table.sort(displayed_players, function(left, right) - return left.id > right.id; - end); - end - elseif cached_config.sorting.type == "Buildup" then - if cached_config.sorting.reversed_order then - table.sort(displayed_players, function(left, right) - return left.buildup < right.buildup; - end); - else - table.sort(displayed_players, function(left, right) - return left.buildup > right.buildup; - end); - end - elseif cached_config.sorting.type == "Buildup Percentage" then - if cached_config.sorting.reversed_order then - table.sort(displayed_players, function(left, right) - return left.buildup_share < right.buildup_share; - end); - else - table.sort(displayed_players, function(left, right) - return left.buildup_share > right.buildup_share; - end); - end - end - - local ailment_name = ""; - if cached_config.ailment_name_label.include.ailment_name then - ailment_name = ailment.name .. " "; - end - if cached_config.ailment_name_label.include.activation_count and ailment.activate_count ~= 0 then - ailment_name = ailment_name .. "x" .. tostring(ailment.activate_count); - end - - drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_highlighted_UI.ailment_name_label, - ailment_buildups_position_on_screen, opacity_scale, ailment_name); - - local last_j = 0; - for j, _player in ipairs(displayed_players) do - local ailment_buildup_position_on_screen = { - x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * (j - 1) * global_scale_modifier, - y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * (j - 1) * global_scale_modifier; - }; - - ailment_buildup_UI_entity.draw_highlighted(_player, monster.ailments[ailments.stun_id].ailment_buildup_highlighted_UI - , ailment_buildup_position_on_screen, opacity_scale, top_buildup); - - last_j = j; - end - - local total_buildup_position_on_screen = { - x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * last_j * global_scale_modifier, - y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * last_j * global_scale_modifier; - }; - - drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_highlighted_UI.total_buildup_label, - total_buildup_position_on_screen, opacity_scale, language.current_language.UI.total_buildup); - - drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_highlighted_UI.total_buildup_value_label, - total_buildup_position_on_screen, opacity_scale, total_buildup); - - ailment_buildups_position_on_screen = { - x = total_buildup_position_on_screen.x + cached_config.ailment_spacing.x * global_scale_modifier, - y = total_buildup_position_on_screen.y + 17 + cached_config.ailment_spacing.y * global_scale_modifier - }; - - ::continue:: - end - - -end - -function ailment_buildup.draw_small(monster, ailment_buildups_position_on_screen, opacity_scale) - local cached_config = config.current_config.small_monster_UI.ailment_buildups; - local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; - - if not cached_config.visibility then - return; - end - - for id, ailment in pairs(monster.ailments) do - if id == ailments.stun_id then - if not cached_config.filter.stun then - goto continue - end - - elseif id == ailments.poison_id then - if not cached_config.filter.poison then - goto continue - end - elseif id == ailments.blast_id then - if not cached_config.filter.blast then - goto continue - end - else - goto continue - end - - if cached_config.settings.time_limit ~= 0 and - time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit then - goto continue - end - - local total_buildup = 0; - local top_buildup = 0; - - local displayed_players = {}; - for player_id, player_buildup in pairs(ailment.buildup) do - total_buildup = total_buildup + player_buildup; - - if player_buildup > top_buildup then - top_buildup = player_buildup; - end - - table.insert(displayed_players, - { - ["buildup"] = player_buildup, - ["buildup_share"] = ailment.buildup_share[player_id], - ["id"] = player_id - } - ); - end - - if total_buildup == 0 then - goto continue - end - - if cached_config.sorting.type == "Normal" then - if cached_config.sorting.reversed_order then - table.sort(displayed_players, function(left, right) - return left.id < right.id; - end); - else - table.sort(displayed_players, function(left, right) - return left.id > right.id; - end); - end - elseif cached_config.sorting.type == "Buildup" then - if cached_config.sorting.reversed_order then - table.sort(displayed_players, function(left, right) - return left.buildup < right.buildup; - end); - else - table.sort(displayed_players, function(left, right) - return left.buildup > right.buildup; - end); - end - elseif cached_config.sorting.type == "Buildup Percentage" then - if cached_config.sorting.reversed_order then - table.sort(displayed_players, function(left, right) - return left.buildup_share < right.buildup_share; - end); - else - table.sort(displayed_players, function(left, right) - return left.buildup_share > right.buildup_share; - end); - end - end - - local ailment_name = ""; - if cached_config.ailment_name_label.include.ailment_name then - ailment_name = ailment.name .. " "; - end - if cached_config.ailment_name_label.include.activation_count and ailment.activate_count ~= 0 then - ailment_name = ailment_name .. "x" .. tostring(ailment.activate_count); - end - - drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_small_UI.ailment_name_label, - ailment_buildups_position_on_screen, opacity_scale, ailment_name); - - local last_j = 0; - for j, _player in ipairs(displayed_players) do - local ailment_buildup_position_on_screen = { - x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * (j - 1) * global_scale_modifier, - y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * (j - 1) * global_scale_modifier; - }; - - ailment_buildup_UI_entity.draw_small(_player, monster.ailments[ailments.stun_id].ailment_buildup_small_UI, - ailment_buildup_position_on_screen, opacity_scale, top_buildup); - - last_j = j; - end - - local total_buildup_position_on_screen = { - x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * last_j * global_scale_modifier, - y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * last_j * global_scale_modifier; - }; - - drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_small_UI.total_buildup_label, - total_buildup_position_on_screen, opacity_scale, language.current_language.UI.total_buildup); - - drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_small_UI.total_buildup_value_label, - total_buildup_position_on_screen, opacity_scale, total_buildup); + drawing.draw_label(ailment_buildup_UI.total_buildup_label, total_buildup_position_on_screen, opacity_scale, language.current_language.UI.total_buildup); + drawing.draw_label(ailment_buildup_UI.total_buildup_value_label, total_buildup_position_on_screen, opacity_scale, total_buildup); ailment_buildups_position_on_screen = { x = total_buildup_position_on_screen.x + cached_config.ailment_spacing.x * global_scale_modifier, diff --git a/reframework/autorun/MHR_Overlay/Monsters/ailments.lua b/reframework/autorun/MHR_Overlay/Monsters/ailments.lua index 27e1b71..0e944cc 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/ailments.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/ailments.lua @@ -148,78 +148,9 @@ function ailments.init_ailments() _ailments[ailments.stun_id].buildup = {}; _ailments[ailments.stun_id].buildup_share = {}; - ailments.init_ailment_buildup_UI(_ailments); - return _ailments; end -function ailments.init_ailment_buildup_UI(_ailments) - ailments.init_ailment_buildup_dynamic_UI(_ailments); - ailments.init_ailment_buildup_static_UI(_ailments); - ailments.init_ailment_buildup_highlighted_UI(_ailments); - ailments.init_ailment_buildup_small_UI(_ailments); -end - -function ailments.init_ailment_buildup_dynamic_UI(_ailments) - local cached_config = config.current_config.large_monster_UI.dynamic.ailment_buildups; - - _ailments[ailments.stun_id].ailment_buildup_dynamic_UI = ailment_buildup_UI_entity.new( - cached_config.buildup_bar, - cached_config.highlighted_buildup_bar, - cached_config.ailment_name_label, - cached_config.player_name_label, - cached_config.buildup_value_label, - cached_config.buildup_percentage_label, - cached_config.total_buildup_label, - cached_config.total_buildup_value_label - ); -end - -function ailments.init_ailment_buildup_static_UI(_ailments) - local cached_config = config.current_config.large_monster_UI.static.ailment_buildups; - - _ailments[ailments.stun_id].ailment_buildup_static_UI = ailment_buildup_UI_entity.new( - cached_config.buildup_bar, - cached_config.highlighted_buildup_bar, - cached_config.ailment_name_label, - cached_config.player_name_label, - cached_config.buildup_value_label, - cached_config.buildup_percentage_label, - cached_config.total_buildup_label, - cached_config.total_buildup_value_label - ); -end - -function ailments.init_ailment_buildup_highlighted_UI(_ailments) - local cached_config = config.current_config.large_monster_UI.highlighted.ailment_buildups; - - _ailments[ailments.stun_id].ailment_buildup_highlighted_UI = ailment_buildup_UI_entity.new( - cached_config.buildup_bar, - cached_config.highlighted_buildup_bar, - cached_config.ailment_name_label, - cached_config.player_name_label, - cached_config.buildup_value_label, - cached_config.buildup_percentage_label, - cached_config.total_buildup_label, - cached_config.total_buildup_value_label - ); -end - -function ailments.init_ailment_buildup_small_UI(_ailments) - local cached_config = config.current_config.small_monster_UI.ailment_buildups; - - _ailments[ailments.stun_id].ailment_buildup_small_UI = ailment_buildup_UI_entity.new( - cached_config.buildup_bar, - cached_config.highlighted_buildup_bar, - cached_config.ailment_name_label, - cached_config.player_name_label, - cached_config.buildup_value_label, - cached_config.buildup_percentage_label, - cached_config.total_buildup_label, - cached_config.total_buildup_value_label - ); -end - local enemy_character_base_type_def = sdk.find_type_definition("snow.enemy.EnemyCharacterBase"); local enemy_condition_damage_param_base_type_def = sdk.find_type_definition("snow.enemy.EnemyConditionDamageParamBase"); @@ -429,176 +360,8 @@ function ailments.update_poison(monster, poison_param) end end -function ailments.draw_dynamic(monster, ailments_position_on_screen, opacity_scale) - local cached_config = config.current_config.large_monster_UI.dynamic.ailments; - local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; - - --sort parts here - local displayed_ailments = {}; - for id, ailment in pairs(monster.ailments) do - if id == ailments.paralyze_id then - if not cached_config.filter.paralysis then - goto continue - end - elseif id == ailments.sleep_id then - if not cached_config.filter.sleep then - goto continue - end - elseif id == ailments.stun_id then - if not cached_config.filter.stun then - goto continue - end - elseif id == ailments.flash_id then - if not cached_config.filter.flash then - goto continue - end - elseif id == ailments.poison_id then - if not cached_config.filter.poison then - goto continue - end - elseif id == ailments.blast_id then - if not cached_config.filter.blast then - goto continue - end - elseif id == ailments.exhaust_id then - if not cached_config.filter.exhaust then - goto continue - end - elseif id == ailments.ride_id then - if not cached_config.filter.ride then - goto continue - end - elseif id == ailments.water_id then - if not cached_config.filter.waterblight then - goto continue - end - elseif id == ailments.fire_id then - if not cached_config.filter.fireblight then - goto continue - end - elseif id == ailments.ice_id then - if not cached_config.filter.iceblight then - goto continue - end - elseif id == ailments.thunder_id then - if not cached_config.filter.thunderblight then - goto continue - end - elseif id == ailments.fall_trap_id then - if not cached_config.filter.fall_trap then - goto continue - end - elseif id == ailments.shock_trap_id then - if not cached_config.filter.shock_trap then - goto continue - end - elseif id == ailments.capture_id then - if not cached_config.filter.tranq_bomb then - goto continue - end - elseif id == ailments.koyashi_id then - if not cached_config.filter.dung_bomb then - goto continue - end - elseif id == ailments.steel_fang_id then - if not cached_config.filter.steel_fang then - goto continue - end - elseif id == ailments.fall_quick_sand_id then - if not cached_config.filter.quick_sand then - goto continue - end - elseif id == ailments.fall_otomo_trap_id then - if not cached_config.filter.fall_otomo_trap then - goto continue - end - elseif id == ailments.shock_otomo_trap_id then - if not cached_config.filter.shock_otomo_trap then - goto continue - end - else - goto continue - end - - if cached_config.settings.hide_ailments_with_zero_buildup and ailment.total_buildup == 0 and - ailment.buildup_limit ~= 0 - and ailment.activate_count == 0 and not ailment.is_active then - goto continue - end - - if cached_config.settings.hide_inactive_ailments_with_no_buildup_support and ailment.buildup_limit == 0 and - not ailment.is_active then - goto continue - end - - if cached_config.settings.hide_all_inactive_ailments and not ailment.is_active then - goto continue - end - - if cached_config.settings.hide_all_active_ailments and ailment.is_active then - goto continue - end - - if cached_config.settings.hide_disabled_ailments and not ailment.is_enable then - goto continue - end - - if cached_config.settings.time_limit ~= 0 and - time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit and - not ailment.is_active then - goto continue - end - - table.insert(displayed_ailments, ailment); - ::continue:: - end - - - if cached_config.sorting.type == "Normal" then - if cached_config.sorting.reversed_order then - table.sort(displayed_ailments, function(left, right) - return left.id > right.id; - end); - else - table.sort(displayed_ailments, function(left, right) - return left.id < right.id; - end); - end - elseif cached_config.sorting.type == "Buildup" then - if cached_config.sorting.reversed_order then - table.sort(displayed_ailments, function(left, right) - return left.total_buildup > right.total_buildup; - end); - else - table.sort(displayed_ailments, function(left, right) - return left.total_buildup < right.total_buildup; - end); - end - elseif cached_config.sorting.type == "Buildup Percentage" then - if cached_config.sorting.reversed_order then - table.sort(displayed_ailments, function(left, right) - return left.buildup_percentage > right.buildup_percentage; - end); - else - table.sort(displayed_ailments, function(left, right) - return left.buildup_percentage < right.buildup_percentage; - end); - end - end - - for j, ailment in ipairs(displayed_ailments) do - local ailment_position_on_screen = { - x = ailments_position_on_screen.x + cached_config.spacing.x * (j - 1) * global_scale_modifier, - y = ailments_position_on_screen.y + cached_config.spacing.y * (j - 1) * global_scale_modifier; - } - ailment_UI_entity.draw_dynamic(ailment, monster.ailment_dynamic_UI, ailment_position_on_screen, opacity_scale); - end - - -end - -function ailments.draw_static(monster, ailments_position_on_screen, opacity_scale) - local cached_config = config.current_config.large_monster_UI.static.ailments; +function ailments.draw(monster, ailment_UI, cached_config, ailments_position_on_screen, opacity_scale) + local cached_config = cached_config.ailments; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; --sort parts here @@ -760,349 +523,10 @@ function ailments.draw_static(monster, ailments_position_on_screen, opacity_scal y = ailments_position_on_screen.y + cached_config.spacing.y * (j - 1) * global_scale_modifier; } - ailment_UI_entity.draw_static(ailment, monster.ailment_static_UI, ailment_position_on_screen, opacity_scale); - end -end - -function ailments.draw_highlighted(monster, ailments_position_on_screen, opacity_scale) - local cached_config = config.current_config.large_monster_UI.highlighted.ailments; - local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; - - --sort parts here - local displayed_ailments = {}; - for id, ailment in pairs(monster.ailments) do - if id == ailments.paralyze_id then - if not cached_config.filter.paralysis then - goto continue - end - elseif id == ailments.sleep_id then - if not cached_config.filter.sleep then - goto continue - end - elseif id == ailments.stun_id then - if not cached_config.filter.stun then - goto continue - end - elseif id == ailments.flash_id then - if not cached_config.filter.flash then - goto continue - end - elseif id == ailments.poison_id then - if not cached_config.filter.poison then - goto continue - end - elseif id == ailments.blast_id then - if not cached_config.filter.blast then - goto continue - end - elseif id == ailments.exhaust_id then - if not cached_config.filter.exhaust then - goto continue - end - elseif id == ailments.ride_id then - if not cached_config.filter.ride then - goto continue - end - elseif id == ailments.water_id then - if not cached_config.filter.waterblight then - goto continue - end - elseif id == ailments.fire_id then - if not cached_config.filter.fireblight then - goto continue - end - elseif id == ailments.ice_id then - if not cached_config.filter.iceblight then - goto continue - end - elseif id == ailments.thunder_id then - if not cached_config.filter.thunderblight then - goto continue - end - elseif id == ailments.fall_trap_id then - if not cached_config.filter.fall_trap then - goto continue - end - elseif id == ailments.shock_trap_id then - if not cached_config.filter.shock_trap then - goto continue - end - elseif id == ailments.capture_id then - if not cached_config.filter.tranq_bomb then - goto continue - end - elseif id == ailments.koyashi_id then - if not cached_config.filter.dung_bomb then - goto continue - end - elseif id == ailments.steel_fang_id then - if not cached_config.filter.steel_fang then - goto continue - end - elseif id == ailments.fall_quick_sand_id then - if not cached_config.filter.quick_sand then - goto continue - end - elseif id == ailments.fall_otomo_trap_id then - if not cached_config.filter.fall_otomo_trap then - goto continue - end - elseif id == ailments.shock_otomo_trap_id then - if not cached_config.filter.shock_otomo_trap then - goto continue - end - else - goto continue - end - - if cached_config.settings.hide_ailments_with_zero_buildup and ailment.total_buildup == 0 and - ailment.buildup_limit ~= 0 - and ailment.activate_count == 0 and not ailment.is_active then - goto continue - end - - if cached_config.settings.hide_inactive_ailments_with_no_buildup_support and ailment.buildup_limit == 0 and - not ailment.is_active then - goto continue - end - - if cached_config.settings.hide_all_inactive_ailments and not ailment.is_active then - goto continue - end - - if cached_config.settings.hide_all_active_ailments and ailment.is_active then - goto continue - end - - if cached_config.settings.hide_disabled_ailments and not ailment.is_enable then - goto continue - end - - if cached_config.settings.time_limit ~= 0 and - time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit and - not ailment.is_active then - goto continue - end - - table.insert(displayed_ailments, ailment); - ::continue:: - end - - if cached_config.sorting.type == "Normal" then - if cached_config.sorting.reversed_order then - table.sort(displayed_ailments, function(left, right) - return left.id > right.id; - end); - else - table.sort(displayed_ailments, function(left, right) - return left.id < right.id; - end); - end - elseif cached_config.sorting.type == "Buildup" then - if cached_config.sorting.reversed_order then - table.sort(displayed_ailments, function(left, right) - return left.total_buildup > right.total_buildup; - end); - else - table.sort(displayed_ailments, function(left, right) - return left.total_buildup < right.total_buildup; - end); - end - elseif cached_config.sorting.type == "Buildup Percentage" then - if cached_config.sorting.reversed_order then - table.sort(displayed_ailments, function(left, right) - return left.buildup_percentage > right.buildup_percentage; - end); - else - table.sort(displayed_ailments, function(left, right) - return left.buildup_percentage < right.buildup_percentage; - end); - end - end - - for j, ailment in ipairs(displayed_ailments) do - local ailment_position_on_screen = { - x = ailments_position_on_screen.x + cached_config.spacing.x * (j - 1) * global_scale_modifier, - y = ailments_position_on_screen.y + cached_config.spacing.y * (j - 1) * global_scale_modifier; - } - - ailment_UI_entity.draw_highlighted(ailment, monster.ailment_highlighted_UI, ailment_position_on_screen, opacity_scale); - end -end - -function ailments.draw_small(monster, ailments_position_on_screen, opacity_scale) - local cached_config = config.current_config.small_monster_UI.ailments; - local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; - - --sort parts here - local displayed_ailments = {}; - for id, ailment in pairs(monster.ailments) do - if id == ailments.paralyze_id then - if not cached_config.filter.paralysis then - goto continue - end - elseif id == ailments.sleep_id then - if not cached_config.filter.sleep then - goto continue - end - elseif id == ailments.stun_id then - if not cached_config.filter.stun then - goto continue - end - elseif id == ailments.flash_id then - if not cached_config.filter.flash then - goto continue - end - elseif id == ailments.poison_id then - if not cached_config.filter.poison then - goto continue - end - elseif id == ailments.blast_id then - if not cached_config.filter.blast then - goto continue - end - elseif id == ailments.exhaust_id then - if not cached_config.filter.exhaust then - goto continue - end - elseif id == ailments.ride_id then - if not cached_config.filter.ride then - goto continue - end - elseif id == ailments.water_id then - if not cached_config.filter.waterblight then - goto continue - end - elseif id == ailments.fire_id then - if not cached_config.filter.fireblight then - goto continue - end - elseif id == ailments.ice_id then - if not cached_config.filter.iceblight then - goto continue - end - elseif id == ailments.thunder_id then - if not cached_config.filter.thunderblight then - goto continue - end - elseif id == ailments.fall_trap_id then - if not cached_config.filter.fall_trap then - goto continue - end - elseif id == ailments.shock_trap_id then - if not cached_config.filter.shock_trap then - goto continue - end - elseif id == ailments.capture_id then - if not cached_config.filter.tranq_bomb then - goto continue - end - elseif id == ailments.koyashi_id then - if not cached_config.filter.dung_bomb then - goto continue - end - elseif id == ailments.steel_fang_id then - if not cached_config.filter.steel_fang then - goto continue - end - elseif id == ailments.fall_quick_sand_id then - if not cached_config.filter.quick_sand then - goto continue - end - elseif id == ailments.fall_otomo_trap_id then - if not cached_config.filter.fall_otomo_trap then - goto continue - end - elseif id == ailments.shock_otomo_trap_id then - if not cached_config.filter.shock_otomo_trap then - goto continue - end - else - goto continue - end - - if cached_config.settings.hide_ailments_with_zero_buildup and ailment.total_buildup == 0 and - ailment.buildup_limit ~= 0 - and ailment.activate_count == 0 and not ailment.is_active then - goto continue - end - - if cached_config.settings.hide_inactive_ailments_with_no_buildup_support and ailment.buildup_limit == 0 and - not ailment.is_active then - goto continue - end - - if cached_config.settings.hide_all_inactive_ailments and not ailment.is_active then - goto continue - end - - if cached_config.settings.hide_all_active_ailments and ailment.is_active then - goto continue - end - - if cached_config.settings.hide_disabled_ailments and not ailment.is_enable then - goto continue - end - - if cached_config.settings.time_limit ~= 0 and - time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit and - not ailment.is_active then - goto continue - end - - table.insert(displayed_ailments, ailment); - ::continue:: + ailment_UI_entity.draw(ailment, ailment_UI, cached_config, ailment_position_on_screen, opacity_scale); end - if cached_config.sorting.type == "Normal" then - if cached_config.sorting.reversed_order then - table.sort(displayed_ailments, function(left, right) - if cached_config.settings.prioritize_active_ailments and left.is_active then return false; end - return left.id > right.id; - end); - else - table.sort(displayed_ailments, function(left, right) - if cached_config.settings.prioritize_active_ailments and left.is_active then return true; end - return left.id < right.id; - end); - end - elseif cached_config.sorting.type == "Buildup" then - if cached_config.sorting.reversed_order then - table.sort(displayed_ailments, function(left, right) - if cached_config.settings.prioritize_active_ailments and left.is_active then return false; end - return left.total_buildup > right.total_buildup; - end); - else - table.sort(displayed_ailments, function(left, right) - if cached_config.settings.prioritize_active_ailments and left.is_active then return true; end - return left.total_buildup < right.total_buildup; - end); - end - elseif cached_config.sorting.type == "Buildup Percentage" then - if cached_config.sorting.reversed_order then - table.sort(displayed_ailments, function(left, right) - if cached_config.settings.prioritize_active_ailments and left.is_active then return false; end - return left.buildup_percentage > right.buildup_percentage; - end); - else - table.sort(displayed_ailments, function(left, right) - if cached_config.settings.prioritize_active_ailments and left.is_active then return true; end - return left.buildup_percentage < right.buildup_percentage; - end); - end - end - - for j, ailment in ipairs(displayed_ailments) do - local ailment_position_on_screen = { - x = ailments_position_on_screen.x + cached_config.spacing.x * (j - 1) * global_scale_modifier, - y = ailments_position_on_screen.y + cached_config.spacing.y * (j - 1) * global_scale_modifier; - } - - - - ailment_UI_entity.draw_small(ailment, monster.ailment_UI, ailment_position_on_screen, opacity_scale); - end end function ailments.apply_ailment_buildup(monster, attacker_id, ailment_type, ailment_buildup) diff --git a/reframework/autorun/MHR_Overlay/Monsters/body_part.lua b/reframework/autorun/MHR_Overlay/Monsters/body_part.lua index cf3e9cf..2f6e6db 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/body_part.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/body_part.lua @@ -38,84 +38,9 @@ function body_part.new(id, name) part.last_change_time = time.total_elapsed_script_seconds; - body_part.init_dynamic_UI(part); - body_part.init_static_UI(part); - body_part.init_highlighted_UI(part); return part; end -function body_part.init_dynamic_UI(part) - local cached_config = config.current_config.large_monster_UI.dynamic.body_parts; - - part.body_part_dynamic_UI = body_part_UI_entity.new( - cached_config.visibility, - cached_config.part_name_label, - cached_config.part_health.visibility, - cached_config.part_health.bar, - cached_config.part_health.text_label, - cached_config.part_health.value_label, - cached_config.part_health.percentage_label, - cached_config.part_break.visibility, - cached_config.part_break.bar, - cached_config.part_break.text_label, - cached_config.part_break.value_label, - cached_config.part_break.percentage_label, - cached_config.part_loss.visibility, - cached_config.part_loss.bar, - cached_config.part_loss.text_label, - cached_config.part_loss.value_label, - cached_config.part_loss.percentage_label - ); -end - -function body_part.init_static_UI(part) - local cached_config = config.current_config.large_monster_UI.static.body_parts; - - part.body_part_static_UI = body_part_UI_entity.new( - cached_config.visibility, - cached_config.part_name_label, - cached_config.part_health.visibility, - cached_config.part_health.bar, - cached_config.part_health.text_label, - cached_config.part_health.value_label, - cached_config.part_health.percentage_label, - cached_config.part_break.visibility, - cached_config.part_break.bar, - cached_config.part_break.text_label, - cached_config.part_break.value_label, - cached_config.part_break.percentage_label, - cached_config.part_loss.visibility, - cached_config.part_loss.bar, - cached_config.part_loss.text_label, - cached_config.part_loss.value_label, - cached_config.part_loss.percentage_label - ); -end - -function body_part.init_highlighted_UI(part) - local cached_config = config.current_config.large_monster_UI.highlighted.body_parts; - - part.body_part_highlighted_UI = body_part_UI_entity.new( - cached_config.visibility, - cached_config.part_name_label, - cached_config.part_health.visibility, - cached_config.part_health.bar, - cached_config.part_health.text_label, - cached_config.part_health.value_label, - cached_config.part_health.percentage_label, - cached_config.part_break.visibility, - cached_config.part_break.bar, - cached_config.part_break.text_label, - cached_config.part_break.value_label, - cached_config.part_break.percentage_label, - cached_config.part_loss.visibility, - cached_config.part_loss.bar, - cached_config.part_loss.text_label, - cached_config.part_loss.value_label, - cached_config.part_loss.percentage_label - ); -end - function body_part.update_flinch(part, part_current, part_max) if part_current > part.health then part.flinch_count = part.flinch_count + 1; @@ -190,8 +115,8 @@ function body_part.update_loss(part, part_loss_current, part_loss_max, is_severe end -function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale) - local cached_config = config.current_config.large_monster_UI.dynamic.body_parts; +function body_part.draw(monster, part_UI, cached_config, parts_position_on_screen, opacity_scale) + local cached_config = cached_config.body_parts; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local displayed_parts = {}; @@ -251,382 +176,9 @@ function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale goto continue end - if (not part.body_part_dynamic_UI.flinch_visibility or not health_supported) - and - (not part.body_part_dynamic_UI.break_visibility or not break_supported or part.break_count >= part.break_max_count - ) - and (not part.body_part_dynamic_UI.loss_visibility or not severe_supported or part.is_severed) then - goto continue - end - - if cached_config.settings.time_limit ~= 0 and - time.total_elapsed_script_seconds - part.last_change_time > cached_config.settings.time_limit then - goto continue - end - - table.insert(displayed_parts, part); - ::continue:: - end - - if cached_config.sorting.type == "Normal" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.id > right.id; - end); - else - table.sort(displayed_parts, function(left, right) - return left.id < right.id; - end); - end - elseif cached_config.sorting.type == "Health" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.health > right.health; - end); - else - table.sort(displayed_parts, function(left, right) - return left.health < right.health; - end); - end - elseif cached_config.sorting.type == "Health Percentage" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.health_percentage > right.health_percentage; - end); - else - table.sort(displayed_parts, function(left, right) - return left.health_percentage < right.health_percentage; - end); - end - elseif cached_config.sorting.type == "Flinch Count" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.flinch_count > right.flinch_count; - end); - else - table.sort(displayed_parts, function(left, right) - return left.flinch_count < right.flinch_count; - end); - end - elseif cached_config.sorting.type == "Break Health" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.break_health > right.break_health; - end); - else - table.sort(displayed_parts, function(left, right) - return left.break_health < right.break_health; - end); - end - elseif cached_config.sorting.type == "Break Health Percentage" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.break_health_percentage > right.break_health_percentage; - end); - else - table.sort(displayed_parts, function(left, right) - return left.break_health_percentage < right.break_health_percentage; - end); - end - elseif cached_config.sorting.type == "Break Count" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.break_count > right.break_count; - end); - else - table.sort(displayed_parts, function(left, right) - return left.break_count < right.break_count; - end); - end - elseif cached_config.sorting.type == "Sever Health" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.loss_health > right.loss_health; - end); - else - table.sort(displayed_parts, function(left, right) - return left.loss_health < right.loss_health; - end); - end - elseif cached_config.sorting.type == "Sever Health Percentage" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.loss_health_percentage > right.loss_health_percentage; - end); - else - table.sort(displayed_parts, function(left, right) - return left.loss_health_percentage < right.loss_health_percentage; - end); - end - end - - local last_part_position_on_screen; - - for j, part in ipairs(displayed_parts) do - local part_position_on_screen = { - x = parts_position_on_screen.x + cached_config.spacing.x * (j - 1) * global_scale_modifier, - y = parts_position_on_screen.y + cached_config.spacing.y * (j - 1) * global_scale_modifier; - } - - body_part_UI_entity.draw_dynamic(part, part_position_on_screen, opacity_scale); - last_part_position_on_screen = part_position_on_screen; - end - - return last_part_position_on_screen; -end - -function body_part.draw_static(monster, parts_position_on_screen, opacity_scale) - local cached_config = config.current_config.large_monster_UI.static.body_parts; - local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; - - local displayed_parts = {}; - for REpart, part in pairs(monster.parts) do - local health_supported = part.max_health >= 0; - local break_supported = part.break_max_health >= 0; - local severe_supported = part.loss_max_health >= 0; - - if health_supported then - if break_supported then - if severe_supported then - if not cached_config.filter.health_break_severe then - goto continue - end - else - if not cached_config.filter.health_break then - goto continue - end - end - else - if severe_supported then - if not cached_config.filter.health_severe then - goto continue - end - else - if not cached_config.filter.health then - goto continue - end - end - end - else - if break_supported then - if severe_supported then - if not cached_config.filter.break_severe then - goto continue - end - else - if not cached_config.filter.break_ then - goto continue - end - end - else - if severe_supported then - if not cached_config.filter.severe then - goto continue - end - else - goto continue - end - end - end - - if cached_config.settings.hide_undamaged_parts - and ((part.health == part.max_health and part.flinch_count == 0) or not health_supported) - and ((part.break_health == part.break_max_health and part.break_count == 0) or not break_supported) - and ((part.loss_health == part.loss_max_health and not part.is_severed) or not severe_supported) then - goto continue - end - - if (not part.body_part_static_UI.flinch_visibility or not health_supported) - and - (not part.body_part_static_UI.break_visibility or not break_supported or part.break_count >= part.break_max_count - ) - and (not part.body_part_static_UI.loss_visibility or not severe_supported or part.is_severed) then - goto continue - end - - if cached_config.settings.time_limit ~= 0 and - time.total_elapsed_script_seconds - part.last_change_time > cached_config.settings.time_limit then - goto continue - end - - - table.insert(displayed_parts, part); - ::continue:: - end - - if cached_config.sorting.type == "Normal" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.id > right.id; - end); - else - table.sort(displayed_parts, function(left, right) - return left.id < right.id; - end); - end - elseif cached_config.sorting.type == "Health" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.health > right.health; - end); - else - table.sort(displayed_parts, function(left, right) - return left.health < right.health; - end); - end - elseif cached_config.sorting.type == "Health Percentage" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.health_percentage > right.health_percentage; - end); - else - table.sort(displayed_parts, function(left, right) - return left.health_percentage < right.health_percentage; - end); - end - elseif cached_config.sorting.type == "Flinch Count" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.flinch_count > right.flinch_count; - end); - else - table.sort(displayed_parts, function(left, right) - return left.flinch_count < right.flinch_count; - end); - end - elseif cached_config.sorting.type == "Break Health" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.break_health > right.break_health; - end); - else - table.sort(displayed_parts, function(left, right) - return left.break_health < right.break_health; - end); - end - elseif cached_config.sorting.type == "Break Health Percentage" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.break_health_percentage > right.break_health_percentage; - end); - else - table.sort(displayed_parts, function(left, right) - return left.break_health_percentage < right.break_health_percentage; - end); - end - elseif cached_config.sorting.type == "Break Count" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.break_count > right.break_count; - end); - else - table.sort(displayed_parts, function(left, right) - return left.break_count < right.break_count; - end); - end - elseif cached_config.sorting.type == "Sever Health" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.loss_health > right.loss_health; - end); - else - table.sort(displayed_parts, function(left, right) - return left.loss_health < right.loss_health; - end); - end - elseif cached_config.sorting.type == "Sever Health Percentage" then - if cached_config.sorting.reversed_order then - table.sort(displayed_parts, function(left, right) - return left.loss_health_percentage > right.loss_health_percentage; - end); - else - table.sort(displayed_parts, function(left, right) - return left.loss_health_percentage < right.loss_health_percentage; - end); - end - end - - local last_part_position_on_screen; - - for j, part in ipairs(displayed_parts) do - local part_position_on_screen = { - x = parts_position_on_screen.x + cached_config.spacing.x * (j - 1) * global_scale_modifier, - y = parts_position_on_screen.y + cached_config.spacing.y * (j - 1) * global_scale_modifier; - } - - body_part_UI_entity.draw_static(part, part_position_on_screen, opacity_scale); - last_part_position_on_screen = part_position_on_screen; - end - - return last_part_position_on_screen; -end - -function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_scale) - local cached_config = config.current_config.large_monster_UI.highlighted.body_parts; - local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; - - local displayed_parts = {}; - for REpart, part in pairs(monster.parts) do - local health_supported = part.max_health >= 0; - local break_supported = part.break_max_health >= 0; - local severe_supported = part.loss_max_health >= 0; - - if health_supported then - if break_supported then - if severe_supported then - if not cached_config.filter.health_break_severe then - goto continue - end - else - if not cached_config.filter.health_break then - goto continue - end - end - else - if severe_supported then - if not cached_config.filter.health_severe then - goto continue - end - else - if not cached_config.filter.health then - goto continue - end - end - end - else - if break_supported then - if severe_supported then - if not cached_config.filter.break_severe then - goto continue - end - else - if not cached_config.filter.break_ then - goto continue - end - end - else - if severe_supported then - if not cached_config.filter.severe then - goto continue - end - else - goto continue - end - end - end - - if cached_config.settings.hide_undamaged_parts - and ((part.health == part.max_health and part.flinch_count == 0) or not health_supported) - and ((part.break_health == part.break_max_health and part.break_count == 0) or not break_supported) - and ((part.loss_health == part.loss_max_health and not part.is_severed) or not severe_supported) then - goto continue - end - - if (not part.body_part_highlighted_UI.flinch_visibility or not health_supported) - and ( - not part.body_part_highlighted_UI.break_visibility or not break_supported or part.break_count >= part.break_max_count - ) - and (not part.body_part_highlighted_UI.loss_visibility or not severe_supported or part.is_severed) then + if (not part_UI.flinch_visibility or not health_supported) + and (not part_UI.break_visibility or not break_supported or part.break_count >= part.break_max_count) + and (not part_UI.loss_visibility or not severe_supported or part.is_severed) then goto continue end @@ -739,7 +291,7 @@ function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_s y = parts_position_on_screen.y + cached_config.spacing.y * (j - 1) * global_scale_modifier; }; - body_part_UI_entity.draw_highlighted(part, part_position_on_screen, opacity_scale); + body_part_UI_entity.draw(part, part_UI, cached_config, part_position_on_screen, opacity_scale); last_part_position_on_screen = part_position_on_screen; end diff --git a/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua b/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua index 4d7142f..642b61a 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua @@ -9,6 +9,8 @@ local stamina_UI_entity; local rage_UI_entity; local ailment_UI_entity; local ailment_buildup; +local ailment_buildup_UI_entity; +local body_part_UI_entity; local screen; local drawing; local ailments; @@ -83,10 +85,14 @@ function large_monster.new(enemy) monster.rider_id = -1; + monster.dynamic_UI = {}; + monster.static_UI = {}; + monster.highlighted_UI = {}; + large_monster.init(monster, enemy); - large_monster.init_static_UI(monster); - large_monster.init_dynamic_UI(monster); - large_monster.init_highlighted_UI(monster); + large_monster.init_UI(monster, monster.dynamic_UI, config.current_config.large_monster_UI.dynamic); + large_monster.init_UI(monster, monster.static_UI, config.current_config.large_monster_UI.static); + large_monster.init_UI(monster, monster.highlighted_UI, config.current_config.large_monster_UI.highlighted); if large_monster.list[enemy] == nil then large_monster.list[enemy] = monster; @@ -190,13 +196,12 @@ function large_monster.init(monster, enemy) end end -function large_monster.init_dynamic_UI(monster) - local cached_config = config.current_config.large_monster_UI.dynamic; +function large_monster.init_UI(monster, monster_UI, cached_config) local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; - monster.dynamic_name_label = table_helpers.deep_copy(cached_config.monster_name_label); + monster_UI.monster_name_label = table_helpers.deep_copy(cached_config.monster_name_label); - monster.health_dynamic_UI = health_UI_entity.new( + monster_UI.health_UI = health_UI_entity.new( cached_config.health.visibility, cached_config.health.bar, cached_config.health.text_label, @@ -204,18 +209,14 @@ function large_monster.init_dynamic_UI(monster) cached_config.health.percentage_label ); - monster.health_dynamic_UI.bar.capture_line.offset.x = monster.health_dynamic_UI.bar.capture_line.offset.x * - global_scale_modifier; - monster.health_dynamic_UI.bar.capture_line.offset.y = monster.health_dynamic_UI.bar.capture_line.offset.y * - global_scale_modifier; - monster.health_dynamic_UI.bar.capture_line.size.width = monster.health_dynamic_UI.bar.capture_line.size.width * - global_scale_modifier; - monster.health_dynamic_UI.bar.capture_line.size.height = monster.health_dynamic_UI.bar.capture_line.size.height * - global_scale_modifier; + monster_UI.health_UI.bar.capture_line.offset.x = monster_UI.health_UI.bar.capture_line.offset.x * global_scale_modifier; + monster_UI.health_UI.bar.capture_line.offset.y = monster_UI.health_UI.bar.capture_line.offset.y * global_scale_modifier; + monster_UI.health_UI.bar.capture_line.size.width = monster_UI.health_UI.bar.capture_line.size.width * global_scale_modifier; + monster_UI.health_UI.bar.capture_line.size.height = monster_UI.health_UI.bar.capture_line.size.height * global_scale_modifier; - monster.health_dynamic_UI.bar.colors = cached_config.health.bar.normal_colors; + monster_UI.health_UI.bar.colors = monster_UI.health_UI.bar.normal_colors; - monster.stamina_dynamic_UI = stamina_UI_entity.new( + monster_UI.stamina_UI = stamina_UI_entity.new( cached_config.stamina.visibility, cached_config.stamina.bar, cached_config.stamina.text_label, @@ -224,7 +225,7 @@ function large_monster.init_dynamic_UI(monster) cached_config.stamina.timer_label ); - monster.rage_dynamic_UI = rage_UI_entity.new( + monster_UI.rage_UI = rage_UI_entity.new( cached_config.rage.visibility, cached_config.rage.bar, cached_config.rage.text_label, @@ -233,11 +234,27 @@ function large_monster.init_dynamic_UI(monster) cached_config.rage.timer_label ); - for REpart, part in pairs(monster.parts) do - body_part.init_dynamic_UI(part); - end + monster_UI.part_UI = body_part_UI_entity.new( + cached_config.body_parts.visibility, + cached_config.body_parts.part_name_label, + cached_config.body_parts.part_health.visibility, + cached_config.body_parts.part_health.bar, + cached_config.body_parts.part_health.text_label, + cached_config.body_parts.part_health.value_label, + cached_config.body_parts.part_health.percentage_label, + cached_config.body_parts.part_break.visibility, + cached_config.body_parts.part_break.bar, + cached_config.body_parts.part_break.text_label, + cached_config.body_parts.part_break.value_label, + cached_config.body_parts.part_break.percentage_label, + cached_config.body_parts.part_loss.visibility, + cached_config.body_parts.part_loss.bar, + cached_config.body_parts.part_loss.text_label, + cached_config.body_parts.part_loss.value_label, + cached_config.body_parts.part_loss.percentage_label + ); - monster.ailment_dynamic_UI = ailment_UI_entity.new( + monster_UI.ailment_UI = ailment_UI_entity.new( cached_config.ailments.visibility, cached_config.ailments.bar, cached_config.ailments.ailment_name_label, @@ -247,130 +264,16 @@ function large_monster.init_dynamic_UI(monster) cached_config.ailments.timer_label ); - ailments.init_ailment_buildup_dynamic_UI(monster.ailments); -end - -function large_monster.init_static_UI(monster) - local cached_config = config.current_config.large_monster_UI.static; - local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; - - monster.static_name_label = table_helpers.deep_copy(cached_config.monster_name_label); - - monster.static_name_label.offset.x = monster.static_name_label.offset.x * global_scale_modifier; - monster.static_name_label.offset.y = monster.static_name_label.offset.y * global_scale_modifier; - - monster.health_static_UI = health_UI_entity.new( - cached_config.health.visibility, - cached_config.health.bar, - cached_config.health.text_label, - cached_config.health.value_label, - cached_config.health.percentage_label + monster_UI.ailment_buildup_UI = ailment_buildup_UI_entity.new( + cached_config.ailment_buildups.buildup_bar, + cached_config.ailment_buildups.highlighted_buildup_bar, + cached_config.ailment_buildups.ailment_name_label, + cached_config.ailment_buildups.player_name_label, + cached_config.ailment_buildups.buildup_value_label, + cached_config.ailment_buildups.buildup_percentage_label, + cached_config.ailment_buildups.total_buildup_label, + cached_config.ailment_buildups.total_buildup_value_label ); - - monster.health_static_UI.bar.capture_line.offset.x = monster.health_static_UI.bar.capture_line.offset.x * - global_scale_modifier; - monster.health_static_UI.bar.capture_line.offset.y = monster.health_static_UI.bar.capture_line.offset.y * - global_scale_modifier; - monster.health_static_UI.bar.capture_line.size.width = monster.health_static_UI.bar.capture_line.size.width * - global_scale_modifier; - monster.health_static_UI.bar.capture_line.size.height = monster.health_static_UI.bar.capture_line.size.height * - global_scale_modifier; - - monster.health_static_UI.bar.colors = cached_config.health.bar.normal_colors; - - monster.stamina_static_UI = stamina_UI_entity.new( - cached_config.stamina.visibility, - cached_config.stamina.bar, - cached_config.stamina.text_label, - cached_config.stamina.value_label, - cached_config.stamina.percentage_label, - cached_config.stamina.timer_label - ); - - monster.rage_static_UI = rage_UI_entity.new( - cached_config.rage.visibility, - cached_config.rage.bar, - cached_config.rage.text_label, - cached_config.rage.value_label, - cached_config.rage.percentage_label, - cached_config.rage.timer_label - ); - - for REpart, part in pairs(monster.parts) do - body_part.init_static_UI(part); - end - - monster.ailment_static_UI = ailment_UI_entity.new( - cached_config.ailments.visibility, - cached_config.ailments.bar, - cached_config.ailments.ailment_name_label, - cached_config.ailments.text_label, - cached_config.ailments.value_label, - cached_config.ailments.percentage_label, - cached_config.ailments.timer_label - ); - - ailments.init_ailment_buildup_static_UI(monster.ailments); -end - -function large_monster.init_highlighted_UI(monster) - local cached_config = config.current_config.large_monster_UI.highlighted; - local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; - - monster.highlighted_name_label = table_helpers.deep_copy(cached_config.monster_name_label); - - monster.health_highlighted_UI = health_UI_entity.new( - cached_config.health.visibility, - cached_config.health.bar, - cached_config.health.text_label, - cached_config.health.value_label, - cached_config.health.percentage_label - ); - - monster.health_highlighted_UI.bar.capture_line.offset.x = monster.health_highlighted_UI.bar.capture_line.offset.x * - global_scale_modifier; - monster.health_highlighted_UI.bar.capture_line.offset.y = monster.health_highlighted_UI.bar.capture_line.offset.y * - global_scale_modifier; - monster.health_highlighted_UI.bar.capture_line.size.width = monster.health_highlighted_UI.bar.capture_line.size.width * - global_scale_modifier; - monster.health_highlighted_UI.bar.capture_line.size.height = monster.health_highlighted_UI.bar.capture_line.size.height - * global_scale_modifier; - - monster.health_highlighted_UI.bar.colors = cached_config.health.bar.normal_colors; - - monster.stamina_highlighted_UI = stamina_UI_entity.new( - cached_config.stamina.visibility, - cached_config.stamina.bar, - cached_config.stamina.text_label, - cached_config.stamina.value_label, - cached_config.stamina.percentage_label, - cached_config.stamina.timer_label - ); - - monster.rage_highlighted_UI = rage_UI_entity.new( - cached_config.rage.visibility, - cached_config.rage.bar, - cached_config.rage.text_label, - cached_config.rage.value_label, - cached_config.rage.percentage_label, - cached_config.rage.timer_label - ); - - for REpart, part in pairs(monster.parts) do - body_part.init_highlighted_UI(part); - end - - monster.ailment_highlighted_UI = ailment_UI_entity.new( - cached_config.ailments.visibility, - cached_config.ailments.bar, - cached_config.ailments.ailment_name_label, - cached_config.ailments.text_label, - cached_config.ailments.value_label, - cached_config.ailments.percentage_label, - cached_config.ailments.timer_label - ); - - ailments.init_ailment_buildup_highlighted_UI(monster.ailments); end local physical_param_field = enemy_character_base_type_def:get_field("k__BackingField"); @@ -790,38 +693,48 @@ function large_monster.update_parts(enemy, monster, physical_param) end end -function large_monster.draw_dynamic(monster, position_on_screen, opacity_scale) - local cached_config = config.current_config.large_monster_UI.dynamic; +function large_monster.draw(monster, type, cached_config, position_on_screen, opacity_scale) + local monster_UI; + xy = 1; + if type == "dynamic" then + monster_UI = monster.dynamic_UI; + elseif type == "static" then + monster_UI = monster.static_UI; + else + monster_UI = monster.highlighted_UI; + end + xy = 2; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; - + xy = 2.01; local monster_name_text = ""; if cached_config.monster_name_label.include.monster_name then monster_name_text = string.format("%s ", monster.name); end - + xy = 2.02; if cached_config.monster_name_label.include.monster_id then monster_name_text = monster_name_text .. tostring(monster.id) .. " "; end - + xy = 2.03; if cached_config.monster_name_label.include.crown and monster.crown ~= "" then monster_name_text = monster_name_text .. string.format("%s ", monster.crown); end + xy = 2.04; if cached_config.monster_name_label.include.size then monster_name_text = monster_name_text .. string.format("#%.0f ", 100 * monster.size); end - + xy = 2.05; if cached_config.monster_name_label.include.scrown_thresholds then monster_name_text = monster_name_text .. string.format("<=%.0f >=%.0f >=%.0f", 100 * monster.small_border, 100 * monster.big_border, 100 * monster.king_border); end - + xy = table_helpers.tostring(monster_UI); if monster.health < monster.capture_health then - monster.health_dynamic_UI.bar.colors = cached_config.health.bar.capture_colors; + monster_UI.health_UI.bar.colors = monster_UI.health_UI.bar.capture_colors; else - monster.health_dynamic_UI.bar.colors = cached_config.health.bar.normal_colors; + monster_UI.health_UI.bar.colors = monster_UI.health_UI.bar.normal_colors; end - - drawing.draw_label(monster.dynamic_name_label, position_on_screen, opacity_scale, monster_name_text); + xy = 2.1; + drawing.draw_label(monster_UI.monster_name_label, position_on_screen, opacity_scale, monster_name_text); local health_position_on_screen = { x = position_on_screen.x + cached_config.health.offset.x * global_scale_modifier, @@ -853,106 +766,13 @@ function large_monster.draw_dynamic(monster, position_on_screen, opacity_scale) y = position_on_screen.y + cached_config.ailment_buildups.offset.y * global_scale_modifier }; - health_UI_entity.draw(monster, monster.health_dynamic_UI, health_position_on_screen, opacity_scale); - drawing.draw_capture_line(monster.health_dynamic_UI, health_position_on_screen, opacity_scale, - monster.capture_percentage); + health_UI_entity.draw(monster, monster_UI.health_UI, health_position_on_screen, opacity_scale); + drawing.draw_capture_line(monster_UI.health_UI, health_position_on_screen, opacity_scale, monster.capture_percentage); + stamina_UI_entity.draw(monster, monster_UI.stamina_UI, stamina_position_on_screen, opacity_scale); + rage_UI_entity.draw(monster, monster_UI.rage_UI, rage_position_on_screen, opacity_scale); - stamina_UI_entity.draw(monster, monster.stamina_dynamic_UI, stamina_position_on_screen, opacity_scale); - rage_UI_entity.draw(monster, monster.rage_dynamic_UI, rage_position_on_screen, opacity_scale); - - local last_part_position_on_screen = body_part.draw_dynamic(monster, - parts_position_on_screen - , opacity_scale); - - if cached_config.ailments.settings.offset_is_relative_to_parts then - if last_part_position_on_screen ~= nil then - ailments_position_on_screen = { - x = last_part_position_on_screen.x + - config.current_config.large_monster_UI.highlighted.ailments.relative_offset.x * global_scale_modifier, - y = last_part_position_on_screen.y + - config.current_config.large_monster_UI.highlighted.ailments.relative_offset.y * global_scale_modifier - }; - end - end - - ailments.draw_dynamic(monster, ailments_position_on_screen, opacity_scale); - ailment_buildup.draw_dynamic(monster, ailment_buildups_position_on_screen, opacity_scale); -end - -function large_monster.draw_static(monster, position_on_screen, opacity_scale) - local cached_config = config.current_config.large_monster_UI.static; - local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; - - local monster_name_text = ""; - if cached_config.monster_name_label.include.monster_name then - monster_name_text = string.format("%s ", monster.name); - end - - if cached_config.monster_name_label.include.monster_id then - monster_name_text = monster_name_text .. tostring(monster.id) .. " "; - end - - if cached_config.monster_name_label.include.crown and monster.crown ~= "" then - monster_name_text = monster_name_text .. string.format("%s ", monster.crown); - end - if cached_config.monster_name_label.include.size then - monster_name_text = monster_name_text .. string.format("#%.0f ", 100 * monster.size); - end - - if cached_config.monster_name_label.include.scrown_thresholds then - monster_name_text = monster_name_text .. string.format("<=%.0f >=%.0f >=%.0f", 100 * monster.small_border, - 100 * monster.big_border, 100 * monster.king_border); - end - - if monster.health < monster.capture_health then - monster.health_static_UI.bar.colors = cached_config.health.bar.capture_colors; - else - monster.health_static_UI.bar.colors = cached_config.health.bar.normal_colors; - end - - drawing.draw_label(monster.static_name_label, position_on_screen, opacity_scale, monster_name_text); - - local health_position_on_screen = { - x = position_on_screen.x + cached_config.health.offset.x * global_scale_modifier, - y = position_on_screen.y + cached_config.health.offset.y * global_scale_modifier - }; - - local stamina_position_on_screen = { - x = position_on_screen.x + cached_config.stamina.offset.x * global_scale_modifier, - y = position_on_screen.y + cached_config.stamina.offset.y * global_scale_modifier - }; - - local rage_position_on_screen = { - x = position_on_screen.x + cached_config.rage.offset.x * global_scale_modifier, - y = position_on_screen.y + cached_config.rage.offset.y * global_scale_modifier - }; - - local parts_position_on_screen = { - x = position_on_screen.x + cached_config.body_parts.offset.x * global_scale_modifier, - y = position_on_screen.y + cached_config.body_parts.offset.y * global_scale_modifier - }; - - local ailments_position_on_screen = { - x = position_on_screen.x + cached_config.ailments.offset.x * global_scale_modifier, - y = position_on_screen.y + cached_config.ailments.offset.y * global_scale_modifier - }; - - local ailment_buildups_position_on_screen = { - x = position_on_screen.x + cached_config.ailment_buildups.offset.x * global_scale_modifier, - y = position_on_screen.y + cached_config.ailment_buildups.offset.y * global_scale_modifier - }; - - health_UI_entity.draw(monster, monster.health_static_UI, health_position_on_screen, opacity_scale); - - drawing.draw_capture_line(monster.health_static_UI, health_position_on_screen, opacity_scale, monster.capture_percentage); - - stamina_UI_entity.draw(monster, monster.stamina_static_UI, stamina_position_on_screen, opacity_scale); - rage_UI_entity.draw(monster, monster.rage_static_UI, rage_position_on_screen, opacity_scale); - - local last_part_position_on_screen = body_part.draw_static(monster, - parts_position_on_screen - , opacity_scale); + local last_part_position_on_screen = body_part.draw(monster, monster_UI.part_UI, cached_config, parts_position_on_screen, opacity_scale); if cached_config.ailments.settings.offset_is_relative_to_parts then if last_part_position_on_screen ~= nil then @@ -963,95 +783,8 @@ function large_monster.draw_static(monster, position_on_screen, opacity_scale) end end - ailments.draw_static(monster, ailments_position_on_screen, opacity_scale); - ailment_buildup.draw_static(monster, ailment_buildups_position_on_screen, opacity_scale); -end - -function large_monster.draw_highlighted(monster, position_on_screen, opacity_scale) - local cached_config = config.current_config.large_monster_UI.highlighted; - local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; - - local monster_name_text = ""; - if cached_config.monster_name_label.include.monster_name then - monster_name_text = string.format("%s ", monster.name); - end - - if cached_config.monster_name_label.include.monster_id then - monster_name_text = monster_name_text .. tostring(monster.id) .. " "; - end - - if cached_config.monster_name_label.include.crown and monster.crown ~= "" then - monster_name_text = monster_name_text .. string.format("%s ", monster.crown); - end - if cached_config.monster_name_label.include.size then - monster_name_text = monster_name_text .. string.format("#%.0f ", 100 * monster.size); - end - - if cached_config.monster_name_label.include.scrown_thresholds then - monster_name_text = monster_name_text .. string.format("<=%.0f >=%.0f >=%.0f", 100 * monster.small_border, - 100 * monster.big_border, 100 * monster.king_border); - end - - if monster.health < monster.capture_health then - monster.health_highlighted_UI.bar.colors = cached_config.health.bar.capture_colors; - else - monster.health_highlighted_UI.bar.colors = cached_config.health.bar.normal_colors; - end - - drawing.draw_label(monster.highlighted_name_label, position_on_screen, opacity_scale, monster_name_text); - - local health_position_on_screen = { - x = position_on_screen.x + cached_config.health.offset.x * global_scale_modifier, - y = position_on_screen.y + cached_config.health.offset.y * global_scale_modifier - }; - - local stamina_position_on_screen = { - x = position_on_screen.x + cached_config.stamina.offset.x * global_scale_modifier, - y = position_on_screen.y + cached_config.stamina.offset.y * global_scale_modifier - }; - - local rage_position_on_screen = { - x = position_on_screen.x + cached_config.rage.offset.x * global_scale_modifier, - y = position_on_screen.y + cached_config.rage.offset.y * global_scale_modifier - }; - - local parts_position_on_screen = { - x = position_on_screen.x + cached_config.body_parts.offset.x * global_scale_modifier, - y = position_on_screen.y + cached_config.body_parts.offset.y * global_scale_modifier - }; - - local ailments_position_on_screen = { - x = position_on_screen.x + cached_config.ailments.offset.x * global_scale_modifier, - y = position_on_screen.y + cached_config.ailments.offset.y * global_scale_modifier - }; - - local ailment_buildups_position_on_screen = { - x = position_on_screen.x + cached_config.ailment_buildups.offset.x * global_scale_modifier, - y = position_on_screen.y + cached_config.ailment_buildups.offset.y * global_scale_modifier - }; - - health_UI_entity.draw(monster, monster.health_highlighted_UI, health_position_on_screen, opacity_scale); - drawing.draw_capture_line(monster.health_highlighted_UI, health_position_on_screen, opacity_scale, - monster.capture_percentage); - - stamina_UI_entity.draw(monster, monster.stamina_highlighted_UI, stamina_position_on_screen, opacity_scale); - rage_UI_entity.draw(monster, monster.rage_highlighted_UI, rage_position_on_screen, opacity_scale); - - local last_part_position_on_screen = body_part.draw_highlighted(monster, - parts_position_on_screen - , opacity_scale); - - if cached_config.ailments.settings.offset_is_relative_to_parts then - if last_part_position_on_screen ~= nil then - ailments_position_on_screen = { - x = last_part_position_on_screen.x + cached_config.ailments.relative_offset.x * global_scale_modifier, - y = last_part_position_on_screen.y + cached_config.ailments.relative_offset.y * global_scale_modifier - }; - end - end - - ailments.draw_highlighted(monster, ailments_position_on_screen, opacity_scale); - ailment_buildup.draw_highlighted(monster, ailment_buildups_position_on_screen, opacity_scale); + ailments.draw(monster, monster_UI.ailment_UI, cached_config, ailments_position_on_screen, opacity_scale); + ailment_buildup.draw(monster, monster_UI.ailment_buildup_UI, cached_config, ailment_buildups_position_on_screen, opacity_scale); end function large_monster.init_list() @@ -1069,6 +802,8 @@ function large_monster.init_module() stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity"); rage_UI_entity = require("MHR_Overlay.UI.UI_Entities.rage_UI_entity"); ailment_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_UI_entity"); + ailment_buildup_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_buildup_UI_entity"); + body_part_UI_entity = require("MHR_Overlay.UI.UI_Entities.body_part_UI_entity"); screen = require("MHR_Overlay.Game_Handler.screen"); drawing = require("MHR_Overlay.UI.drawing"); diff --git a/reframework/autorun/MHR_Overlay/Monsters/small_monster.lua b/reframework/autorun/MHR_Overlay/Monsters/small_monster.lua index c267e5d..02aea95 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/small_monster.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/small_monster.lua @@ -10,6 +10,7 @@ local drawing; local ailments; local ailment_UI_entity; local ailment_buildup; +local ailment_buildup_UI_entity; small_monster.list = {}; @@ -27,9 +28,11 @@ function small_monster.new(enemy) monster.distance = 0; monster.name = "Small Monster"; - + monster.ailments = ailments.init_ailments(); + monster.UI = {}; + small_monster.init(monster, enemy); small_monster.init_UI(monster); @@ -78,12 +81,14 @@ function small_monster.init_UI(monster) local cached_config = config.current_config.small_monster_UI; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; - monster.name_label = table_helpers.deep_copy(cached_config.monster_name_label); + local monster_UI = monster.UI; - monster.name_label.offset.x = monster.name_label.offset.x * global_scale_modifier; - monster.name_label.offset.y = monster.name_label.offset.y * global_scale_modifier; + monster_UI.name_label = table_helpers.deep_copy(cached_config.monster_name_label); + + monster_UI.name_label.offset.x = monster_UI.name_label.offset.x * global_scale_modifier; + monster_UI.name_label.offset.y = monster_UI.name_label.offset.y * global_scale_modifier; - monster.health_UI = health_UI_entity.new( + monster_UI.health_UI = health_UI_entity.new( cached_config.health.visibility, cached_config.health.bar, cached_config.health.text_label, @@ -91,17 +96,26 @@ function small_monster.init_UI(monster) cached_config.health.percentage_label ); - monster.ailment_UI = ailment_UI_entity.new( + monster_UI.ailment_UI = ailment_UI_entity.new( cached_config.ailments.visibility, cached_config.ailments.bar, cached_config.ailments.ailment_name_label, cached_config.ailments.text_label, cached_config.ailments.value_label, - cached_config.ailments.percentage_label, + cached_config.ailments.percentage_label, cached_config.ailments.timer_label ); - ailments.init_ailment_buildup_small_UI(monster.ailments); + monster_UI.ailment_buildup_UI = ailment_buildup_UI_entity.new( + cached_config.ailment_buildups.buildup_bar, + cached_config.ailment_buildups.highlighted_buildup_bar, + cached_config.ailment_buildups.ailment_name_label, + cached_config.ailment_buildups.player_name_label, + cached_config.ailment_buildups.buildup_value_label, + cached_config.ailment_buildups.buildup_percentage_label, + cached_config.ailment_buildups.total_buildup_label, + cached_config.ailment_buildups.total_buildup_value_label + ); end local physical_param_field = enemy_character_base_type_def:get_field("k__BackingField"); @@ -171,11 +185,10 @@ function small_monster.update_health(enemy, monster) end end -function small_monster.draw(monster, position_on_screen, opacity_scale) - local cached_config = config.current_config.small_monster_UI; +function small_monster.draw(monster, cached_config, position_on_screen, opacity_scale) local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; - drawing.draw_label(monster.name_label, position_on_screen, opacity_scale, monster.name); + drawing.draw_label(monster.UI.name_label, position_on_screen, opacity_scale, monster.name); local health_position_on_screen = { x = position_on_screen.x + cached_config.health.offset.x * global_scale_modifier, @@ -192,9 +205,9 @@ function small_monster.draw(monster, position_on_screen, opacity_scale) y = position_on_screen.y + cached_config.ailment_buildups.offset.y * global_scale_modifier }; - health_UI_entity.draw(monster, monster.health_UI, health_position_on_screen, opacity_scale); - ailments.draw_small(monster, ailments_position_on_screen, opacity_scale); - ailment_buildup.draw_small(monster, ailment_buildups_position_on_screen, opacity_scale); + health_UI_entity.draw(monster, monster.UI.health_UI, health_position_on_screen, opacity_scale); + ailments.draw(monster, monster.UI.ailment_UI, cached_config, ailments_position_on_screen, opacity_scale); + ailment_buildup.draw(monster, monster.UI.ailment_buildup_UI, cached_config, ailment_buildups_position_on_screen, opacity_scale); end function small_monster.init_list() @@ -213,6 +226,7 @@ function small_monster.init_module() ailments = require("MHR_Overlay.Monsters.ailments"); ailment_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_UI_entity"); ailment_buildup = require("MHR_Overlay.Monsters.ailment_buildup"); + ailment_buildup_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_buildup_UI_entity"); end return small_monster; diff --git a/reframework/autorun/MHR_Overlay/UI/Modules/large_monster_UI.lua b/reframework/autorun/MHR_Overlay/UI/Modules/large_monster_UI.lua index bbb0592..fe842e3 100644 --- a/reframework/autorun/MHR_Overlay/UI/Modules/large_monster_UI.lua +++ b/reframework/autorun/MHR_Overlay/UI/Modules/large_monster_UI.lua @@ -57,7 +57,7 @@ function large_monster_UI.draw(dynamic_enabled, static_enabled, highlighted_enab local monster = large_monster.list[enemy]; if monster == nil then - customization_menu.status = "No monster hp entry"; + customization_menu.status = "No large monster hp entry"; goto continue end @@ -137,7 +137,7 @@ function large_monster_UI.draw_dynamic(displayed_monsters, highlighted_monster) opacity_scale = 1 - (monster.distance / cached_config.settings.max_distance); end - large_monster.draw_dynamic(monster, position_on_screen, opacity_scale); + large_monster.draw(monster, "dynamic", cached_config, position_on_screen, opacity_scale); i = i + 1; ::continue:: @@ -218,7 +218,7 @@ function large_monster_UI.draw_static(displayed_monsters, highlighted_monster) monster_position_on_screen.y = monster_position_on_screen.y + cached_config.spacing.y * i * global_scale_modifier; end - large_monster.draw_static(monster, monster_position_on_screen, 1); + large_monster.draw(monster, "static", cached_config, monster_position_on_screen, 1); i = i + 1; ::continue:: @@ -238,7 +238,7 @@ function large_monster_UI.draw_highlighted(monster) return; end - large_monster.draw_highlighted(monster, position_on_screen, 1); + large_monster.draw(monster, "highlighted", cached_config, position_on_screen, 1); end function large_monster_UI.init_module() diff --git a/reframework/autorun/MHR_Overlay/UI/Modules/small_monster_UI.lua b/reframework/autorun/MHR_Overlay/UI/Modules/small_monster_UI.lua index a28676c..a95a0ea 100644 --- a/reframework/autorun/MHR_Overlay/UI/Modules/small_monster_UI.lua +++ b/reframework/autorun/MHR_Overlay/UI/Modules/small_monster_UI.lua @@ -38,7 +38,7 @@ function small_monster_UI.draw() local monster = small_monster.list[enemy]; if monster == nil then - customization_menu.status = "No monster hp entry"; + customization_menu.status = "No small monster hp entry"; goto continue end @@ -147,7 +147,7 @@ function small_monster_UI.draw() - small_monster.draw(monster, position_on_screen, opacity_scale); + small_monster.draw(monster, cached_config, position_on_screen, opacity_scale); i = i + 1; ::continue:: diff --git a/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_UI_entity.lua b/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_UI_entity.lua index 779d900..503d970 100644 --- a/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_UI_entity.lua +++ b/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_UI_entity.lua @@ -42,112 +42,11 @@ function ailment_UI_entity.new(visibility, bar, name_label, text_label, value_la return entity; end -function ailment_UI_entity.draw_dynamic(ailment, ailment_UI, position_on_screen, opacity_scale) +function ailment_UI_entity.draw(ailment, ailment_UI, cached_config, position_on_screen, opacity_scale) if not ailment_UI.visibility then return; end - local cached_config = config.current_config.large_monster_UI.dynamic.ailments; - - local ailment_name = ""; - if cached_config.ailment_name_label.include.ailment_name then - ailment_name = ailment.name .. " "; - end - if cached_config.ailment_name_label.include.activation_count and ailment.activate_count ~= 0 then - ailment_name = ailment_name .. "x" .. tostring(ailment.activate_count); - end - - if ailment.is_active then - drawing.draw_bar(ailment_UI.bar, position_on_screen, opacity_scale, ailment.timer_percentage); - - drawing.draw_label(ailment_UI.name_label, position_on_screen, opacity_scale, ailment_name); - drawing.draw_label(ailment_UI.text_label, position_on_screen, opacity_scale, language.current_language.UI.buildup); - drawing.draw_label(ailment_UI.timer_label, position_on_screen, opacity_scale, ailment.minutes_left, - ailment.seconds_left); - else - drawing.draw_bar(ailment_UI.bar, position_on_screen, opacity_scale, ailment.buildup_percentage); - - drawing.draw_label(ailment_UI.name_label, position_on_screen, opacity_scale, ailment_name); - drawing.draw_label(ailment_UI.text_label, position_on_screen, opacity_scale, language.current_language.UI.buildup); - drawing.draw_label(ailment_UI.value_label, position_on_screen, opacity_scale, ailment.total_buildup, - ailment.buildup_limit); - drawing.draw_label(ailment_UI.percentage_label, position_on_screen, opacity_scale, 100 * ailment.buildup_percentage); - end -end - -function ailment_UI_entity.draw_static(ailment, ailment_UI, position_on_screen, opacity_scale) - if not ailment_UI.visibility then - return; - end - - local cached_config = config.current_config.large_monster_UI.static.ailments; - - local ailment_name = ""; - if cached_config.ailment_name_label.include.ailment_name then - ailment_name = ailment.name .. " "; - end - if cached_config.ailment_name_label.include.activation_count and ailment.activate_count ~= 0 then - ailment_name = ailment_name .. "x" .. tostring(ailment.activate_count); - end - - if ailment.is_active then - drawing.draw_bar(ailment_UI.bar, position_on_screen, opacity_scale, ailment.timer_percentage); - - drawing.draw_label(ailment_UI.name_label, position_on_screen, opacity_scale, ailment_name); - drawing.draw_label(ailment_UI.text_label, position_on_screen, opacity_scale, language.current_language.UI.buildup); - drawing.draw_label(ailment_UI.timer_label, position_on_screen, opacity_scale, ailment.minutes_left, - ailment.seconds_left); - else - drawing.draw_bar(ailment_UI.bar, position_on_screen, opacity_scale, ailment.buildup_percentage); - - drawing.draw_label(ailment_UI.name_label, position_on_screen, opacity_scale, ailment_name); - drawing.draw_label(ailment_UI.text_label, position_on_screen, opacity_scale, language.current_language.UI.buildup); - drawing.draw_label(ailment_UI.value_label, position_on_screen, opacity_scale, ailment.total_buildup, - ailment.buildup_limit); - drawing.draw_label(ailment_UI.percentage_label, position_on_screen, opacity_scale, 100 * ailment.buildup_percentage); - end -end - -function ailment_UI_entity.draw_highlighted(ailment, ailment_UI, position_on_screen, opacity_scale) - if not ailment_UI.visibility then - return; - end - - local cached_config = config.current_config.large_monster_UI.highlighted.ailments; - - local ailment_name = ""; - if cached_config.ailment_name_label.include.ailment_name then - ailment_name = ailment.name .. " "; - end - if cached_config.ailment_name_label.include.activation_count and ailment.activate_count ~= 0 then - ailment_name = ailment_name .. "x" .. tostring(ailment.activate_count); - end - - if ailment.is_active then - drawing.draw_bar(ailment_UI.bar, position_on_screen, opacity_scale, ailment.timer_percentage); - - drawing.draw_label(ailment_UI.name_label, position_on_screen, opacity_scale, ailment_name); - drawing.draw_label(ailment_UI.text_label, position_on_screen, opacity_scale, language.current_language.UI.buildup); - drawing.draw_label(ailment_UI.timer_label, position_on_screen, opacity_scale, ailment.minutes_left, - ailment.seconds_left); - else - drawing.draw_bar(ailment_UI.bar, position_on_screen, opacity_scale, ailment.buildup_percentage); - - drawing.draw_label(ailment_UI.name_label, position_on_screen, opacity_scale, ailment_name); - drawing.draw_label(ailment_UI.text_label, position_on_screen, opacity_scale, language.current_language.UI.buildup); - drawing.draw_label(ailment_UI.value_label, position_on_screen, opacity_scale, ailment.total_buildup, - ailment.buildup_limit); - drawing.draw_label(ailment_UI.percentage_label, position_on_screen, opacity_scale, 100 * ailment.buildup_percentage); - end -end - -function ailment_UI_entity.draw_small(ailment, ailment_UI, position_on_screen, opacity_scale) - if not ailment_UI.visibility then - return; - end - - local cached_config = config.current_config.small_monster_UI.ailments; - local ailment_name = ""; if cached_config.ailment_name_label.include.ailment_name then ailment_name = ailment.name .. " "; diff --git a/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_buildup_UI_entity.lua b/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_buildup_UI_entity.lua index db0e1fb..721efd7 100644 --- a/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_buildup_UI_entity.lua +++ b/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_buildup_UI_entity.lua @@ -55,11 +55,9 @@ function ailment_buildup_UI_entity.new(buildup_bar, highlighted_buildup_bar, ail return entity; end -function ailment_buildup_UI_entity.draw_dynamic(_player, ailment_buildup_UI, position_on_screen, opacity_scale, - top_buildup) - local cached_config = config.current_config.large_monster_UI.dynamic.ailment_buildups; - +function ailment_buildup_UI_entity.draw(_player, ailment_buildup_UI, cached_config, position_on_screen, opacity_scale, top_buildup) local player_buildup_bar_percentage = 0; + xy = 11.1; if cached_config.settings.buildup_bar_relative_to == "Total Buildup" then player_buildup_bar_percentage = _player.buildup_share; else @@ -67,111 +65,19 @@ function ailment_buildup_UI_entity.draw_dynamic(_player, ailment_buildup_UI, pos player_buildup_bar_percentage = _player.buildup / top_buildup; end end - + xy = 11.2; if _player.id == player.myself.id and cached_config.settings.highlighted_bar == "Me" then - drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, - player_buildup_bar_percentage); + drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage); elseif cached_config.settings.highlighted_bar == "Top Buildup" and _player.buildup == top_buildup then - drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, - player_buildup_bar_percentage); + drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage); else drawing.draw_bar(ailment_buildup_UI.buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage); end - - drawing.draw_label(ailment_buildup_UI.player_name_label, position_on_screen, opacity_scale, - player.get_player(_player.id).name); + xy = 11.3; + drawing.draw_label(ailment_buildup_UI.player_name_label, position_on_screen, opacity_scale, player.get_player(_player.id).name); drawing.draw_label(ailment_buildup_UI.buildup_value_label, position_on_screen, opacity_scale, _player.buildup); - drawing.draw_label(ailment_buildup_UI.buildup_percentage_label, position_on_screen, opacity_scale, - 100 * _player.buildup_share); -end - -function ailment_buildup_UI_entity.draw_static(_player, ailment_buildup_UI, position_on_screen, opacity_scale, - top_buildup) - local cached_config = config.current_config.large_monster_UI.static.ailment_buildups; - - local player_buildup_bar_percentage = 0; - if cached_config.settings.buildup_bar_relative_to == "Total Buildup" then - player_buildup_bar_percentage = _player.buildup_share; - else - if top_buildup ~= 0 then - player_buildup_bar_percentage = _player.buildup / top_buildup; - end - end - - if _player.id == player.myself.id and cached_config.settings.highlighted_bar == "Me" then - drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, - player_buildup_bar_percentage); - elseif cached_config.settings.highlighted_bar == "Top Buildup" and _player.buildup == top_buildup then - drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, - player_buildup_bar_percentage); - else - drawing.draw_bar(ailment_buildup_UI.buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage); - end - - drawing.draw_label(ailment_buildup_UI.player_name_label, position_on_screen, opacity_scale, - player.get_player(_player.id).name); - drawing.draw_label(ailment_buildup_UI.buildup_value_label, position_on_screen, opacity_scale, _player.buildup); - drawing.draw_label(ailment_buildup_UI.buildup_percentage_label, position_on_screen, opacity_scale, - 100 * _player.buildup_share); -end - -function ailment_buildup_UI_entity.draw_highlighted(_player, ailment_buildup_UI, position_on_screen, opacity_scale, - top_buildup) - local cached_config = config.current_config.large_monster_UI.highlighted.ailment_buildups; - - local player_buildup_bar_percentage = 0; - if cached_config.settings.buildup_bar_relative_to == "Total Buildup" then - player_buildup_bar_percentage = _player.buildup_share; - else - if top_buildup ~= 0 then - player_buildup_bar_percentage = _player.buildup / top_buildup; - end - end - - if _player.id == player.myself.id and cached_config.settings.highlighted_bar == "Me" then - drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, - player_buildup_bar_percentage); - elseif cached_config.settings.highlighted_bar == "Top Buildup" and _player.buildup == top_buildup then - drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, - player_buildup_bar_percentage); - else - drawing.draw_bar(ailment_buildup_UI.buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage); - end - - drawing.draw_label(ailment_buildup_UI.player_name_label, position_on_screen, opacity_scale, - player.get_player(_player.id).name); - drawing.draw_label(ailment_buildup_UI.buildup_value_label, position_on_screen, opacity_scale, _player.buildup); - drawing.draw_label(ailment_buildup_UI.buildup_percentage_label, position_on_screen, opacity_scale, - 100 * _player.buildup_share); -end - -function ailment_buildup_UI_entity.draw_small(_player, ailment_buildup_UI, position_on_screen, opacity_scale, top_buildup) - local cached_config = config.current_config.small_monster_UI.ailment_buildups; - - local player_buildup_bar_percentage = 0; - if cached_config.settings.buildup_bar_relative_to == "Total Buildup" then - player_buildup_bar_percentage = _player.buildup_share; - else - if top_buildup ~= 0 then - player_buildup_bar_percentage = _player.buildup / top_buildup; - end - end - - if _player.id == player.myself.id and cached_config.settings.highlighted_bar == "Me" then - drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, - player_buildup_bar_percentage); - elseif cached_config.settings.highlighted_bar == "Top Buildup" and _player.buildup == top_buildup then - drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, - player_buildup_bar_percentage); - else - drawing.draw_bar(ailment_buildup_UI.buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage); - end - - drawing.draw_label(ailment_buildup_UI.player_name_label, position_on_screen, opacity_scale, - player.get_player(_player.id).name); - drawing.draw_label(ailment_buildup_UI.buildup_value_label, position_on_screen, opacity_scale, _player.buildup); - drawing.draw_label(ailment_buildup_UI.buildup_percentage_label, position_on_screen, opacity_scale, - 100 * _player.buildup_share); + drawing.draw_label(ailment_buildup_UI.buildup_percentage_label, position_on_screen, opacity_scale, 100 * _player.buildup_share); + xy = 11.4; end function ailment_buildup_UI_entity.init_module() diff --git a/reframework/autorun/MHR_Overlay/UI/UI_Entities/body_part_UI_entity.lua b/reframework/autorun/MHR_Overlay/UI/UI_Entities/body_part_UI_entity.lua index 6ab7b33..c7a719a 100644 --- a/reframework/autorun/MHR_Overlay/UI/UI_Entities/body_part_UI_entity.lua +++ b/reframework/autorun/MHR_Overlay/UI/UI_Entities/body_part_UI_entity.lua @@ -87,10 +87,8 @@ function body_part_UI_entity.new(part_visibility, part_name_label, flinch_visibi return entity; end -function body_part_UI_entity.draw_dynamic(part, position_on_screen, opacity_scale) - local cached_config = config.current_config.large_monster_UI.dynamic.body_parts; - - if not part.body_part_dynamic_UI.part_visibility then +function body_part_UI_entity.draw(part, part_UI, cached_config, position_on_screen, opacity_scale) + if not part_UI.part_visibility then return; end @@ -122,251 +120,61 @@ function body_part_UI_entity.draw_dynamic(part, position_on_screen, opacity_scal local flinch_position_on_screen = { x = position_on_screen.x + cached_config.part_health.offset.x, y = position_on_screen.y + cached_config.part_health.offset.y, - visibility = part.body_part_dynamic_UI.flinch_visibility + visibility = part_UI.flinch_visibility }; local break_position_on_screen = { x = position_on_screen.x + cached_config.part_break.offset.x, y = position_on_screen.y + cached_config.part_break.offset.y, - visibility = part.body_part_dynamic_UI.flinch_visibility + visibility = part_UI.flinch_visibility }; local loss_position_on_screen = { x = position_on_screen.x + cached_config.part_loss.offset.x, - y = position_on_screen.y + cached_config.part_loss.offset.y - + y = position_on_screen.y + cached_config.part_loss.offset.y, + part_UI = part_UI.loss_visibility }; - if part.body_part_dynamic_UI.flinch_visibility then - drawing.draw_bar(part.body_part_dynamic_UI.flinch_bar, flinch_position_on_screen, opacity_scale, + if part_UI.flinch_visibility then + drawing.draw_bar(part_UI.flinch_bar, flinch_position_on_screen, opacity_scale, part.health_percentage); end - if part.body_part_dynamic_UI.break_visibility and part.break_max_health ~= -1 and part.break_count < + if part_UI.break_visibility and part.break_max_health ~= -1 and part.break_count < part.break_max_count then - drawing.draw_bar(part.body_part_dynamic_UI.break_bar, break_position_on_screen, opacity_scale, + drawing.draw_bar(part_UI.break_bar, break_position_on_screen, opacity_scale, part.break_health_percentage); end - if part.body_part_dynamic_UI.loss_visibility and part.loss_max_health ~= -1 and not part.is_severed then - drawing.draw_bar(part.body_part_dynamic_UI.loss_bar, loss_position_on_screen, opacity_scale, + if part_UI.loss_visibility and part.loss_max_health ~= -1 and not part.is_severed then + drawing.draw_bar(part_UI.loss_bar, loss_position_on_screen, opacity_scale, part.loss_health_percentage); end - drawing.draw_label(part.body_part_dynamic_UI.part_name_label, position_on_screen, opacity_scale, part_name); + drawing.draw_label(part_UI.part_name_label, position_on_screen, opacity_scale, part_name); - if part.body_part_dynamic_UI.flinch_visibility then - drawing.draw_label(part.body_part_dynamic_UI.flinch_text_label, flinch_position_on_screen, opacity_scale); - drawing.draw_label(part.body_part_dynamic_UI.flinch_value_label, flinch_position_on_screen, opacity_scale, + if part_UI.flinch_visibility then + drawing.draw_label(part_UI.flinch_text_label, flinch_position_on_screen, opacity_scale); + drawing.draw_label(part_UI.flinch_value_label, flinch_position_on_screen, opacity_scale, health_string); - drawing.draw_label(part.body_part_dynamic_UI.flinch_percentage_label, flinch_position_on_screen, opacity_scale, + drawing.draw_label(part_UI.flinch_percentage_label, flinch_position_on_screen, opacity_scale, 100 * part.health_percentage); end - if part.body_part_dynamic_UI.break_visibility and part.break_max_health ~= -1 and part.break_count < + if part_UI.break_visibility and part.break_max_health ~= -1 and part.break_count < part.break_max_count then - drawing.draw_label(part.body_part_dynamic_UI.break_text_label, break_position_on_screen, opacity_scale); - drawing.draw_label(part.body_part_dynamic_UI.break_value_label, break_position_on_screen, opacity_scale, + drawing.draw_label(part_UI.break_text_label, break_position_on_screen, opacity_scale); + drawing.draw_label(part_UI.break_value_label, break_position_on_screen, opacity_scale, break_health_string); - drawing.draw_label(part.body_part_dynamic_UI.break_percentage_label, break_position_on_screen, opacity_scale, + drawing.draw_label(part_UI.break_percentage_label, break_position_on_screen, opacity_scale, 100 * part.break_health_percentage); end - if part.body_part_dynamic_UI.loss_visibility and part.loss_max_health ~= -1 and not part.is_severed then - drawing.draw_label(part.body_part_dynamic_UI.loss_text_label, loss_position_on_screen, opacity_scale); - drawing.draw_label(part.body_part_dynamic_UI.loss_value_label, loss_position_on_screen, opacity_scale, + if part_UI.loss_visibility and part.loss_max_health ~= -1 and not part.is_severed then + drawing.draw_label(part_UI.loss_text_label, loss_position_on_screen, opacity_scale); + drawing.draw_label(part_UI.loss_value_label, loss_position_on_screen, opacity_scale, loss_health_string); - drawing.draw_label(part.body_part_dynamic_UI.loss_health_percentage_label, loss_position_on_screen, opacity_scale, - 100 * part.loss_health_percentage); - end -end - -function body_part_UI_entity.draw_static(part, position_on_screen, opacity_scale) - local cached_config = config.current_config.large_monster_UI.static.body_parts; - - if not part.body_part_static_UI.part_visibility then - return; - end - - local part_name = ""; - if cached_config.part_name_label.include.part_name then - part_name = part.name .. " "; - end - if cached_config.part_name_label.include.flinch_count and part.flinch_count ~= 0 then - part_name = part_name .. "x" .. tostring(part.flinch_count) .. " "; - end - - if part.break_max_count ~= 0 then - if cached_config.part_name_label.include.break_count then - if cached_config.part_name_label.include.break_max_count then - part_name = part_name .. tostring(part.break_count) .. "/" .. tostring(part.break_max_count); - - elseif part.flinch_count ~= 0 then - part_name = part_name .. "x" .. tostring(part.break_count); - end - elseif cached_config.part_name_label.include.break_max_count then - part_name = part_name .. "/" .. tostring(part.break_max_count); - end - end - - local health_string = string.format("%.0f/%.0f", part.health, part.max_health); - local break_health_string = string.format("%.0f/%.0f", part.break_health, part.break_max_health); - local loss_health_string = string.format("%.0f/%.0f", part.loss_health, part.loss_max_health); - - local flinch_position_on_screen = { - x = position_on_screen.x + cached_config.part_health.offset.x, - y = position_on_screen.y + cached_config.part_health.offset.y, - visibility = part.body_part_static_UI.flinch_visibility - }; - - local break_position_on_screen = { - x = position_on_screen.x + cached_config.part_break.offset.x, - y = position_on_screen.y + cached_config.part_break.offset.y, - visibility = part.body_part_static_UI.flinch_visibility - }; - - local loss_position_on_screen = { - x = position_on_screen.x + cached_config.part_loss.offset.x, - y = position_on_screen.y + cached_config.part_loss.offset.y - - }; - - if part.body_part_static_UI.flinch_visibility then - drawing.draw_bar(part.body_part_static_UI.flinch_bar, flinch_position_on_screen, opacity_scale, part.health_percentage); - end - - if part.body_part_static_UI.break_visibility and part.break_max_health ~= -1 and part.break_count < - part.break_max_count then - drawing.draw_bar(part.body_part_static_UI.break_bar, break_position_on_screen, opacity_scale, - part.break_health_percentage); - end - - if part.body_part_static_UI.loss_visibility and part.loss_max_health ~= -1 and not part.is_severed then - drawing.draw_bar(part.body_part_static_UI.loss_bar, loss_position_on_screen, opacity_scale, - part.loss_health_percentage); - end - - drawing.draw_label(part.body_part_static_UI.part_name_label, position_on_screen, opacity_scale, part_name); - - if part.body_part_static_UI.flinch_visibility then - drawing.draw_label(part.body_part_static_UI.flinch_text_label, flinch_position_on_screen, opacity_scale); - drawing.draw_label(part.body_part_static_UI.flinch_value_label, flinch_position_on_screen, opacity_scale, - health_string); - drawing.draw_label(part.body_part_static_UI.flinch_percentage_label, flinch_position_on_screen, opacity_scale, - 100 * part.health_percentage); - end - - if part.body_part_static_UI.break_visibility and part.break_max_health ~= -1 and part.break_count < - part.break_max_count then - drawing.draw_label(part.body_part_static_UI.break_text_label, break_position_on_screen, opacity_scale); - drawing.draw_label(part.body_part_static_UI.break_value_label, break_position_on_screen, opacity_scale, - break_health_string); - drawing.draw_label(part.body_part_static_UI.break_percentage_label, break_position_on_screen, opacity_scale, - 100 * part.break_health_percentage); - end - - if part.body_part_static_UI.loss_visibility and part.loss_max_health ~= -1 and not part.is_severed then - drawing.draw_label(part.body_part_static_UI.loss_text_label, loss_position_on_screen, opacity_scale); - drawing.draw_label(part.body_part_static_UI.loss_value_label, loss_position_on_screen, opacity_scale, - loss_health_string); - drawing.draw_label(part.body_part_static_UI.loss_health_percentage_label, loss_position_on_screen, opacity_scale, - 100 * part.loss_health_percentage); - end -end - -function body_part_UI_entity.draw_highlighted(part, position_on_screen, opacity_scale) - local cached_config = config.current_config.large_monster_UI.highlighted.body_parts; - - if not part.body_part_highlighted_UI.part_visibility then - return; - end - - local part_name = ""; - if cached_config.part_name_label.include.part_name then - part_name = part.name .. " "; - end - if cached_config.part_name_label.include.flinch_count and part.flinch_count ~= 0 then - part_name = part_name .. "x" .. tostring(part.flinch_count) .. " "; - end - - if part.break_max_count ~= 0 then - if cached_config.part_name_label.include.break_count then - if cached_config.part_name_label.include.break_max_count then - part_name = part_name .. tostring(part.break_count) .. "/" .. tostring(part.break_max_count); - - elseif part.flinch_count ~= 0 then - part_name = part_name .. "x" .. tostring(part.break_count); - end - elseif cached_config.part_name_label.include.break_max_count then - part_name = part_name .. "/" .. tostring(part.break_max_count); - end - end - - local health_string = string.format("%.0f/%.0f", part.health, part.max_health); - local break_health_string = string.format("%.0f/%.0f", part.break_health, part.break_max_health); - local loss_health_string = string.format("%.0f/%.0f", part.loss_health, part.loss_max_health); - - local flinch_position_on_screen = { - x = position_on_screen.x + cached_config.part_health.offset.x, - y = position_on_screen.y + cached_config.part_health.offset.y, - visibility = part.body_part_highlighted_UI.flinch_visibility - }; - - local break_position_on_screen = { - x = position_on_screen.x + cached_config.part_break.offset.x, - y = position_on_screen.y + cached_config.part_break.offset.y, - visibility = part.body_part_highlighted_UI.flinch_visibility - }; - - local loss_position_on_screen = { - x = position_on_screen.x + cached_config.part_loss.offset.x, - y = position_on_screen.y + cached_config.part_loss.offset.y - - }; - - local draw_health = part.body_part_highlighted_UI.flinch_visibility and part.max_health > 0; - local draw_break = part.body_part_highlighted_UI.break_visibility and part.break_max_health > 0 and part.break_count < - part.break_max_count; - local draw_loss = part.body_part_highlighted_UI.loss_visibility and part.loss_max_health > 0 and not part.is_severed; - - if draw_health then - drawing.draw_bar(part.body_part_highlighted_UI.flinch_bar, flinch_position_on_screen, opacity_scale, - part.health_percentage); - end - - if draw_break then - drawing.draw_bar(part.body_part_highlighted_UI.break_bar, break_position_on_screen, opacity_scale, - part.break_health_percentage); - end - - if draw_loss then - drawing.draw_bar(part.body_part_highlighted_UI.loss_bar, loss_position_on_screen, opacity_scale, - part.loss_health_percentage); - end - - drawing.draw_label(part.body_part_highlighted_UI.part_name_label, position_on_screen, opacity_scale, part_name); - - if draw_health then - drawing.draw_label(part.body_part_highlighted_UI.flinch_text_label, flinch_position_on_screen, opacity_scale); - drawing.draw_label(part.body_part_highlighted_UI.flinch_value_label, flinch_position_on_screen, opacity_scale, - health_string); - drawing.draw_label(part.body_part_highlighted_UI.flinch_percentage_label, flinch_position_on_screen, opacity_scale, - 100 * part.health_percentage); - end - - if draw_break then - drawing.draw_label(part.body_part_highlighted_UI.break_text_label, break_position_on_screen, opacity_scale); - drawing.draw_label(part.body_part_highlighted_UI.break_value_label, break_position_on_screen, opacity_scale, - break_health_string); - drawing.draw_label(part.body_part_highlighted_UI.break_percentage_label, break_position_on_screen, opacity_scale, - 100 * part.break_health_percentage); - end - - if draw_loss then - drawing.draw_label(part.body_part_highlighted_UI.loss_text_label, loss_position_on_screen, opacity_scale); - drawing.draw_label(part.body_part_highlighted_UI.loss_value_label, loss_position_on_screen, opacity_scale, - loss_health_string); - drawing.draw_label(part.body_part_highlighted_UI.loss_health_percentage_label, loss_position_on_screen, opacity_scale, + drawing.draw_label(part_UI.loss_health_percentage_label, loss_position_on_screen, opacity_scale, 100 * part.loss_health_percentage); end end diff --git a/reframework/autorun/MHR_Overlay/UI/customization_menu.lua b/reframework/autorun/MHR_Overlay/UI/customization_menu.lua index ba5a748..42b7216 100644 --- a/reframework/autorun/MHR_Overlay/UI/customization_menu.lua +++ b/reframework/autorun/MHR_Overlay/UI/customization_menu.lua @@ -13,6 +13,16 @@ local time_UI; local keyboard; local label_customization; local bar_customization; +local large_monster_UI_customization; + +local label_customization; +local bar_customization; +local health_customization; +local stamina_customization; +local rage_customization; +local body_parts_customization; +local ailments_customization; +local ailment_buildups_customization; customization_menu.font = nil; customization_menu.font_range = {0x1, 0xFFFF, 0}; @@ -85,6 +95,7 @@ customization_menu.menu_font_changed = false; function customization_menu.reload_font(pop_push) customization_menu.font = imgui.load_font(language.current_language.font_name, config.current_config.global_settings.menu_font.size, customization_menu.font_range); + if pop_push then imgui.pop_font(); imgui.push_font(customization_menu.font); @@ -124,6 +135,7 @@ function customization_menu.init() customization_menu.displayed_highlighted_buildup_bar_types = {language.current_language.customization_menu.me, language.current_language.customization_menu.top_buildup, language.current_language.customization_menu.none}; + customization_menu.displayed_buildup_bar_relative_types = {language.current_language.customization_menu.total_buildup, language.current_language.customization_menu.top_buildup}; customization_menu.displayed_damage_meter_UI_highlighted_bar_types = @@ -255,7 +267,9 @@ function customization_menu.draw() customization_menu.all_UI_waiting_for_key = true; end end + imgui.same_line(); + imgui.text(keyboard.get_hotkey_name(config.current_config.global_settings.hotkeys_with_modifiers.all_UI)); if customization_menu.small_monster_UI_waiting_for_key then if imgui.button(language.current_language.customization_menu.press_any_key) then @@ -278,7 +292,9 @@ function customization_menu.draw() customization_menu.small_monster_UI_waiting_for_key = true; end end + imgui.same_line(); + imgui.text(keyboard.get_hotkey_name(config.current_config.global_settings.hotkeys_with_modifiers.small_monster_UI)); if customization_menu.large_monster_UI_waiting_for_key then if imgui.button(language.current_language.customization_menu.press_any_key) then @@ -301,7 +317,9 @@ function customization_menu.draw() customization_menu.large_monster_UI_waiting_for_key = true; end end + imgui.same_line(); + imgui.text(keyboard.get_hotkey_name(config.current_config.global_settings.hotkeys_with_modifiers.large_monster_UI)); if customization_menu.large_monster_dynamic_UI_waiting_for_key then if imgui.button(language.current_language.customization_menu.press_any_key) then @@ -324,7 +342,9 @@ function customization_menu.draw() customization_menu.large_monster_dynamic_UI_waiting_for_key = true; end end + imgui.same_line(); + imgui.text(keyboard.get_hotkey_name(config.current_config.global_settings.hotkeys_with_modifiers .large_monster_dynamic_UI)); if customization_menu.large_monster_static_UI_waiting_for_key then @@ -348,7 +368,9 @@ function customization_menu.draw() customization_menu.large_monster_static_UI_waiting_for_key = true; end end + imgui.same_line(); + imgui.text(keyboard.get_hotkey_name(config.current_config.global_settings.hotkeys_with_modifiers .large_monster_static_UI)); if customization_menu.large_monster_highlighted_UI_waiting_for_key then @@ -396,7 +418,9 @@ function customization_menu.draw() customization_menu.time_UI_waiting_for_key = true; end end + imgui.same_line(); + imgui.text(keyboard.get_hotkey_name(config.current_config.global_settings.hotkeys_with_modifiers.time_UI)); if customization_menu.damage_meter_UI_waiting_for_key then if imgui.button(language.current_language.customization_menu.press_any_key) then @@ -419,7 +443,9 @@ function customization_menu.draw() customization_menu.damage_meter_UI_waiting_for_key = true; end end + imgui.same_line(); + imgui.text(keyboard.get_hotkey_name(config.current_config.global_settings.hotkeys_with_modifiers.damage_meter_UI)); if customization_menu.endemic_life_UI_waiting_for_key then if imgui.button(language.current_language.customization_menu.press_any_key) then @@ -442,7 +468,9 @@ function customization_menu.draw() customization_menu.endemic_life_UI_waiting_for_key = true; end end + imgui.same_line(); + imgui.text(keyboard.get_hotkey_name(config.current_config.global_settings.hotkeys_with_modifiers.endemic_life_UI)); imgui.tree_pop(); end @@ -469,39 +497,48 @@ function customization_menu.draw() small_monster.init_UI(monster); end end + if large_monster_dynamic_UI_changed or modifiers_changed then for _, monster in pairs(large_monster.list) do - large_monster.init_dynamic_UI(monster); + large_monster.init_UI(monster, monster.dynamic_UI, config.current_config.large_monster_UI.dynamic); end end + if large_monster_static_UI_changed or modifiers_changed then for _, monster in pairs(large_monster.list) do - large_monster.init_static_UI(monster); + large_monster.init_UI(monster, monster.static_UI, config.current_config.large_monster_UI.static); end end + if large_monster_highlighted_UI_changed or modifiers_changed then for _, monster in pairs(large_monster.list) do - large_monster.init_highlighted_UI(monster); + large_monster.init_UI(monster, monster.highlighted_UI, config.current_config.large_monster_UI.highlighted); end end + if time_UI_changed or modifiers_changed then time_UI.init_UI(); end + if damage_meter_UI_changed or modifiers_changed then for _, _player in pairs(player.list) do player.init_UI(_player); end + player.init_total_UI(player.total); end + if endemic_life_UI_changed or modifiers_changed then for _, creature in pairs(env_creature.list) do env_creature.init_UI(creature); end end + if customization_menu.menu_font_changed and apply_font_requested then customization_menu.menu_font_changed = false; customization_menu.reload_font(false); end + if modules_changed or global_settings_changed or small_monster_UI_changed or large_monster_dynamic_UI_changed or large_monster_static_UI_changed or large_monster_highlighted_UI_changed or time_UI_changed or damage_meter_UI_changed or endemic_life_UI_changed then @@ -512,33 +549,41 @@ end function customization_menu.draw_modules() local changed = false; local config_changed = false; + if imgui.tree_node(language.current_language.customization_menu.modules) then changed, config.current_config.small_monster_UI.enabled = imgui.checkbox( language.current_language.customization_menu.small_monster_UI, config.current_config.small_monster_UI.enabled); config_changed = config_changed or changed; + changed, config.current_config.large_monster_UI.dynamic.enabled = imgui.checkbox(language.current_language.customization_menu.large_monster_dynamic_UI, config.current_config.large_monster_UI.dynamic.enabled); config_changed = config_changed or changed; + changed, config.current_config.large_monster_UI.static.enabled = imgui.checkbox(language.current_language.customization_menu.large_monster_static_UI, config.current_config.large_monster_UI.static.enabled); config_changed = config_changed or changed; + changed, config.current_config.large_monster_UI.highlighted.enabled = imgui.checkbox(language.current_language.customization_menu.large_monster_highlighted_UI, config.current_config.large_monster_UI.highlighted.enabled); config_changed = config_changed or changed; + changed, config.current_config.time_UI.enabled = imgui.checkbox(language.current_language.customization_menu.time_UI, config.current_config.time_UI.enabled); config_changed = config_changed or changed; + changed, config.current_config.damage_meter_UI.enabled = imgui.checkbox( language.current_language.customization_menu.damage_meter_UI, config.current_config.damage_meter_UI.enabled); config_changed = config_changed or changed; + changed, config.current_config.endemic_life_UI.enabled = imgui.checkbox( language.current_language.customization_menu.endemic_life_UI, config.current_config.endemic_life_UI.enabled); config_changed = config_changed or changed; imgui.tree_pop(); end + return config_changed; end @@ -556,199 +601,274 @@ function customization_menu.draw_global_settings() changed, index = imgui.combo(language.current_language.customization_menu.language .. "*", table_helpers.find_index(language.language_names, cached_config.language), language.language_names); config_changed = config_changed or changed; + if changed then cached_config.language = language.language_names[index]; language.update(index); customization_menu.init(); + apply_font_requested = true; customization_menu.menu_font_changed = true; + part_names.init(); small_monster.init_list(); large_monster.init_list(); env_creature.init_list(); player.init_UI(player.myself); player.init_UI(player.total); + for _, _player in pairs(player.list) do player.init_UI(_player); end end + if imgui.tree_node(language.current_language.customization_menu.menu_font) then local new_value = cached_config.menu_font.size; changed, new_value = imgui.input_text(" ", cached_config.menu_font.size, customization_menu.decimal_input_flags); new_value = tonumber(new_value); + if new_value ~= nil then if new_value < 5 then new_value = 5; elseif new_value > 100 then new_value = 100; end + cached_config.menu_font.size = math.floor(new_value); end + config_changed = config_changed or changed; customization_menu.menu_font_changed = customization_menu.menu_font_changed or changed; + imgui.same_line(); + changed = imgui.button("-"); config_changed = config_changed or changed; + imgui.same_line(); + if changed then cached_config.menu_font.size = cached_config.menu_font.size - 1; + if cached_config.menu_font.size < 5 then cached_config.menu_font.size = 5; else customization_menu.menu_font_changed = customization_menu.menu_font_changed or changed; end end + changed = imgui.button("+"); config_changed = config_changed or changed; + imgui.same_line(); + if changed then cached_config.menu_font.size = cached_config.menu_font.size + 1; + if cached_config.menu_font.size > 100 then cached_config.menu_font.size = 100; else customization_menu.menu_font_changed = customization_menu.menu_font_changed or changed; end end + imgui.text(language.current_language.customization_menu.size .. "*"); + if imgui.button(language.current_language.customization_menu.apply) then apply_font_requested = true; end + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.UI_font) then imgui.text(language.current_language.customization_menu.UI_font_notice); + changed, index = imgui.combo(language.current_language.customization_menu.family, table_helpers.find_index(customization_menu.fonts, cached_config.UI_font.family), customization_menu.fonts); config_changed = config_changed or changed; + if changed then cached_config.UI_font.family = customization_menu.fonts[index]; end + changed, cached_config.UI_font.size = imgui.slider_int(language.current_language.customization_menu.size, cached_config.UI_font.size, 1, 100); config_changed = config_changed or changed; + changed, cached_config.UI_font.bold = imgui.checkbox(language.current_language.customization_menu.bold, cached_config.UI_font.bold); config_changed = config_changed or changed; + changed, cached_config.UI_font.italic = imgui.checkbox(language.current_language.customization_menu.italic, cached_config.UI_font.italic); config_changed = config_changed or changed; imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.modifiers) then changed, cached_config.modifiers.global_position_modifier = imgui.drag_float(language.current_language.customization_menu.global_position_modifier, cached_config.modifiers.global_position_modifier, 0.01, 0.01, 10, "%.1f"); + config_changed = config_changed or changed; modifiers_changed = modifiers_changed or changed; + changed, cached_config.modifiers.global_scale_modifier = imgui.drag_float(language.current_language .customization_menu.global_scale_modifier, cached_config.modifiers.global_scale_modifier, 0.01, 0.01, 10, "%.1f"); + config_changed = config_changed or changed; modifiers_changed = modifiers_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.performance) then changed, cached_config.performance.max_monster_updates_per_tick = imgui.slider_int(language.current_language.customization_menu.max_monster_updates_per_tick, cached_config.performance.max_monster_updates_per_tick, 1, 150); + config_changed = config_changed or changed; + changed, cached_config.performance.prioritize_large_monsters = imgui.checkbox(language.current_language.customization_menu.prioritize_large_monsters, cached_config.performance.prioritize_large_monsters); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.module_visibility_on_different_screens) then if imgui.tree_node(language.current_language.customization_menu.during_quest) then changed, cached_config.module_visibility.during_quest.small_monster_UI = imgui.checkbox(language.current_language.customization_menu.small_monster_UI, cached_config.module_visibility.during_quest.small_monster_UI); + config_changed = config_changed or changed; + changed, cached_config.module_visibility.during_quest.large_monster_dynamic_UI = imgui.checkbox( language.current_language.customization_menu.large_monster_dynamic_UI, cached_config.module_visibility.during_quest.large_monster_dynamic_UI); + config_changed = config_changed or changed; imgui.same_line(); + changed, cached_config.module_visibility.during_quest.large_monster_static_UI = imgui.checkbox( language.current_language.customization_menu.large_monster_static_UI, cached_config.module_visibility.during_quest.large_monster_static_UI); + config_changed = config_changed or changed; + changed, cached_config.module_visibility.during_quest.large_monster_highlighted_UI = imgui.checkbox( language.current_language.customization_menu.large_monster_highlighted_UI, cached_config.module_visibility.during_quest.large_monster_highlighted_UI); + config_changed = config_changed or changed; + changed, cached_config.module_visibility.during_quest.time_UI = imgui.checkbox(language.current_language.customization_menu.time_UI, cached_config.module_visibility.during_quest.time_UI); + config_changed = config_changed or changed; imgui.same_line(); + changed, cached_config.module_visibility.during_quest.damage_meter_UI = imgui.checkbox(language.current_language.customization_menu.damage_meter_UI, cached_config.module_visibility.during_quest.damage_meter_UI); + config_changed = config_changed or changed; + changed, cached_config.module_visibility.during_quest.endemic_life_UI = imgui.checkbox(language.current_language.customization_menu.endemic_life_UI, cached_config.module_visibility.during_quest.endemic_life_UI); + config_changed = config_changed or changed; imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.quest_result_screen) then changed, cached_config.module_visibility.quest_result_screen.small_monster_UI = imgui.checkbox( language.current_language.customization_menu.small_monster_UI, cached_config.module_visibility.quest_result_screen.small_monster_UI); + config_changed = config_changed or changed; + changed, cached_config.module_visibility.quest_result_screen.large_monster_dynamic_UI = imgui.checkbox( language.current_language.customization_menu.large_monster_dynamic_UI, cached_config.module_visibility.quest_result_screen.large_monster_dynamic_UI); + config_changed = config_changed or changed; imgui.same_line(); + changed, cached_config.module_visibility.quest_result_screen.large_monster_static_UI = imgui.checkbox( language.current_language.customization_menu.large_monster_static_UI, cached_config.module_visibility.quest_result_screen.large_monster_static_UI); + config_changed = config_changed or changed; + changed, cached_config.module_visibility.quest_result_screen.large_monster_highlighted_UI = imgui.checkbox( language.current_language.customization_menu.large_monster_highlighted_UI, cached_config.module_visibility.quest_result_screen.large_monster_highlighted_UI); + config_changed = config_changed or changed; + changed, cached_config.module_visibility.quest_result_screen.time_UI = imgui.checkbox(language.current_language.customization_menu.time_UI, cached_config.module_visibility.quest_result_screen.time_UI); + config_changed = config_changed or changed; imgui.same_line(); + changed, cached_config.module_visibility.quest_result_screen.damage_meter_UI = imgui.checkbox( language.current_language.customization_menu.damage_meter_UI, cached_config.module_visibility.quest_result_screen.damage_meter_UI); + config_changed = config_changed or changed; + changed, cached_config.module_visibility.during_quest.endemic_life_UI = imgui.checkbox(language.current_language.customization_menu.endemic_life_UI, cached_config.module_visibility.during_quest.endemic_life_UI); + config_changed = config_changed or changed; imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.training_area) then changed, cached_config.module_visibility.training_area.large_monster_dynamic_UI = imgui.checkbox( language.current_language.customization_menu.large_monster_dynamic_UI, cached_config.module_visibility.training_area.large_monster_dynamic_UI); + config_changed = config_changed or changed; imgui.same_line(); + changed, cached_config.module_visibility.training_area.large_monster_static_UI = imgui.checkbox( language.current_language.customization_menu.large_monster_static_UI, cached_config.module_visibility.training_area.large_monster_static_UI); + config_changed = config_changed or changed; + changed, cached_config.module_visibility.training_area.damage_meter_UI = imgui.checkbox(language.current_language.customization_menu.damage_meter_UI, cached_config.module_visibility.training_area.damage_meter_UI); + config_changed = config_changed or changed; + changed, cached_config.module_visibility.during_quest.endemic_life_UI = imgui.checkbox(language.current_language.customization_menu.endemic_life_UI, cached_config.module_visibility.during_quest.endemic_life_UI); + config_changed = config_changed or changed; + imgui.tree_pop(); end imgui.tree_pop(); end + imgui.tree_pop(); end + return config_changed, modifiers_changed, apply_font_requested; end @@ -756,491 +876,168 @@ function customization_menu.draw_small_monster_UI() local changed = false; local config_changed = false; local index = 1; + if imgui.tree_node(language.current_language.customization_menu.small_monster_UI) then local cached_config = config.current_config.small_monster_UI; + changed, cached_config.enabled = imgui.checkbox(language.current_language.customization_menu.enabled, config.current_config.small_monster_UI.enabled); + config_changed = config_changed or changed; + if imgui.tree_node(language.current_language.customization_menu.settings) then changed, cached_config.settings.hide_dead_or_captured = imgui.checkbox( language.current_language.customization_menu.hide_dead_or_captured, config.current_config.small_monster_UI.settings.hide_dead_or_captured); + config_changed = config_changed or changed; + changed, index = imgui.combo(language.current_language.customization_menu.static_orientation, table_helpers.find_index(customization_menu.orientation_types, cached_config.settings.orientation), customization_menu.displayed_orientation_types); + config_changed = config_changed or changed; + if changed then cached_config.settings.orientation = customization_menu.orientation_types[index]; end + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.dynamic_positioning) then changed, cached_config.dynamic_positioning.enabled = imgui.checkbox( language.current_language.customization_menu.enabled, cached_config.dynamic_positioning.enabled); + config_changed = config_changed or changed; + changed, cached_config.dynamic_positioning.opacity_falloff = imgui.checkbox(language.current_language.customization_menu.opacity_falloff, cached_config.dynamic_positioning.opacity_falloff); + config_changed = config_changed or changed; + changed, cached_config.dynamic_positioning.max_distance = imgui.drag_float(language.current_language.customization_menu.max_distance, cached_config.dynamic_positioning.max_distance, 1, 0, 10000, "%.0f"); + config_changed = config_changed or changed; + if imgui.tree_node(language.current_language.customization_menu.world_offset) then changed, cached_config.dynamic_positioning.world_offset.x = imgui.drag_float(language.current_language.customization_menu.x, cached_config.dynamic_positioning.world_offset.x, 0.1, -100, 100, "%.1f"); + config_changed = config_changed or changed; + changed, cached_config.dynamic_positioning.world_offset.y = imgui.drag_float(language.current_language.customization_menu.y, cached_config.dynamic_positioning.world_offset.y, 0.1, -100, 100, "%.1f"); + config_changed = config_changed or changed; + changed, cached_config.dynamic_positioning.world_offset.z = imgui.drag_float(language.current_language.customization_menu.z, cached_config.dynamic_positioning.world_offset.z, 0.1, -100, 100, "%.1f"); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.viewport_offset) then changed, cached_config.dynamic_positioning.viewport_offset.x = imgui.drag_float(language.current_language.customization_menu.x, cached_config.dynamic_positioning.viewport_offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + changed, cached_config.dynamic_positioning.viewport_offset.y = imgui.drag_float(language.current_language.customization_menu.y, cached_config.dynamic_positioning.viewport_offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + imgui.tree_pop(); end + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.static_position) then changed, cached_config.static_position.x = imgui.drag_float(language.current_language.customization_menu.x, cached_config.static_position.x, 0.1, 0, screen.width, "%.1f"); + config_changed = config_changed or changed; + changed, cached_config.static_position.y = imgui.drag_float(language.current_language.customization_menu.y, cached_config.static_position.y, 0.1, 0, screen.height, "%.1f"); + config_changed = config_changed or changed; + changed, index = imgui.combo(language.current_language.customization_menu.anchor, table_helpers.find_index( customization_menu.anchor_types, cached_config.static_position.anchor), customization_menu.displayed_anchor_types); + config_changed = config_changed or changed; + if changed then cached_config.static_position.anchor = customization_menu.anchor_types[index]; end + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.static_spacing) then changed, cached_config.static_spacing.x = imgui.drag_float(language.current_language.customization_menu.x, cached_config.static_spacing.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + changed, cached_config.static_spacing.y = imgui.drag_float(language.current_language.customization_menu.y, cached_config.static_spacing.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.static_sorting) then changed, index = imgui.combo(language.current_language.customization_menu.type, table_helpers.find_index( customization_menu.monster_UI_sorting_types, cached_config.static_sorting.type), customization_menu.displayed_monster_UI_sorting_types); + config_changed = config_changed or changed; + if changed then cached_config.static_sorting.type = customization_menu.monster_UI_sorting_types[index]; end + changed, cached_config.static_sorting.reversed_order = imgui.checkbox( language.current_language.customization_menu.reversed_order, cached_config.static_sorting.reversed_order); + config_changed = config_changed or changed; + imgui.tree_pop(); end + changed = label_customization.draw(language.current_language.customization_menu.monster_name_label, cached_config.monster_name_label); - config_changed = config_changed or changed; - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.health) then - changed, cached_config.health.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.health.visibility); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.health.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.health.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.health.percentage_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.health.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailments) then - changed, cached_config.ailments.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.ailments.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailments.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.spacing) then - changed, cached_config.ailments.spacing.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.spacing.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.spacing.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.spacing.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.settings) then - changed, cached_config.ailments.settings.hide_ailments_with_zero_buildup = - imgui.checkbox(language.current_language.customization_menu.hide_ailments_with_zero_buildup, - cached_config.ailments.settings.hide_ailments_with_zero_buildup); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.hide_inactive_ailments_with_no_buildup_support = imgui.checkbox( - language.current_language.customization_menu.hide_inactive_ailments_with_no_buildup_support, - cached_config.ailments.settings.hide_inactive_ailments_with_no_buildup_support); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.hide_all_inactive_ailments = - imgui.checkbox(language.current_language.customization_menu.hide_all_inactive_ailments, - cached_config.ailments.settings.hide_all_inactive_ailments); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.hide_all_active_ailments = - imgui.checkbox(language.current_language.customization_menu.hide_all_active_ailments, - cached_config.ailments.settings.hide_all_active_ailments); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.hide_disabled_ailments = - imgui.checkbox(language.current_language.customization_menu.hide_disabled_ailments, - cached_config.ailments.settings.hide_disabled_ailments); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.time_limit = imgui.drag_float( - language.current_language.customization_menu.time_limit, cached_config.ailments.settings.time_limit, 0.1, 0, 99999, - "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.sorting) then - changed, index = imgui.combo(language.current_language.customization_menu.type, table_helpers.find_index( - customization_menu.ailments_sorting_types, cached_config.ailments.sorting.type), - customization_menu.displayed_ailments_sorting_types); - config_changed = config_changed or changed; - if changed then - cached_config.ailments.sorting.type = customization_menu.ailments_sorting_types[index]; - end - changed, cached_config.ailments.sorting.reversed_order = imgui.checkbox( - language.current_language.customization_menu.reversed_order, cached_config.ailments.sorting.reversed_order); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.filter) then - changed, cached_config.ailments.filter.paralysis = imgui.checkbox(language.current_language.ailments.paralysis, - cached_config.ailments.filter.paralysis); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.sleep = imgui.checkbox(language.current_language.ailments.sleep, - cached_config.ailments.filter.sleep); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.stun = imgui.checkbox(language.current_language.ailments.stun, - cached_config.ailments.filter.stun); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.flash = imgui.checkbox(language.current_language.ailments.flash, - cached_config.ailments.filter.flash); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.poison = imgui.checkbox(language.current_language.ailments.poison, - cached_config.ailments.filter.poison); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.blast = imgui.checkbox(language.current_language.ailments.blast, - cached_config.ailments.filter.blast); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.exhaust = imgui.checkbox(language.current_language.ailments.exhaust, - cached_config.ailments.filter.exhaust); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.ride = imgui.checkbox(language.current_language.ailments.ride, - cached_config.ailments.filter.ride); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.waterblight = imgui.checkbox(language.current_language.ailments.waterblight, - cached_config.ailments.filter.waterblight); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.fireblight = imgui.checkbox(language.current_language.ailments.fireblight, - cached_config.ailments.filter.fireblight); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.iceblight = imgui.checkbox(language.current_language.ailments.iceblight, - cached_config.ailments.filter.iceblight); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.thunderblight = imgui.checkbox( - language.current_language.ailments.thunderblight, cached_config.ailments.filter.thunderblight); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.fall_trap = imgui.checkbox(language.current_language.ailments.fall_trap, - cached_config.ailments.filter.fall_trap); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.shock_trap = imgui.checkbox(language.current_language.ailments.shock_trap, - cached_config.ailments.filter.shock_trap); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.tranq_bomb = imgui.checkbox(language.current_language.ailments.tranq_bomb, - cached_config.ailments.filter.tranq_bomb); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.dung_bomb = imgui.checkbox(language.current_language.ailments.dung_bomb, - cached_config.ailments.filter.dung_bomb); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.steel_fang = imgui.checkbox(language.current_language.ailments.steel_fang, - cached_config.ailments.filter.steel_fang); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.quick_sand = imgui.checkbox(language.current_language.ailments.quick_sand, - cached_config.ailments.filter.quick_sand); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.fall_otomo_trap = imgui.checkbox( - language.current_language.ailments.fall_otomo_trap, cached_config.ailments.filter.fall_otomo_trap); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.shock_otomo_trap = imgui.checkbox( - language.current_language.ailments.shock_otomo_trap, cached_config.ailments.filter.shock_otomo_trap); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailment_name_label) then - changed, cached_config.ailments.ailment_name_label.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.ailments.ailment_name_label.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.include) then - changed, cached_config.ailments.ailment_name_label.include.ailment_name = - imgui.checkbox(language.current_language.customization_menu.ailment_name, - cached_config.ailments.ailment_name_label.include.ailment_name); - config_changed = config_changed or changed; - changed, cached_config.ailments.ailment_name_label.include.activation_count = imgui.checkbox( - language.current_language.customization_menu.activation_count, - cached_config.ailments.ailment_name_label.include.activation_count); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailments.ailment_name_label.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.ailment_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.ailment_name_label.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.ailment_name_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.ailments.ailment_name_label.color = - imgui.color_picker_argb("", cached_config.ailments.ailment_name_label.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.shadow) then - changed, cached_config.ailments.ailment_name_label.shadow.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.ailments.ailment_name_label.shadow.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailments.ailment_name_label.shadow.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.ailment_name_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.ailment_name_label.shadow.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.ailment_name_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.ailments.ailment_name_label.shadow.color = imgui.color_picker_argb("", - cached_config.ailments.ailment_name_label.shadow.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.ailments.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.ailments.value_label.visibility); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.ailments.percentage_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.timer_label, - cached_config.ailments.timer_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.ailments.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailment_buildups) then - changed, cached_config.ailment_buildups.visibility = imgui.checkbox( - language.current_language.customization_menu.visible, cached_config.ailment_buildups.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailment_buildups.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailment_buildups.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailment_buildups.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.player_spacing) then - changed, cached_config.ailment_buildups.player_spacing.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.ailment_buildups.player_spacing.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.player_spacing.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.ailment_buildups.player_spacing.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailment_spacing) then - changed, cached_config.ailment_buildups.ailment_spacing.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.ailment_buildups.ailment_spacing.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.ailment_spacing.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.ailment_buildups.ailment_spacing.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.settings) then - changed, index = imgui.combo(language.current_language.customization_menu.highlighted_bar, - table_helpers.find_index(customization_menu.highlighted_buildup_bar_types, - cached_config.ailment_buildups.settings.highlighted_bar), - customization_menu.displayed_highlighted_buildup_bar_types); - config_changed = config_changed or changed; - if changed then - cached_config.ailment_buildups.settings.highlighted_bar = customization_menu.highlighted_buildup_bar_types[index]; - end - changed, index = imgui.combo(language.current_language.customization_menu.buildup_bars_are_relative_to, - table_helpers.find_index(customization_menu.displayed_buildup_bar_relative_types, - cached_config.ailment_buildups.settings.buildup_bar_relative_to), - customization_menu.displayed_buildup_bar_relative_types); - config_changed = config_changed or changed; - if changed then - cached_config.ailment_buildups.settings.buildup_bar_relative_to = - customization_menu.displayed_buildup_bar_relative_types[index]; - end - changed, cached_config.ailment_buildups.settings.time_limit = - imgui.drag_float(language.current_language.customization_menu.time_limit, - cached_config.ailment_buildups.settings.time_limit, 0.1, 0, 99999, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.filter) then - changed, cached_config.ailment_buildups.filter.stun = imgui.checkbox(language.current_language.ailments.stun, - cached_config.ailment_buildups.filter.stun); - changed, cached_config.ailment_buildups.filter.poison = imgui.checkbox(language.current_language.ailments.poison, - cached_config.ailment_buildups.filter.poison); - changed, cached_config.ailment_buildups.filter.blast = imgui.checkbox(language.current_language.ailments.blast, - cached_config.ailment_buildups.filter.blast); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.sorting) then - changed, index = imgui.combo(language.current_language.customization_menu.type, table_helpers.find_index( - customization_menu.ailment_buildups_sorting_types, cached_config.ailment_buildups.sorting.type), - customization_menu.displayed_ailment_buildups_sorting_types); - config_changed = config_changed or changed; - if changed then - cached_config.ailment_buildups.sorting.type = customization_menu.ailment_buildups_sorting_types[index]; - end - changed, cached_config.ailment_buildups.sorting.reversed_order = - imgui.checkbox(language.current_language.customization_menu.reversed_order, - cached_config.ailment_buildups.sorting.reversed_order); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailment_name_label) then - changed, cached_config.ailment_buildups.ailment_name_label.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.ailment_buildups.ailment_name_label.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.include) then - changed, cached_config.ailment_buildups.ailment_name_label.include.ailment_name = imgui.checkbox( - language.current_language.customization_menu.ailment_name, - cached_config.ailment_buildups.ailment_name_label.include.ailment_name); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.ailment_name_label.include.activation_count = imgui.checkbox( - language.current_language.customization_menu.activation_count, - cached_config.ailment_buildups.ailment_name_label.include.activation_count); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailment_buildups.ailment_name_label.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailment_buildups.ailment_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.ailment_name_label.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailment_buildups.ailment_name_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.ailment_buildups.ailment_name_label.color = imgui.color_picker_argb("", - cached_config.ailment_buildups.ailment_name_label.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.shadow) then - changed, cached_config.ailment_buildups.ailment_name_label.shadow.visibility = imgui.checkbox( - language.current_language.customization_menu.visible, - cached_config.ailment_buildups.ailment_name_label.shadow.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailment_buildups.ailment_name_label.shadow.offset.x = imgui.drag_float( - language.current_language.customization_menu.x, - cached_config.ailment_buildups.ailment_name_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.ailment_name_label.shadow.offset.y = imgui.drag_float( - language.current_language.customization_menu.y, - cached_config.ailment_buildups.ailment_name_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.ailment_buildups.ailment_name_label.shadow.color = imgui.color_picker_argb("", - cached_config.ailment_buildups.ailment_name_label.shadow.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.player_name_label, - cached_config.ailment_buildups.player_name_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.buildup_value_label, - cached_config.ailment_buildups.buildup_value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.buildup_percentage_label, - cached_config.ailment_buildups.buildup_percentage_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.total_buildup_label, - cached_config.ailment_buildups.total_buildup_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.total_buildup_value_label, - cached_config.ailment_buildups.total_buildup_value_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.buildup_bar, - cached_config.ailment_buildups.buildup_bar); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.highlighted_buildup_bar, - cached_config.ailment_buildups.highlighted_buildup_bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end + config_changed = config_changed or changed; + + changed = health_customization.draw(cached_config.health); + config_changed = config_changed or changed; + + changed = ailments_customization.draw(cached_config.ailments); + config_changed = config_changed or changed; + + changed = ailment_buildups_customization.draw(cached_config.ailment_buildups); + config_changed = config_changed or changed; + imgui.tree_pop(); + end + return config_changed; end @@ -1248,1655 +1045,205 @@ function customization_menu.draw_large_monster_dynamic_UI() local changed = false; local config_changed = false; local index = 1; + if imgui.tree_node(language.current_language.customization_menu.dynamically_positioned) then local cached_config = config.current_config.large_monster_UI.dynamic; - changed, cached_config.enabled = imgui.checkbox(language.current_language.customization_menu.enabled, - cached_config.enabled); + + changed, cached_config.enabled = imgui.checkbox( + language.current_language.customization_menu.enabled, cached_config.enabled); + config_changed = config_changed or changed; + if imgui.tree_node(language.current_language.customization_menu.settings) then changed, cached_config.settings.hide_dead_or_captured = imgui.checkbox( language.current_language.customization_menu.hide_dead_or_captured, cached_config.settings.hide_dead_or_captured); + config_changed = config_changed or changed; - changed, cached_config.settings.render_highlighted_monster = - imgui.checkbox(language.current_language.customization_menu.render_highlighted_monster, - cached_config.settings.render_highlighted_monster); - config_changed = config_changed or changed; - changed, cached_config.settings.render_not_highlighted_monsters = - imgui.checkbox(language.current_language.customization_menu.render_not_highlighted_monsters, - cached_config.settings.render_not_highlighted_monsters); + + changed, cached_config.settings.render_highlighted_monster = imgui.checkbox( + language.current_language.customization_menu.render_highlighted_monster, cached_config.settings.render_highlighted_monster); + config_changed = config_changed or changed; + + changed, cached_config.settings.render_not_highlighted_monsters = imgui.checkbox( + language.current_language.customization_menu.render_not_highlighted_monsters, cached_config.settings.render_not_highlighted_monsters); + + config_changed = config_changed or changed; + changed, cached_config.settings.opacity_falloff = imgui.checkbox( language.current_language.customization_menu.opacity_falloff, cached_config.settings.opacity_falloff); + config_changed = config_changed or changed; + changed, cached_config.settings.max_distance = imgui.drag_float( language.current_language.customization_menu.max_distance, cached_config.settings.max_distance, 1, 0, 10000, "%.0f"); - config_changed = config_changed or changed; + + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.world_offset) then - changed, cached_config.world_offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.world_offset.x, 0.1, -100, 100, "%.1f"); + changed, cached_config.world_offset.x = imgui.drag_float( + language.current_language.customization_menu.x, cached_config.world_offset.x, 0.1, -100, 100, "%.1f"); + config_changed = config_changed or changed; - changed, cached_config.world_offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.world_offset.y, 0.1, -100, 100, "%.1f"); + + changed, cached_config.world_offset.y = imgui.drag_float( + language.current_language.customization_menu.y, cached_config.world_offset.y, 0.1, -100, 100, "%.1f"); + config_changed = config_changed or changed; - changed, cached_config.world_offset.z = imgui.drag_float(language.current_language.customization_menu.z, - cached_config.world_offset.z, 0.1, -100, 100, "%.1f"); + + changed, cached_config.world_offset.z = imgui.drag_float( + language.current_language.customization_menu.z, cached_config.world_offset.z, 0.1, -100, 100, "%.1f"); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.viewport_offset) then - changed, cached_config.viewport_offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.viewport_offset.x, 0.1, -screen.width, screen.width, "%.1f"); + changed, cached_config.viewport_offset.x = imgui.drag_float( + language.current_language.customization_menu.x, cached_config.viewport_offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; - changed, cached_config.viewport_offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.viewport_offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.monster_name_label) then - changed, cached_config.monster_name_label.visibility = imgui.checkbox( - language.current_language.customization_menu.visible, cached_config.monster_name_label.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.include) then - changed, cached_config.monster_name_label.include.monster_name = - imgui.checkbox(language.current_language.customization_menu.monster_name, - cached_config.monster_name_label.include.monster_name); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.include.monster_id = - imgui.checkbox(language.current_language.customization_menu.monster_id, - cached_config.monster_name_label.include.monster_id); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.include.crown = - imgui.checkbox(language.current_language.customization_menu.crown, cached_config.monster_name_label.include.crown); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.include.size = imgui.checkbox( - language.current_language.customization_menu.size, cached_config.monster_name_label.include.size); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.include.scrown_thresholds = - imgui.checkbox(language.current_language.customization_menu.crown_thresholds, - cached_config.monster_name_label.include.scrown_thresholds); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.monster_name_label.offset.x = imgui.drag_float( - language.current_language.customization_menu.x, cached_config.monster_name_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.offset.y = imgui.drag_float( - language.current_language.customization_menu.y, cached_config.monster_name_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.monster_name_label.color = imgui.color_picker_argb("", - cached_config.monster_name_label.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.shadow) then - changed, cached_config.monster_name_label.shadow.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.monster_name_label.shadow.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.monster_name_label.shadow.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.monster_name_label.shadow.offset.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.shadow.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.monster_name_label.shadow.offset.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.monster_name_label.shadow.color = imgui.color_picker_argb("", - cached_config.monster_name_label.shadow.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.health) then - changed, cached_config.health.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.health.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.health.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.health.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.health.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.health.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.health.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.health.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.health.percentage_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.health.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.stamina) then - changed, cached_config.stamina.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.stamina.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.stamina.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.stamina.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.stamina.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.stamina.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.stamina.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.stamina.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.stamina.percentage_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.timer_label, - cached_config.stamina.timer_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.stamina.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.rage) then - changed, cached_config.rage.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.rage.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.rage.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.rage.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.rage.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.rage.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.rage.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.rage.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.rage.percentage_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.timer_label, - cached_config.rage.timer_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.rage.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.body_parts) then - changed, cached_config.body_parts.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.body_parts.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.body_parts.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.body_parts.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.spacing) then - changed, cached_config.body_parts.spacing.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.body_parts.spacing.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.spacing.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.body_parts.spacing.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.settings) then - changed, cached_config.body_parts.settings.hide_undamaged_parts = - imgui.checkbox(language.current_language.customization_menu.hide_undamaged_parts, - cached_config.body_parts.settings.hide_undamaged_parts); - config_changed = config_changed or changed; - changed, cached_config.body_parts.settings.time_limit = imgui.drag_float(language.current_language - .customization_menu.time_limit, - cached_config.body_parts.settings.time_limit, 0.1, 0, 99999, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.sorting) then - changed, index = imgui.combo(language.current_language.customization_menu.type, table_helpers.find_index( - customization_menu.large_monster_UI_parts_sorting_types, cached_config.body_parts.sorting.type), - customization_menu.displayed_monster_UI_parts_sorting_types); - config_changed = config_changed or changed; - if changed then - cached_config.body_parts.sorting.type = customization_menu.large_monster_UI_parts_sorting_types[index]; - end - changed, cached_config.body_parts.sorting.reversed_order = - imgui.checkbox(language.current_language.customization_menu.reversed_order, - cached_config.body_parts.sorting.reversed_order); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.filter) then - changed, cached_config.body_parts.filter.health_break_severe = - imgui.checkbox(language.current_language.customization_menu.health_break_severe_filter, - cached_config.body_parts.filter.health_break_severe); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.health_break = imgui.checkbox( - language.current_language.customization_menu.health_break_filter, cached_config.body_parts.filter.health_break); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.health_severe = imgui.checkbox( - language.current_language.customization_menu.health_severe_filter, cached_config.body_parts.filter.health_severe); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.health = imgui.checkbox( - language.current_language.customization_menu.health_filter, cached_config.body_parts.filter.health); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.break_severe = imgui.checkbox( - language.current_language.customization_menu.break_severe_filter, cached_config.body_parts.filter.break_severe); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.break_ = imgui.checkbox( - language.current_language.customization_menu.break_filter, cached_config.body_parts.filter.break_); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.severe = imgui.checkbox( - language.current_language.customization_menu.severe_filter, cached_config.body_parts.filter.severe); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.part_name_label) then - changed, cached_config.body_parts.part_name_label.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.body_parts.part_name_label.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.include) then - changed, cached_config.body_parts.part_name_label.include.part_name = - imgui.checkbox(language.current_language.customization_menu.part_name, - cached_config.body_parts.part_name_label.include.part_name); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_name_label.include.flinch_count = - imgui.checkbox(language.current_language.customization_menu.flinch_count, - cached_config.body_parts.part_name_label.include.flinch_count); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_name_label.include.break_count = - imgui.checkbox(language.current_language.customization_menu.break_count, - cached_config.body_parts.part_name_label.include.break_count); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_name_label.include.break_max_count = imgui.checkbox( - language.current_language.customization_menu.break_max_count, - cached_config.body_parts.part_name_label.include.break_max_count); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.part_name_label.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.body_parts.part_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_name_label.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.body_parts.part_name_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.body_parts.part_name_label.color = - imgui.color_picker_argb("", cached_config.body_parts.part_name_label.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.shadow) then - changed, cached_config.body_parts.part_name_label.shadow.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.body_parts.part_name_label.shadow.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.part_name_label.shadow.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.body_parts.part_name_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_name_label.shadow.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.body_parts.part_name_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.body_parts.part_name_label.shadow.color = imgui.color_picker_argb("", - cached_config.body_parts.part_name_label.shadow.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.part_health) then - changed, cached_config.body_parts.part_health.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.body_parts.part_health.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.part_health.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.body_parts.part_health.offset.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_health.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.body_parts.part_health.offset.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.body_parts.part_health.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.body_parts.part_health.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.body_parts.part_health.percentage_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, - cached_config.body_parts.part_health.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.break_health) then - changed, cached_config.body_parts.part_break.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, cached_config.body_parts.part_break.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.part_break.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.body_parts.part_break.offset.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_break.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.body_parts.part_break.offset.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.body_parts.part_break.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.body_parts.part_break.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.body_parts.part_break.percentage_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, - cached_config.body_parts.part_break.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.loss_health) then - changed, cached_config.body_parts.part_loss.visibility = imgui.checkbox( - language.current_language.customization_menu.visible, cached_config.body_parts.part_loss.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.part_loss.offset.x = imgui.drag_float(language.current_language - .customization_menu.x, - cached_config.body_parts.part_loss.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_loss.offset.y = imgui.drag_float(language.current_language - .customization_menu.y, - cached_config.body_parts.part_loss.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.body_parts.part_loss.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.body_parts.part_loss.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.body_parts.part_loss.percentage_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, - cached_config.body_parts.part_loss.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailments) then - changed, cached_config.ailments.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.ailments.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailments.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.relative_offset) then - changed, cached_config.ailments.relative_offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.relative_offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.relative_offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.relative_offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.spacing) then - changed, cached_config.ailments.spacing.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.spacing.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.spacing.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.spacing.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.settings) then - changed, cached_config.ailments.settings.hide_ailments_with_zero_buildup = - imgui.checkbox(language.current_language.customization_menu.hide_ailments_with_zero_buildup, - cached_config.ailments.settings.hide_ailments_with_zero_buildup); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.hide_inactive_ailments_with_no_buildup_support = imgui.checkbox( - language.current_language.customization_menu.hide_inactive_ailments_with_no_buildup_support, - cached_config.ailments.settings.hide_inactive_ailments_with_no_buildup_support); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.hide_all_inactive_ailments = - imgui.checkbox(language.current_language.customization_menu.hide_all_inactive_ailments, - cached_config.ailments.settings.hide_all_inactive_ailments); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.hide_all_active_ailments = - imgui.checkbox(language.current_language.customization_menu.hide_all_active_ailments, - cached_config.ailments.settings.hide_all_active_ailments); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.hide_disabled_ailments = - imgui.checkbox(language.current_language.customization_menu.hide_disabled_ailments, - cached_config.ailments.settings.hide_disabled_ailments); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.offset_is_relative_to_parts = - imgui.checkbox(language.current_language.customization_menu.offset_is_relative_to_parts, - cached_config.ailments.settings.offset_is_relative_to_parts); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.time_limit = imgui.drag_float( - language.current_language.customization_menu.time_limit, cached_config.ailments.settings.time_limit, 0.1, 0, 99999, - "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.sorting) then - changed, index = imgui.combo(language.current_language.customization_menu.type, table_helpers.find_index( - customization_menu.ailments_sorting_types, cached_config.ailments.sorting.type), - customization_menu.displayed_ailments_sorting_types); - config_changed = config_changed or changed; - if changed then - cached_config.ailments.sorting.type = customization_menu.ailments_sorting_types[index]; - end - changed, cached_config.ailments.sorting.reversed_order = imgui.checkbox( - language.current_language.customization_menu.reversed_order, cached_config.ailments.sorting.reversed_order); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.filter) then - changed, cached_config.ailments.filter.paralysis = imgui.checkbox(language.current_language.ailments.paralysis, - cached_config.ailments.filter.paralysis); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.sleep = imgui.checkbox(language.current_language.ailments.sleep, - cached_config.ailments.filter.sleep); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.stun = imgui.checkbox(language.current_language.ailments.stun, - cached_config.ailments.filter.stun); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.flash = imgui.checkbox(language.current_language.ailments.flash, - cached_config.ailments.filter.flash); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.poison = imgui.checkbox(language.current_language.ailments.poison, - cached_config.ailments.filter.poison); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.blast = imgui.checkbox(language.current_language.ailments.blast, - cached_config.ailments.filter.blast); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.exhaust = imgui.checkbox(language.current_language.ailments.exhaust, - cached_config.ailments.filter.exhaust); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.ride = imgui.checkbox(language.current_language.ailments.ride, - cached_config.ailments.filter.ride); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.waterblight = imgui.checkbox(language.current_language.ailments.waterblight, - cached_config.ailments.filter.waterblight); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.fireblight = imgui.checkbox(language.current_language.ailments.fireblight, - cached_config.ailments.filter.fireblight); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.iceblight = imgui.checkbox(language.current_language.ailments.iceblight, - cached_config.ailments.filter.iceblight); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.thunderblight = imgui.checkbox( - language.current_language.ailments.thunderblight, cached_config.ailments.filter.thunderblight); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.fall_trap = imgui.checkbox(language.current_language.ailments.fall_trap, - cached_config.ailments.filter.fall_trap); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.shock_trap = imgui.checkbox(language.current_language.ailments.shock_trap, - cached_config.ailments.filter.shock_trap); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.tranq_bomb = imgui.checkbox(language.current_language.ailments.tranq_bomb, - cached_config.ailments.filter.tranq_bomb); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.dung_bomb = imgui.checkbox(language.current_language.ailments.dung_bomb, - cached_config.ailments.filter.dung_bomb); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.steel_fang = imgui.checkbox(language.current_language.ailments.steel_fang, - cached_config.ailments.filter.steel_fang); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.quick_sand = imgui.checkbox(language.current_language.ailments.quick_sand, - cached_config.ailments.filter.quick_sand); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.fall_otomo_trap = imgui.checkbox( - language.current_language.ailments.fall_otomo_trap, cached_config.ailments.filter.fall_otomo_trap); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.shock_otomo_trap = imgui.checkbox( - language.current_language.ailments.shock_otomo_trap, cached_config.ailments.filter.shock_otomo_trap); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailment_name_label) then - changed, cached_config.ailments.ailment_name_label.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.ailments.ailment_name_label.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.include) then - changed, cached_config.ailments.ailment_name_label.include.ailment_name = - imgui.checkbox(language.current_language.customization_menu.ailment_name, - cached_config.ailments.ailment_name_label.include.ailment_name); - config_changed = config_changed or changed; - changed, cached_config.ailments.ailment_name_label.include.activation_count = imgui.checkbox( - language.current_language.customization_menu.activation_count, - cached_config.ailments.ailment_name_label.include.activation_count); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailments.ailment_name_label.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.ailment_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.ailment_name_label.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.ailment_name_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.ailments.ailment_name_label.color = - imgui.color_picker_argb("", cached_config.ailments.ailment_name_label.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.shadow) then - changed, cached_config.ailments.ailment_name_label.shadow.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.ailments.ailment_name_label.shadow.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailments.ailment_name_label.shadow.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.ailment_name_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.ailment_name_label.shadow.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.ailment_name_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.ailments.ailment_name_label.shadow.color = imgui.color_picker_argb("", - cached_config.ailments.ailment_name_label.shadow.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.ailments.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.ailments.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.ailments.percentage_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.timer_label, - cached_config.ailments.timer_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.ailments.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailment_buildups) then - changed, cached_config.ailment_buildups.visibility = imgui.checkbox( - language.current_language.customization_menu.visible, cached_config.ailment_buildups.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailment_buildups.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailment_buildups.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailment_buildups.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.player_spacing) then - changed, cached_config.ailment_buildups.player_spacing.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.ailment_buildups.player_spacing.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.player_spacing.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.ailment_buildups.player_spacing.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailment_spacing) then - changed, cached_config.ailment_buildups.ailment_spacing.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.ailment_buildups.ailment_spacing.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.ailment_spacing.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.ailment_buildups.ailment_spacing.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.settings) then - changed, index = imgui.combo(language.current_language.customization_menu.highlighted_bar, - table_helpers.find_index(customization_menu.highlighted_buildup_bar_types, - cached_config.ailment_buildups.settings.highlighted_bar), - customization_menu.displayed_highlighted_buildup_bar_types); - config_changed = config_changed or changed; - if changed then - cached_config.ailment_buildups.settings.highlighted_bar = customization_menu.highlighted_buildup_bar_types[index]; - end - changed, index = imgui.combo(language.current_language.customization_menu.buildup_bars_are_relative_to, - table_helpers.find_index(customization_menu.displayed_buildup_bar_relative_types, - cached_config.ailment_buildups.settings.buildup_bar_relative_to), - customization_menu.displayed_buildup_bar_relative_types); - config_changed = config_changed or changed; - if changed then - cached_config.ailment_buildups.settings.buildup_bar_relative_to = - customization_menu.displayed_buildup_bar_relative_types[index]; - end - changed, cached_config.ailment_buildups.settings.time_limit = - imgui.drag_float(language.current_language.customization_menu.time_limit, - cached_config.ailment_buildups.settings.time_limit, 0.1, 0, 99999, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.sorting) then - changed, index = imgui.combo(language.current_language.customization_menu.type, table_helpers.find_index( - customization_menu.ailment_buildups_sorting_types, cached_config.ailment_buildups.sorting.type), - customization_menu.displayed_ailment_buildups_sorting_types); - config_changed = config_changed or changed; - if changed then - cached_config.ailment_buildups.sorting.type = customization_menu.ailment_buildups_sorting_types[index]; - end - changed, cached_config.ailment_buildups.sorting.reversed_order = - imgui.checkbox(language.current_language.customization_menu.reversed_order, - cached_config.ailment_buildups.sorting.reversed_order); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.filter) then - changed, cached_config.ailment_buildups.filter.stun = imgui.checkbox(language.current_language.ailments.stun, - cached_config.ailment_buildups.filter.stun); - changed, cached_config.ailment_buildups.filter.poison = imgui.checkbox(language.current_language.ailments.poison, - cached_config.ailment_buildups.filter.poison); - changed, cached_config.ailment_buildups.filter.blast = imgui.checkbox(language.current_language.ailments.blast, - cached_config.ailment_buildups.filter.blast); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailment_name_label) then - changed, cached_config.ailment_buildups.ailment_name_label.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.ailment_buildups.ailment_name_label.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.include) then - changed, cached_config.ailment_buildups.ailment_name_label.include.ailment_name = imgui.checkbox( - language.current_language.customization_menu.ailment_name, - cached_config.ailment_buildups.ailment_name_label.include.ailment_name); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.ailment_name_label.include.activation_count = imgui.checkbox( - language.current_language.customization_menu.activation_count, - cached_config.ailment_buildups.ailment_name_label.include.activation_count); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailment_buildups.ailment_name_label.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailment_buildups.ailment_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.ailment_name_label.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailment_buildups.ailment_name_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.ailment_buildups.ailment_name_label.color = imgui.color_picker_argb("", - cached_config.ailment_buildups.ailment_name_label.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.shadow) then - changed, cached_config.ailment_buildups.ailment_name_label.shadow.visibility = imgui.checkbox( - language.current_language.customization_menu.visible, - cached_config.ailment_buildups.ailment_name_label.shadow.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailment_buildups.ailment_name_label.shadow.offset.x = imgui.drag_float( - language.current_language.customization_menu.x, - cached_config.ailment_buildups.ailment_name_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.ailment_name_label.shadow.offset.y = imgui.drag_float( - language.current_language.customization_menu.y, - cached_config.ailment_buildups.ailment_name_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.ailment_buildups.ailment_name_label.shadow.color = imgui.color_picker_argb("", - cached_config.ailment_buildups.ailment_name_label.shadow.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.player_name_label, - cached_config.ailment_buildups.player_name_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.buildup_value_label, - cached_config.ailment_buildups.buildup_value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.buildup_percentage_label, - cached_config.ailment_buildups.buildup_percentage_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.total_buildup_label, - cached_config.ailment_buildups.total_buildup_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.total_buildup_value_label, - cached_config.ailment_buildups.total_buildup_value_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.buildup_bar, - cached_config.ailment_buildups.buildup_bar); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.highlighted_buildup_bar, - cached_config.ailment_buildups.highlighted_buildup_bar); + + changed, cached_config.viewport_offset.y = imgui.drag_float( + language.current_language.customization_menu.y, cached_config.viewport_offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + imgui.tree_pop(); end + + changed = large_monster_UI_customization.draw(cached_config); + config_changed = config_changed or changed; + imgui.tree_pop(); end + return config_changed; end function customization_menu.draw_large_monster_static_UI() local changed = false; local config_changed = false; - local index = 1; if imgui.tree_node(language.current_language.customization_menu.statically_positioned) then local cached_config = config.current_config.large_monster_UI.static; - changed, cached_config.enabled = imgui.checkbox(language.current_language.customization_menu.enabled, - cached_config.enabled); + + changed, cached_config.enabled = imgui.checkbox( + language.current_language.customization_menu.enabled, cached_config.enabled); + config_changed = config_changed or changed; + if imgui.tree_node(language.current_language.customization_menu.settings) then changed, cached_config.settings.hide_dead_or_captured = imgui.checkbox( language.current_language.customization_menu.hide_dead_or_captured, cached_config.settings.hide_dead_or_captured); + config_changed = config_changed or changed; - changed, cached_config.settings.render_highlighted_monster = - imgui.checkbox(language.current_language.customization_menu.render_highlighted_monster, - cached_config.settings.render_highlighted_monster); + + changed, cached_config.settings.render_highlighted_monster = imgui.checkbox( + language.current_language.customization_menu.render_highlighted_monster, cached_config.settings.render_highlighted_monster); + config_changed = config_changed or changed; - changed, cached_config.settings.render_not_highlighted_monsters = - imgui.checkbox(language.current_language.customization_menu.render_not_highlighted_monsters, - cached_config.settings.render_not_highlighted_monsters); + + changed, cached_config.settings.render_not_highlighted_monsters = imgui.checkbox( + language.current_language.customization_menu.render_not_highlighted_monsters, cached_config.settings.render_not_highlighted_monsters); + config_changed = config_changed or changed; - changed, index = imgui.combo(language.current_language.customization_menu.highlighted_monster_location, - table_helpers.find_index(customization_menu.damage_meter_UI_my_damage_bar_location_types, - cached_config.settings.highlighted_monster_location), + + changed, index = imgui.combo( + language.current_language.customization_menu.highlighted_monster_location, + table_helpers.find_index(customization_menu.damage_meter_UI_my_damage_bar_location_types, cached_config.settings.highlighted_monster_location), customization_menu.displayed_damage_meter_UI_my_damage_bar_location_types); + config_changed = config_changed or changed; + if changed then - cached_config.settings.highlighted_monster_location = - customization_menu.damage_meter_UI_my_damage_bar_location_types[index]; + cached_config.settings.highlighted_monster_location = customization_menu.damage_meter_UI_my_damage_bar_location_types[index]; end - changed, index = imgui.combo(language.current_language.customization_menu.orientation, table_helpers.find_index( - customization_menu.orientation_types, cached_config.settings.orientation), + + changed, index = imgui.combo( + language.current_language.customization_menu.orientation, + table_helpers.find_index( customization_menu.orientation_types, cached_config.settings.orientation), customization_menu.displayed_orientation_types); + config_changed = config_changed or changed; + if changed then cached_config.settings.orientation = customization_menu.orientation_types[index]; end + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.position) then - changed, cached_config.position.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.position.x, 0.1, 0, screen.width, "%.1f"); + changed, cached_config.position.x = imgui.drag_float( + language.current_language.customization_menu.x, cached_config.position.x, 0.1, 0, screen.width, "%.1f"); + config_changed = config_changed or changed; - changed, cached_config.position.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.position.y, 0.1, 0, screen.height, "%.1f"); + + changed, cached_config.position.y = imgui.drag_float( + language.current_language.customization_menu.y, cached_config.position.y, 0.1, 0, screen.height, "%.1f"); + config_changed = config_changed or changed; - changed, index = imgui.combo(language.current_language.customization_menu.anchor, table_helpers.find_index( - customization_menu.anchor_types, cached_config.position.anchor), customization_menu.displayed_anchor_types); + + changed, index = imgui.combo( + language.current_language.customization_menu.anchor, + table_helpers.find_index(customization_menu.anchor_types, cached_config.position.anchor), + customization_menu.displayed_anchor_types); + config_changed = config_changed or changed; + if changed then cached_config.position.anchor = customization_menu.anchor_types[index]; end + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.spacing) then - changed, cached_config.spacing.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.spacing.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.spacing.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.spacing.y, 0.1, -screen.height, screen.height, "%.1f"); + changed, cached_config.spacing.x = imgui.drag_float( + language.current_language.customization_menu.x, cached_config.spacing.x, 0.1, -screen.width, screen.width, "%.1f"); + + config_changed = config_changed or changed; + + changed, cached_config.spacing.y = imgui.drag_float( + language.current_language.customization_menu.y, cached_config.spacing.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.sorting) then - changed, index = imgui.combo(language.current_language.customization_menu.type, table_helpers.find_index( - customization_menu.monster_UI_sorting_types, cached_config.sorting.type), + changed, index = imgui.combo( + language.current_language.customization_menu.type, + table_helpers.find_index(customization_menu.monster_UI_sorting_types, cached_config.sorting.type), customization_menu.displayed_monster_UI_sorting_types); + config_changed = config_changed or changed; + if changed then cached_config.sorting.type = customization_menu.monster_UI_sorting_types[index]; end + changed, cached_config.sorting.reversed_order = imgui.checkbox( language.current_language.customization_menu.reversed_order, cached_config.sorting.reversed_order); + config_changed = config_changed or changed; + imgui.tree_pop(); end - if imgui.tree_node(language.current_language.customization_menu.monster_name_label) then - changed, cached_config.monster_name_label.visibility = imgui.checkbox( - language.current_language.customization_menu.visible, cached_config.monster_name_label.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.include) then - changed, cached_config.monster_name_label.include.monster_name = - imgui.checkbox(language.current_language.customization_menu.monster_name, - cached_config.monster_name_label.include.monster_name); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.include.monster_id = - imgui.checkbox(language.current_language.customization_menu.monster_id, - cached_config.monster_name_label.include.monster_id); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.include.crown = - imgui.checkbox(language.current_language.customization_menu.crown, cached_config.monster_name_label.include.crown); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.include.size = imgui.checkbox( - language.current_language.customization_menu.size, cached_config.monster_name_label.include.size); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.include.scrown_thresholds = - imgui.checkbox(language.current_language.customization_menu.crown_thresholds, - cached_config.monster_name_label.include.scrown_thresholds); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.monster_name_label.offset.x = imgui.drag_float( - language.current_language.customization_menu.x, cached_config.monster_name_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.offset.y = imgui.drag_float( - language.current_language.customization_menu.y, cached_config.monster_name_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.monster_name_label.color = imgui.color_picker_argb("", - cached_config.monster_name_label.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.shadow) then - changed, cached_config.monster_name_label.shadow.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.monster_name_label.shadow.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.monster_name_label.shadow.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.monster_name_label.shadow.offset.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.shadow.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.monster_name_label.shadow.offset.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.monster_name_label.shadow.color = imgui.color_picker_argb("", - cached_config.monster_name_label.shadow.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.health) then - changed, cached_config.health.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.health.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.health.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.health.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.health.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.health.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.health.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.health.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.health.percentage_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.health.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.stamina) then - changed, cached_config.stamina.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.stamina.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.stamina.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.stamina.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.stamina.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.stamina.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.stamina.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.stamina.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.stamina.percentage_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.timer_label, - cached_config.stamina.timer_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.stamina.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.rage) then - changed, cached_config.rage.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.rage.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.rage.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.rage.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.rage.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.rage.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.rage.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.rage.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.rage.percentage_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.timer_label, - cached_config.rage.timer_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.rage.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.body_parts) then - changed, cached_config.body_parts.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.body_parts.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.body_parts.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.body_parts.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.spacing) then - changed, cached_config.body_parts.spacing.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.body_parts.spacing.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.spacing.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.body_parts.spacing.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.settings) then - changed, cached_config.body_parts.settings.hide_undamaged_parts = - imgui.checkbox(language.current_language.customization_menu.hide_undamaged_parts, - cached_config.body_parts.settings.hide_undamaged_parts); - config_changed = config_changed or changed; - changed, cached_config.body_parts.settings.time_limit = imgui.drag_float(language.current_language - .customization_menu.time_limit, - cached_config.body_parts.settings.time_limit, 0.1, 0, 99999, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.sorting) then - changed, index = imgui.combo(language.current_language.customization_menu.type, table_helpers.find_index( - customization_menu.large_monster_UI_parts_sorting_types, cached_config.body_parts.sorting.type), - customization_menu.displayed_monster_UI_parts_sorting_types); - config_changed = config_changed or changed; - if changed then - cached_config.body_parts.sorting.type = customization_menu.large_monster_UI_parts_sorting_types[index]; - end - changed, cached_config.body_parts.sorting.reversed_order = - imgui.checkbox(language.current_language.customization_menu.reversed_order, - cached_config.body_parts.sorting.reversed_order); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.filter) then - changed, cached_config.body_parts.filter.health_break_severe = - imgui.checkbox(language.current_language.customization_menu.health_break_severe_filter, - cached_config.body_parts.filter.health_break_severe); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.health_break = imgui.checkbox( - language.current_language.customization_menu.health_break_filter, cached_config.body_parts.filter.health_break); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.health_severe = imgui.checkbox( - language.current_language.customization_menu.health_severe_filter, cached_config.body_parts.filter.health_severe); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.health = imgui.checkbox( - language.current_language.customization_menu.health_filter, cached_config.body_parts.filter.health); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.break_severe = imgui.checkbox( - language.current_language.customization_menu.break_severe_filter, cached_config.body_parts.filter.break_severe); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.break_ = imgui.checkbox( - language.current_language.customization_menu.break_filter, cached_config.body_parts.filter.break_); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.severe = imgui.checkbox( - language.current_language.customization_menu.severe_filter, cached_config.body_parts.filter.severe); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.part_name_label) then - changed, cached_config.body_parts.part_name_label.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.body_parts.part_name_label.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.include) then - changed, cached_config.body_parts.part_name_label.include.part_name = - imgui.checkbox(language.current_language.customization_menu.part_name, - cached_config.body_parts.part_name_label.include.part_name); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_name_label.include.flinch_count = - imgui.checkbox(language.current_language.customization_menu.flinch_count, - cached_config.body_parts.part_name_label.include.flinch_count); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_name_label.include.break_count = - imgui.checkbox(language.current_language.customization_menu.break_count, - cached_config.body_parts.part_name_label.include.break_count); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_name_label.include.break_max_count = imgui.checkbox( - language.current_language.customization_menu.break_max_count, - cached_config.body_parts.part_name_label.include.break_max_count); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.part_name_label.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.body_parts.part_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_name_label.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.body_parts.part_name_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.body_parts.part_name_label.color = - imgui.color_picker_argb("", cached_config.body_parts.part_name_label.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.shadow) then - changed, cached_config.body_parts.part_name_label.shadow.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.body_parts.part_name_label.shadow.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.part_name_label.shadow.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.body_parts.part_name_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_name_label.shadow.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.body_parts.part_name_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.body_parts.part_name_label.shadow.color = imgui.color_picker_argb("", - cached_config.body_parts.part_name_label.shadow.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.part_health) then - changed, cached_config.body_parts.part_health.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.body_parts.part_health.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.part_health.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.body_parts.part_health.offset.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_health.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.body_parts.part_health.offset.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.body_parts.part_health.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.body_parts.part_health.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.body_parts.part_health.percentage_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, - cached_config.body_parts.part_health.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.break_health) then - changed, cached_config.body_parts.part_break.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, cached_config.body_parts.part_break.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.part_break.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.body_parts.part_break.offset.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_break.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.body_parts.part_break.offset.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.body_parts.part_break.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.body_parts.part_break.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.body_parts.part_break.percentage_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, - cached_config.body_parts.part_break.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.loss_health) then - changed, cached_config.body_parts.part_loss.visibility = imgui.checkbox( - language.current_language.customization_menu.visible, cached_config.body_parts.part_loss.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.part_loss.offset.x = imgui.drag_float(language.current_language - .customization_menu.x, - cached_config.body_parts.part_loss.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_loss.offset.y = imgui.drag_float(language.current_language - .customization_menu.y, - cached_config.body_parts.part_loss.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.body_parts.part_loss.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.body_parts.part_loss.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.body_parts.part_loss.percentage_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, - cached_config.body_parts.part_loss.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailments) then - changed, cached_config.ailments.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.ailments.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailments.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.relative_offset) then - changed, cached_config.ailments.relative_offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.relative_offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.relative_offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.relative_offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.spacing) then - changed, cached_config.ailments.spacing.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.spacing.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.spacing.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.spacing.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.settings) then - changed, cached_config.ailments.settings.hide_ailments_with_zero_buildup = - imgui.checkbox(language.current_language.customization_menu.hide_ailments_with_zero_buildup, - cached_config.ailments.settings.hide_ailments_with_zero_buildup); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.hide_inactive_ailments_with_no_buildup_support = imgui.checkbox( - language.current_language.customization_menu.hide_inactive_ailments_with_no_buildup_support, - cached_config.ailments.settings.hide_inactive_ailments_with_no_buildup_support); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.hide_all_inactive_ailments = - imgui.checkbox(language.current_language.customization_menu.hide_all_inactive_ailments, - cached_config.ailments.settings.hide_all_inactive_ailments); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.hide_all_active_ailments = - imgui.checkbox(language.current_language.customization_menu.hide_all_active_ailments, - cached_config.ailments.settings.hide_all_active_ailments); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.hide_disabled_ailments = - imgui.checkbox(language.current_language.customization_menu.hide_disabled_ailments, - cached_config.ailments.settings.hide_disabled_ailments); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.offset_is_relative_to_parts = - imgui.checkbox(language.current_language.customization_menu.offset_is_relative_to_parts, - cached_config.ailments.settings.offset_is_relative_to_parts); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.time_limit = imgui.drag_float( - language.current_language.customization_menu.time_limit, cached_config.ailments.settings.time_limit, 0.1, 0, 99999, - "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.sorting) then - changed, index = imgui.combo(language.current_language.customization_menu.type, table_helpers.find_index( - customization_menu.ailments_sorting_types, cached_config.ailments.sorting.type), - customization_menu.displayed_ailments_sorting_types); - config_changed = config_changed or changed; - if changed then - cached_config.ailments.sorting.type = customization_menu.ailments_sorting_types[index]; - end - changed, cached_config.ailments.sorting.reversed_order = imgui.checkbox( - language.current_language.customization_menu.reversed_order, cached_config.ailments.sorting.reversed_order); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.filter) then - changed, cached_config.ailments.filter.paralysis = imgui.checkbox(language.current_language.ailments.paralysis, - cached_config.ailments.filter.paralysis); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.sleep = imgui.checkbox(language.current_language.ailments.sleep, - cached_config.ailments.filter.sleep); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.stun = imgui.checkbox(language.current_language.ailments.stun, - cached_config.ailments.filter.stun); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.flash = imgui.checkbox(language.current_language.ailments.flash, - cached_config.ailments.filter.flash); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.poison = imgui.checkbox(language.current_language.ailments.poison, - cached_config.ailments.filter.poison); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.blast = imgui.checkbox(language.current_language.ailments.blast, - cached_config.ailments.filter.blast); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.exhaust = imgui.checkbox(language.current_language.ailments.exhaust, - cached_config.ailments.filter.exhaust); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.ride = imgui.checkbox(language.current_language.ailments.ride, - cached_config.ailments.filter.ride); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.waterblight = imgui.checkbox(language.current_language.ailments.waterblight, - cached_config.ailments.filter.waterblight); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.fireblight = imgui.checkbox(language.current_language.ailments.fireblight, - cached_config.ailments.filter.fireblight); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.iceblight = imgui.checkbox(language.current_language.ailments.iceblight, - cached_config.ailments.filter.iceblight); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.thunderblight = imgui.checkbox( - language.current_language.ailments.thunderblight, cached_config.ailments.filter.thunderblight); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.fall_trap = imgui.checkbox(language.current_language.ailments.fall_trap, - cached_config.ailments.filter.fall_trap); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.shock_trap = imgui.checkbox(language.current_language.ailments.shock_trap, - cached_config.ailments.filter.shock_trap); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.tranq_bomb = imgui.checkbox(language.current_language.ailments.tranq_bomb, - cached_config.ailments.filter.tranq_bomb); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.dung_bomb = imgui.checkbox(language.current_language.ailments.dung_bomb, - cached_config.ailments.filter.dung_bomb); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.steel_fang = imgui.checkbox(language.current_language.ailments.steel_fang, - cached_config.ailments.filter.steel_fang); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.quick_sand = imgui.checkbox(language.current_language.ailments.quick_sand, - cached_config.ailments.filter.quick_sand); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.fall_otomo_trap = imgui.checkbox( - language.current_language.ailments.fall_otomo_trap, cached_config.ailments.filter.fall_otomo_trap); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.shock_otomo_trap = imgui.checkbox( - language.current_language.ailments.shock_otomo_trap, cached_config.ailments.filter.shock_otomo_trap); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailment_name_label) then - changed, cached_config.ailments.ailment_name_label.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.ailments.ailment_name_label.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.include) then - changed, cached_config.ailments.ailment_name_label.include.ailment_name = - imgui.checkbox(language.current_language.customization_menu.ailment_name, - cached_config.ailments.ailment_name_label.include.ailment_name); - config_changed = config_changed or changed; - changed, cached_config.ailments.ailment_name_label.include.activation_count = imgui.checkbox( - language.current_language.customization_menu.activation_count, - cached_config.ailments.ailment_name_label.include.activation_count); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailments.ailment_name_label.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.ailment_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.ailment_name_label.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.ailment_name_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.ailments.ailment_name_label.color = - imgui.color_picker_argb("", cached_config.ailments.ailment_name_label.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.shadow) then - changed, cached_config.ailments.ailment_name_label.shadow.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.ailments.ailment_name_label.shadow.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailments.ailment_name_label.shadow.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.ailment_name_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.ailment_name_label.shadow.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.ailment_name_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.ailments.ailment_name_label.shadow.color = imgui.color_picker_argb("", - cached_config.ailments.ailment_name_label.shadow.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.ailments.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.ailments.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.ailments.percentage_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.timer_label, - cached_config.ailments.timer_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.ailments.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailment_buildups) then - changed, cached_config.ailment_buildups.visibility = imgui.checkbox( - language.current_language.customization_menu.visible, cached_config.ailment_buildups.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailment_buildups.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailment_buildups.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailment_buildups.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.player_spacing) then - changed, cached_config.ailment_buildups.player_spacing.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.ailment_buildups.player_spacing.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.player_spacing.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.ailment_buildups.player_spacing.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailment_spacing) then - changed, cached_config.ailment_buildups.ailment_spacing.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.ailment_buildups.ailment_spacing.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.ailment_spacing.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.ailment_buildups.ailment_spacing.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.settings) then - changed, index = imgui.combo(language.current_language.customization_menu.highlighted_bar, - table_helpers.find_index(customization_menu.highlighted_buildup_bar_types, - cached_config.ailment_buildups.settings.highlighted_bar), - customization_menu.displayed_highlighted_buildup_bar_types); - config_changed = config_changed or changed; - if changed then - cached_config.ailment_buildups.settings.highlighted_bar = customization_menu.highlighted_buildup_bar_types[index]; - end - changed, index = imgui.combo(language.current_language.customization_menu.buildup_bars_are_relative_to, - table_helpers.find_index(customization_menu.displayed_buildup_bar_relative_types, - cached_config.ailment_buildups.settings.buildup_bar_relative_to), - customization_menu.displayed_buildup_bar_relative_types); - config_changed = config_changed or changed; - if changed then - cached_config.ailment_buildups.settings.buildup_bar_relative_to = - customization_menu.displayed_buildup_bar_relative_types[index]; - end - changed, cached_config.ailment_buildups.settings.time_limit = - imgui.drag_float(language.current_language.customization_menu.time_limit, - cached_config.ailment_buildups.settings.time_limit, 0.1, 0, 99999, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.sorting) then - changed, index = imgui.combo(language.current_language.customization_menu.type, table_helpers.find_index( - customization_menu.ailment_buildups_sorting_types, cached_config.ailment_buildups.sorting.type), - customization_menu.displayed_ailment_buildups_sorting_types); - config_changed = config_changed or changed; - if changed then - cached_config.ailment_buildups.sorting.type = customization_menu.ailment_buildups_sorting_types[index]; - end - changed, cached_config.ailment_buildups.sorting.reversed_order = - imgui.checkbox(language.current_language.customization_menu.reversed_order, - cached_config.ailment_buildups.sorting.reversed_order); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.filter) then - changed, cached_config.ailment_buildups.filter.stun = imgui.checkbox(language.current_language.ailments.stun, - cached_config.ailment_buildups.filter.stun); - changed, cached_config.ailment_buildups.filter.poison = imgui.checkbox(language.current_language.ailments.poison, - cached_config.ailment_buildups.filter.poison); - changed, cached_config.ailment_buildups.filter.blast = imgui.checkbox(language.current_language.ailments.blast, - cached_config.ailment_buildups.filter.blast); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailment_name_label) then - changed, cached_config.ailment_buildups.ailment_name_label.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.ailment_buildups.ailment_name_label.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.include) then - changed, cached_config.ailment_buildups.ailment_name_label.include.ailment_name = imgui.checkbox( - language.current_language.customization_menu.ailment_name, - cached_config.ailment_buildups.ailment_name_label.include.ailment_name); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.ailment_name_label.include.activation_count = imgui.checkbox( - language.current_language.customization_menu.activation_count, - cached_config.ailment_buildups.ailment_name_label.include.activation_count); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailment_buildups.ailment_name_label.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailment_buildups.ailment_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.ailment_name_label.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailment_buildups.ailment_name_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.ailment_buildups.ailment_name_label.color = imgui.color_picker_argb("", - cached_config.ailment_buildups.ailment_name_label.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.shadow) then - changed, cached_config.ailment_buildups.ailment_name_label.shadow.visibility = imgui.checkbox( - language.current_language.customization_menu.visible, - cached_config.ailment_buildups.ailment_name_label.shadow.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailment_buildups.ailment_name_label.shadow.offset.x = imgui.drag_float( - language.current_language.customization_menu.x, - cached_config.ailment_buildups.ailment_name_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.ailment_name_label.shadow.offset.y = imgui.drag_float( - language.current_language.customization_menu.y, - cached_config.ailment_buildups.ailment_name_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.ailment_buildups.ailment_name_label.shadow.color = imgui.color_picker_argb("", - cached_config.ailment_buildups.ailment_name_label.shadow.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.player_name_label, - cached_config.ailment_buildups.player_name_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.buildup_value_label, - cached_config.ailment_buildups.buildup_value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.buildup_percentage_label, - cached_config.ailment_buildups.buildup_percentage_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.total_buildup_label, - cached_config.ailment_buildups.total_buildup_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.total_buildup_value_label, - cached_config.ailment_buildups.total_buildup_value_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.buildup_bar, - cached_config.ailment_buildups.buildup_bar); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.highlighted_buildup_bar, - cached_config.ailment_buildups.highlighted_buildup_bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end + + changed = large_monster_UI_customization.draw(cached_config); + config_changed = config_changed or changed; + imgui.tree_pop(); end + return config_changed; end @@ -2904,787 +1251,46 @@ function customization_menu.draw_large_monster_highlighted_UI() local changed = false; local config_changed = false; local index = 1; + if imgui.tree_node(language.current_language.customization_menu.highlighted) then local cached_config = config.current_config.large_monster_UI.highlighted; - changed, cached_config.enabled = imgui.checkbox(language.current_language.customization_menu.enabled, - cached_config.enabled); + + changed, cached_config.enabled = imgui.checkbox( + language.current_language.customization_menu.enabled, cached_config.enabled); + config_changed = config_changed or changed; + if imgui.tree_node(language.current_language.customization_menu.position) then - changed, cached_config.position.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.position.x, 0.1, 0, screen.width, "%.1f"); + changed, cached_config.position.x = imgui.drag_float( + language.current_language.customization_menu.x, cached_config.position.x, 0.1, 0, screen.width, "%.1f"); + config_changed = config_changed or changed; - changed, cached_config.position.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.position.y, 0.1, 0, screen.height, "%.1f"); + + changed, cached_config.position.y = imgui.drag_float( + language.current_language.customization_menu.y, cached_config.position.y, 0.1, 0, screen.height, "%.1f"); + config_changed = config_changed or changed; - changed, index = imgui.combo(language.current_language.customization_menu.anchor, table_helpers.find_index( - customization_menu.anchor_types, cached_config.position.anchor), customization_menu.displayed_anchor_types); + + changed, index = imgui.combo( + language.current_language.customization_menu.anchor, + table_helpers.find_index(customization_menu.anchor_types, cached_config.position.anchor), + customization_menu.displayed_anchor_types); + config_changed = config_changed or changed; + if changed then cached_config.position.anchor = customization_menu.anchor_types[index]; end + imgui.tree_pop(); end - if imgui.tree_node(language.current_language.customization_menu.monster_name_label) then - changed, cached_config.monster_name_label.visibility = imgui.checkbox( - language.current_language.customization_menu.visible, cached_config.monster_name_label.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.include) then - changed, cached_config.monster_name_label.include.monster_name = - imgui.checkbox(language.current_language.customization_menu.monster_name, - cached_config.monster_name_label.include.monster_name); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.include.monster_id = - imgui.checkbox(language.current_language.customization_menu.monster_id, - cached_config.monster_name_label.include.monster_id); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.include.crown = - imgui.checkbox(language.current_language.customization_menu.crown, cached_config.monster_name_label.include.crown); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.include.size = imgui.checkbox( - language.current_language.customization_menu.size, cached_config.monster_name_label.include.size); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.include.scrown_thresholds = - imgui.checkbox(language.current_language.customization_menu.crown_thresholds, - cached_config.monster_name_label.include.scrown_thresholds); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.monster_name_label.offset.x = imgui.drag_float( - language.current_language.customization_menu.x, cached_config.monster_name_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.offset.y = imgui.drag_float( - language.current_language.customization_menu.y, cached_config.monster_name_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.monster_name_label.color = imgui.color_picker_argb("", - cached_config.monster_name_label.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.shadow) then - changed, cached_config.monster_name_label.shadow.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.monster_name_label.shadow.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.monster_name_label.shadow.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.monster_name_label.shadow.offset.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.monster_name_label.shadow.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.monster_name_label.shadow.offset.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.monster_name_label.shadow.color = imgui.color_picker_argb("", - cached_config.monster_name_label.shadow.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.health) then - changed, cached_config.health.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.health.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.health.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.health.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.health.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.health.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.health.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.health.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.health.percentage_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.health.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.stamina) then - changed, cached_config.stamina.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.stamina.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.stamina.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.stamina.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.stamina.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.stamina.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.stamina.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.stamina.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.stamina.percentage_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.timer_label, - cached_config.stamina.timer_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.stamina.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.rage) then - changed, cached_config.rage.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.rage.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.rage.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.rage.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.rage.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.rage.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.rage.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.rage.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.rage.percentage_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.timer_label, - cached_config.rage.timer_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.rage.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.body_parts) then - changed, cached_config.body_parts.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.body_parts.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.body_parts.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.body_parts.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.spacing) then - changed, cached_config.body_parts.spacing.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.body_parts.spacing.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.spacing.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.body_parts.spacing.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.settings) then - changed, cached_config.body_parts.settings.hide_undamaged_parts = - imgui.checkbox(language.current_language.customization_menu.hide_undamaged_parts, - cached_config.body_parts.settings.hide_undamaged_parts); - config_changed = config_changed or changed; - changed, cached_config.body_parts.settings.time_limit = imgui.drag_float(language.current_language - .customization_menu.time_limit, - cached_config.body_parts.settings.time_limit, 0.1, 0, 99999, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.sorting) then - changed, index = imgui.combo(language.current_language.customization_menu.type, table_helpers.find_index( - customization_menu.large_monster_UI_parts_sorting_types, cached_config.body_parts.sorting.type), - customization_menu.displayed_monster_UI_parts_sorting_types); - config_changed = config_changed or changed; - if changed then - cached_config.body_parts.sorting.type = customization_menu.large_monster_UI_parts_sorting_types[index]; - end - changed, cached_config.body_parts.sorting.reversed_order = - imgui.checkbox(language.current_language.customization_menu.reversed_order, - cached_config.body_parts.sorting.reversed_order); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.filter) then - changed, cached_config.body_parts.filter.health_break_severe = - imgui.checkbox(language.current_language.customization_menu.health_break_severe_filter, - cached_config.body_parts.filter.health_break_severe); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.health_break = imgui.checkbox( - language.current_language.customization_menu.health_break_filter, cached_config.body_parts.filter.health_break); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.health_severe = imgui.checkbox( - language.current_language.customization_menu.health_severe_filter, cached_config.body_parts.filter.health_severe); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.health = imgui.checkbox( - language.current_language.customization_menu.health_filter, cached_config.body_parts.filter.health); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.break_severe = imgui.checkbox( - language.current_language.customization_menu.break_severe_filter, cached_config.body_parts.filter.break_severe); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.break_ = imgui.checkbox( - language.current_language.customization_menu.break_filter, cached_config.body_parts.filter.break_); - config_changed = config_changed or changed; - changed, cached_config.body_parts.filter.severe = imgui.checkbox( - language.current_language.customization_menu.severe_filter, cached_config.body_parts.filter.severe); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.part_name_label) then - changed, cached_config.body_parts.part_name_label.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.body_parts.part_name_label.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.include) then - changed, cached_config.body_parts.part_name_label.include.part_name = - imgui.checkbox(language.current_language.customization_menu.part_name, - cached_config.body_parts.part_name_label.include.part_name); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_name_label.include.flinch_count = - imgui.checkbox(language.current_language.customization_menu.flinch_count, - cached_config.body_parts.part_name_label.include.flinch_count); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_name_label.include.break_count = - imgui.checkbox(language.current_language.customization_menu.break_count, - cached_config.body_parts.part_name_label.include.break_count); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_name_label.include.break_max_count = imgui.checkbox( - language.current_language.customization_menu.break_max_count, - cached_config.body_parts.part_name_label.include.break_max_count); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.part_name_label.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.body_parts.part_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_name_label.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.body_parts.part_name_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.body_parts.part_name_label.color = - imgui.color_picker_argb("", cached_config.body_parts.part_name_label.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.shadow) then - changed, cached_config.body_parts.part_name_label.shadow.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.body_parts.part_name_label.shadow.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.part_name_label.shadow.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.body_parts.part_name_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_name_label.shadow.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.body_parts.part_name_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.body_parts.part_name_label.shadow.color = imgui.color_picker_argb("", - cached_config.body_parts.part_name_label.shadow.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.part_health) then - changed, cached_config.body_parts.part_health.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.body_parts.part_health.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.part_health.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.body_parts.part_health.offset.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_health.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.body_parts.part_health.offset.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.body_parts.part_health.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.body_parts.part_health.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.body_parts.part_health.percentage_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, - cached_config.body_parts.part_health.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.break_health) then - changed, cached_config.body_parts.part_break.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, cached_config.body_parts.part_break.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.part_break.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.body_parts.part_break.offset.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_break.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.body_parts.part_break.offset.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.body_parts.part_break.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.body_parts.part_break.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.body_parts.part_break.percentage_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, - cached_config.body_parts.part_break.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.loss_health) then - changed, cached_config.body_parts.part_loss.visibility = imgui.checkbox( - language.current_language.customization_menu.visible, cached_config.body_parts.part_loss.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.body_parts.part_loss.offset.x = imgui.drag_float(language.current_language - .customization_menu.x, - cached_config.body_parts.part_loss.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.body_parts.part_loss.offset.y = imgui.drag_float(language.current_language - .customization_menu.y, - cached_config.body_parts.part_loss.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.body_parts.part_loss.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.body_parts.part_loss.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.body_parts.part_loss.percentage_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, - cached_config.body_parts.part_loss.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailments) then - changed, cached_config.ailments.visibility = imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.ailments.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailments.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.relative_offset) then - changed, cached_config.ailments.relative_offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.relative_offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.relative_offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.relative_offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.spacing) then - changed, cached_config.ailments.spacing.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.spacing.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.spacing.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.spacing.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.settings) then - changed, cached_config.ailments.settings.hide_ailments_with_zero_buildup = - imgui.checkbox(language.current_language.customization_menu.hide_ailments_with_zero_buildup, - cached_config.ailments.settings.hide_ailments_with_zero_buildup); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.hide_inactive_ailments_with_no_buildup_support = imgui.checkbox( - language.current_language.customization_menu.hide_inactive_ailments_with_no_buildup_support, - cached_config.ailments.settings.hide_inactive_ailments_with_no_buildup_support); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.hide_all_inactive_ailments = - imgui.checkbox(language.current_language.customization_menu.hide_all_inactive_ailments, - cached_config.ailments.settings.hide_all_inactive_ailments); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.hide_all_active_ailments = - imgui.checkbox(language.current_language.customization_menu.hide_all_active_ailments, - cached_config.ailments.settings.hide_all_active_ailments); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.hide_disabled_ailments = - imgui.checkbox(language.current_language.customization_menu.hide_disabled_ailments, - cached_config.ailments.settings.hide_disabled_ailments); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.offset_is_relative_to_parts = - imgui.checkbox(language.current_language.customization_menu.offset_is_relative_to_parts, - cached_config.ailments.settings.offset_is_relative_to_parts); - config_changed = config_changed or changed; - changed, cached_config.ailments.settings.time_limit = imgui.drag_float( - language.current_language.customization_menu.time_limit, cached_config.ailments.settings.time_limit, 0.1, 0, 99999, - "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.sorting) then - changed, index = imgui.combo(language.current_language.customization_menu.type, table_helpers.find_index( - customization_menu.ailments_sorting_types, cached_config.ailments.sorting.type), - customization_menu.displayed_ailments_sorting_types); - config_changed = config_changed or changed; - if changed then - cached_config.ailments.sorting.type = customization_menu.ailments_sorting_types[index]; - end - changed, cached_config.ailments.sorting.reversed_order = imgui.checkbox( - language.current_language.customization_menu.reversed_order, cached_config.ailments.sorting.reversed_order); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.filter) then - changed, cached_config.ailments.filter.paralysis = imgui.checkbox(language.current_language.ailments.paralysis, - cached_config.ailments.filter.paralysis); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.sleep = imgui.checkbox(language.current_language.ailments.sleep, - cached_config.ailments.filter.sleep); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.stun = imgui.checkbox(language.current_language.ailments.stun, - cached_config.ailments.filter.stun); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.flash = imgui.checkbox(language.current_language.ailments.flash, - cached_config.ailments.filter.flash); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.poison = imgui.checkbox(language.current_language.ailments.poison, - cached_config.ailments.filter.poison); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.blast = imgui.checkbox(language.current_language.ailments.blast, - cached_config.ailments.filter.blast); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.exhaust = imgui.checkbox(language.current_language.ailments.exhaust, - cached_config.ailments.filter.exhaust); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.ride = imgui.checkbox(language.current_language.ailments.ride, - cached_config.ailments.filter.ride); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.waterblight = imgui.checkbox(language.current_language.ailments.waterblight, - cached_config.ailments.filter.waterblight); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.fireblight = imgui.checkbox(language.current_language.ailments.fireblight, - cached_config.ailments.filter.fireblight); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.iceblight = imgui.checkbox(language.current_language.ailments.iceblight, - cached_config.ailments.filter.iceblight); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.thunderblight = imgui.checkbox( - language.current_language.ailments.thunderblight, cached_config.ailments.filter.thunderblight); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.fall_trap = imgui.checkbox(language.current_language.ailments.fall_trap, - cached_config.ailments.filter.fall_trap); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.shock_trap = imgui.checkbox(language.current_language.ailments.shock_trap, - cached_config.ailments.filter.shock_trap); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.tranq_bomb = imgui.checkbox(language.current_language.ailments.tranq_bomb, - cached_config.ailments.filter.tranq_bomb); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.dung_bomb = imgui.checkbox(language.current_language.ailments.dung_bomb, - cached_config.ailments.filter.dung_bomb); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.steel_fang = imgui.checkbox(language.current_language.ailments.steel_fang, - cached_config.ailments.filter.steel_fang); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.quick_sand = imgui.checkbox(language.current_language.ailments.quick_sand, - cached_config.ailments.filter.quick_sand); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.fall_otomo_trap = imgui.checkbox( - language.current_language.ailments.fall_otomo_trap, cached_config.ailments.filter.fall_otomo_trap); - config_changed = config_changed or changed; - changed, cached_config.ailments.filter.shock_otomo_trap = imgui.checkbox( - language.current_language.ailments.shock_otomo_trap, cached_config.ailments.filter.shock_otomo_trap); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailment_name_label) then - changed, cached_config.ailments.ailment_name_label.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.ailments.ailment_name_label.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.include) then - changed, cached_config.ailments.ailment_name_label.include.ailment_name = - imgui.checkbox(language.current_language.customization_menu.ailment_name, - cached_config.ailments.ailment_name_label.include.ailment_name); - config_changed = config_changed or changed; - changed, cached_config.ailments.ailment_name_label.include.activation_count = imgui.checkbox( - language.current_language.customization_menu.activation_count, - cached_config.ailments.ailment_name_label.include.activation_count); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailments.ailment_name_label.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.ailment_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.ailment_name_label.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.ailment_name_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.ailments.ailment_name_label.color = - imgui.color_picker_argb("", cached_config.ailments.ailment_name_label.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.shadow) then - changed, cached_config.ailments.ailment_name_label.shadow.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.ailments.ailment_name_label.shadow.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailments.ailment_name_label.shadow.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailments.ailment_name_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailments.ailment_name_label.shadow.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailments.ailment_name_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.ailments.ailment_name_label.shadow.color = imgui.color_picker_argb("", - cached_config.ailments.ailment_name_label.shadow.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.text_label, - cached_config.ailments.text_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.value_label, - cached_config.ailments.value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.percentage_label, - cached_config.ailments.percentage_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.timer_label, - cached_config.ailments.timer_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.ailments.bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailment_buildups) then - changed, cached_config.ailment_buildups.visibility = imgui.checkbox( - language.current_language.customization_menu.visible, cached_config.ailment_buildups.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailment_buildups.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailment_buildups.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailment_buildups.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.player_spacing) then - changed, cached_config.ailment_buildups.player_spacing.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.ailment_buildups.player_spacing.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.player_spacing.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.ailment_buildups.player_spacing.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailment_spacing) then - changed, cached_config.ailment_buildups.ailment_spacing.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.ailment_buildups.ailment_spacing.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.ailment_spacing.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.ailment_buildups.ailment_spacing.y, - 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.settings) then - changed, index = imgui.combo(language.current_language.customization_menu.highlighted_bar, - table_helpers.find_index(customization_menu.highlighted_buildup_bar_types, - cached_config.ailment_buildups.settings.highlighted_bar), - customization_menu.displayed_highlighted_buildup_bar_types); - config_changed = config_changed or changed; - if changed then - cached_config.ailment_buildups.settings.highlighted_bar = customization_menu.highlighted_buildup_bar_types[index]; - end - changed, index = imgui.combo(language.current_language.customization_menu.buildup_bars_are_relative_to, - table_helpers.find_index(customization_menu.displayed_buildup_bar_relative_types, - cached_config.ailment_buildups.settings.buildup_bar_relative_to), - customization_menu.displayed_buildup_bar_relative_types); - config_changed = config_changed or changed; - if changed then - cached_config.ailment_buildups.settings.buildup_bar_relative_to = - customization_menu.displayed_buildup_bar_relative_types[index]; - end - changed, cached_config.ailment_buildups.settings.time_limit = - imgui.drag_float(language.current_language.customization_menu.time_limit, - cached_config.ailment_buildups.settings.time_limit, 0.1, 0, 99999, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.sorting) then - changed, customization_menu.index = imgui.combo(language.current_language.customization_menu.type, - table_helpers.find_index(customization_menu.ailment_buildups_sorting_types, - cached_config.ailment_buildups.sorting.type), customization_menu.displayed_ailment_buildups_sorting_types); - config_changed = config_changed or changed; - if changed then - cached_config.ailment_buildups.sorting.type = customization_menu.ailment_buildups_sorting_types[index]; - end - changed, cached_config.ailment_buildups.sorting.reversed_order = - imgui.checkbox(language.current_language.customization_menu.reversed_order, - cached_config.ailment_buildups.sorting.reversed_order); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.filter) then - changed, cached_config.ailment_buildups.filter.stun = imgui.checkbox(language.current_language.ailments.stun, - cached_config.ailment_buildups.filter.stun); - changed, cached_config.ailment_buildups.filter.poison = imgui.checkbox(language.current_language.ailments.poison, - cached_config.ailment_buildups.filter.poison); - changed, cached_config.ailment_buildups.filter.blast = imgui.checkbox(language.current_language.ailments.blast, - cached_config.ailment_buildups.filter.blast); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.ailment_name_label) then - changed, cached_config.ailment_buildups.ailment_name_label.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.ailment_buildups.ailment_name_label.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.include) then - changed, cached_config.ailment_buildups.ailment_name_label.include.ailment_name = imgui.checkbox( - language.current_language.customization_menu.ailment_name, - cached_config.ailment_buildups.ailment_name_label.include.ailment_name); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.ailment_name_label.include.activation_count = imgui.checkbox( - language.current_language.customization_menu.activation_count, - cached_config.ailment_buildups.ailment_name_label.include.activation_count); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailment_buildups.ailment_name_label.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.ailment_buildups.ailment_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.ailment_name_label.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.ailment_buildups.ailment_name_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.ailment_buildups.ailment_name_label.color = imgui.color_picker_argb("", - cached_config.ailment_buildups.ailment_name_label.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.shadow) then - changed, cached_config.ailment_buildups.ailment_name_label.shadow.visibility = imgui.checkbox( - language.current_language.customization_menu.visible, - cached_config.ailment_buildups.ailment_name_label.shadow.visibility); - config_changed = config_changed or changed; - if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.ailment_buildups.ailment_name_label.shadow.offset.x = imgui.drag_float( - language.current_language.customization_menu.x, - cached_config.ailment_buildups.ailment_name_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.ailment_buildups.ailment_name_label.shadow.offset.y = imgui.drag_float( - language.current_language.customization_menu.y, - cached_config.ailment_buildups.ailment_name_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.ailment_buildups.ailment_name_label.shadow.color = imgui.color_picker_argb("", - cached_config.ailment_buildups.ailment_name_label.shadow.color, customization_menu.color_picker_flags); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - imgui.tree_pop(); - end - imgui.tree_pop(); - end - changed = label_customization.draw(language.current_language.customization_menu.player_name_label, - cached_config.ailment_buildups.player_name_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.buildup_value_label, - cached_config.ailment_buildups.buildup_value_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.buildup_percentage_label, - cached_config.ailment_buildups.buildup_percentage_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.total_buildup_label, - cached_config.ailment_buildups.total_buildup_label); - config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.total_buildup_value_label, - cached_config.ailment_buildups.total_buildup_value_label); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.buildup_bar, - cached_config.ailment_buildups.buildup_bar); - config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.highlighted_buildup_bar, - cached_config.ailment_buildups.highlighted_buildup_bar); - config_changed = config_changed or changed; - imgui.tree_pop(); - end + + changed = large_monster_UI_customization.draw(cached_config); + config_changed = config_changed or changed; + imgui.tree_pop(); end + return config_changed; end @@ -3692,31 +1298,46 @@ function customization_menu.draw_time_UI() local changed = false; local config_changed = false; local index = 1; + if imgui.tree_node(language.current_language.customization_menu.time_UI) then local cached_config = config.current_config.time_UI; - changed, cached_config.enabled = imgui.checkbox(language.current_language.customization_menu.enabled, - cached_config.enabled); + + changed, cached_config.enabled = imgui.checkbox( + language.current_language.customization_menu.enabled, cached_config.enabled); + config_changed = config_changed or changed; + if imgui.tree_node(language.current_language.customization_menu.position) then - changed, cached_config.position.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.position.x, 0.1, 0, screen.width, "%.1f"); + changed, cached_config.position.x = imgui.drag_float( + language.current_language.customization_menu.x, cached_config.position.x, 0.1, 0, screen.width, "%.1f"); + config_changed = config_changed or changed; - changed, cached_config.position.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.position.y, 0.1, 0, screen.height, "%.1f"); + + changed, cached_config.position.y = imgui.drag_float( + language.current_language.customization_menu.y, cached_config.position.y, 0.1, 0, screen.height, "%.1f"); + config_changed = config_changed or changed; - changed, index = imgui.combo(language.current_language.customization_menu.anchor, table_helpers.find_index( - customization_menu.anchor_types, cached_config.position.anchor), + + changed, index = imgui.combo( + language.current_language.customization_menu.anchor, + table_helpers.find_index(customization_menu.anchor_types, cached_config.position.anchor), customization_menu.stomization_menu.displayed_anchor_types); + config_changed = config_changed or changed; + if changed then cached_config.position.anchor = customization_menu.anchor_types[index]; end + imgui.tree_pop(); end + changed = label_customization.draw(language.current_language.customization_menu.time_label, cached_config.time_label); config_changed = config_changed or changed; + imgui.tree_pop(); end + return config_changed; end @@ -3724,452 +1345,615 @@ function customization_menu.draw_damage_meter_UI() local changed = false; local config_changed = false; local index = 1; + if imgui.tree_node(language.current_language.customization_menu.damage_meter_UI) then local cached_config = config.current_config.damage_meter_UI; - changed, cached_config.enabled = imgui.checkbox(language.current_language.customization_menu.enabled, - cached_config.enabled); + + changed, cached_config.enabled = imgui.checkbox( + language.current_language.customization_menu.enabled, cached_config.enabled); + config_changed = config_changed or changed; + if imgui.tree_node(language.current_language.customization_menu.settings) then changed, cached_config.settings.hide_myself = imgui.checkbox( language.current_language.customization_menu.hide_myself, cached_config.settings.hide_myself); + config_changed = config_changed or changed; + changed, cached_config.settings.hide_other_players = imgui.checkbox( language.current_language.customization_menu.hide_other_players, cached_config.settings.hide_other_players); + config_changed = config_changed or changed; + changed, cached_config.settings.hide_total_damage = imgui.checkbox( language.current_language.customization_menu.hide_total_damage, cached_config.settings.hide_total_damage); + config_changed = config_changed or changed; - changed, cached_config.settings.hide_module_if_total_damage_is_zero = - imgui.checkbox(language.current_language.customization_menu.hide_module_if_total_damage_is_zero, - cached_config.settings.hide_module_if_total_damage_is_zero); + + changed, cached_config.settings.hide_module_if_total_damage_is_zero = imgui.checkbox( + language.current_language.customization_menu.hide_module_if_total_damage_is_zero, cached_config.settings.hide_module_if_total_damage_is_zero); + config_changed = config_changed or changed; - changed, cached_config.settings.hide_player_if_player_damage_is_zero = - imgui.checkbox(language.current_language.customization_menu.hide_player_if_player_damage_is_zero, - cached_config.settings.hide_player_if_player_damage_is_zero); + + changed, cached_config.settings.hide_player_if_player_damage_is_zero = imgui.checkbox( + language.current_language.customization_menu.hide_player_if_player_damage_is_zero, cached_config.settings.hide_player_if_player_damage_is_zero); + config_changed = config_changed or changed; - changed, cached_config.settings.hide_total_if_total_damage_is_zero = - imgui.checkbox(language.current_language.customization_menu.hide_total_if_total_damage_is_zero, - cached_config.settings.hide_total_if_total_damage_is_zero); + + changed, cached_config.settings.hide_total_if_total_damage_is_zero = imgui.checkbox( + language.current_language.customization_menu.hide_total_if_total_damage_is_zero, cached_config.settings.hide_total_if_total_damage_is_zero); + config_changed = config_changed or changed; - changed, cached_config.settings.total_damage_offset_is_relative = - imgui.checkbox(language.current_language.customization_menu.total_damage_offset_is_relative, - cached_config.settings.total_damage_offset_is_relative); + + changed, cached_config.settings.total_damage_offset_is_relative = imgui.checkbox( + language.current_language.customization_menu.total_damage_offset_is_relative, cached_config.settings.total_damage_offset_is_relative); + config_changed = config_changed or changed; - changed, cached_config.settings.freeze_dps_on_quest_clear = - imgui.checkbox(language.current_language.customization_menu.freeze_dps_on_quest_clear, - cached_config.settings.freeze_dps_on_quest_clear); + + changed, cached_config.settings.freeze_dps_on_quest_clear = imgui.checkbox( + language.current_language.customization_menu.freeze_dps_on_quest_clear, cached_config.settings.freeze_dps_on_quest_clear); + config_changed = config_changed or changed; - changed, index = imgui.combo(language.current_language.customization_menu.orientation, table_helpers.find_index( - customization_menu.orientation_types, cached_config.settings.orientation), + + changed, index = imgui.combo( + language.current_language.customization_menu.orientation, + table_helpers.find_index(customization_menu.orientation_types, cached_config.settings.orientation), customization_menu.displayed_orientation_types); + config_changed = config_changed or changed; + if changed then cached_config.settings.orientation = customization_menu.orientation_types[index]; end - changed, index = imgui.combo(language.current_language.customization_menu.highlighted_bar, - table_helpers.find_index(customization_menu.damage_meter_UI_highlighted_bar_types, - cached_config.settings.highlighted_bar), customization_menu.displayed_damage_meter_UI_highlighted_bar_types); + + changed, index = imgui.combo( + language.current_language.customization_menu.highlighted_bar, + table_helpers.find_index(customization_menu.damage_meter_UI_highlighted_bar_types, cached_config.settings.highlighted_bar), + customization_menu.displayed_damage_meter_UI_highlighted_bar_types); + config_changed = config_changed or changed; + if changed then cached_config.settings.highlighted_bar = customization_menu.damage_meter_UI_highlighted_bar_types[index]; end - changed, index = imgui.combo(language.current_language.customization_menu.damage_bars_are_relative_to, - table_helpers.find_index(customization_menu.damage_meter_UI_damage_bar_relative_types, - cached_config.settings.damage_bar_relative_to), + + changed, index = imgui.combo( + language.current_language.customization_menu.damage_bars_are_relative_to, + table_helpers.find_index(customization_menu.damage_meter_UI_damage_bar_relative_types, cached_config.settings.damage_bar_relative_to), customization_menu.displayed_damage_meter_UI_damage_bar_relative_types); + config_changed = config_changed or changed; + if changed then cached_config.settings.damage_bar_relative_to = customization_menu.damage_meter_UI_damage_bar_relative_types[index]; end - changed, index = imgui.combo(language.current_language.customization_menu.my_damage_bar_location, - table_helpers.find_index(customization_menu.damage_meter_UI_my_damage_bar_location_types, - cached_config.settings.my_damage_bar_location), + + changed, index = imgui.combo( + language.current_language.customization_menu.my_damage_bar_location, + table_helpers.find_index(customization_menu.damage_meter_UI_my_damage_bar_location_types, cached_config.settings.my_damage_bar_location), customization_menu.displayed_damage_meter_UI_my_damage_bar_location_types); + config_changed = config_changed or changed; + if changed then - cached_config.settings.my_damage_bar_location = - customization_menu.damage_meter_UI_my_damage_bar_location_types[index]; + cached_config.settings.my_damage_bar_location = customization_menu.damage_meter_UI_my_damage_bar_location_types[index]; end - changed, index = imgui.combo(language.current_language.customization_menu.dps_mode, table_helpers.find_index( - customization_menu.damage_meter_UI_dps_modes, cached_config.settings.dps_mode), + + changed, index = imgui.combo(language.current_language.customization_menu.dps_mode, + table_helpers.find_index(customization_menu.damage_meter_UI_dps_modes, cached_config.settings.dps_mode), customization_menu.displayed_damage_meter_UI_dps_modes); + config_changed = config_changed or changed; + if changed then cached_config.settings.dps_mode = customization_menu.damage_meter_UI_dps_modes[index]; end - changed, cached_config.settings.player_name_size_limit = imgui.drag_float(language.current_language - .customization_menu.player_name_size_limit, - cached_config.settings.player_name_size_limit, 0.1, 0, screen.width, "%.1f"); + + changed, cached_config.settings.player_name_size_limit = imgui.drag_float( + language.current_language.customization_menu.player_name_size_limit, cached_config.settings.player_name_size_limit, 0.1, 0, screen.width, "%.1f"); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.tracked_monster_types) then local tracked_monster_types_changed = false; - changed, cached_config.tracked_monster_types.small_monsters = - imgui.checkbox(language.current_language.customization_menu.small_monsters, - cached_config.tracked_monster_types.small_monsters); - config_changed = config_changed or changed; - tracked_monster_types_changed = tracked_monster_types_changed or changed; - changed, cached_config.tracked_monster_types.large_monsters = - imgui.checkbox(language.current_language.customization_menu.large_monsters, - cached_config.tracked_monster_types.large_monsters); + + changed, cached_config.tracked_monster_types.small_monsters = imgui.checkbox( + language.current_language.customization_menu.small_monsters, cached_config.tracked_monster_types.small_monsters); + + config_changed = config_changed or changed; + + tracked_monster_types_changed = tracked_monster_types_changed or changed; + changed, cached_config.tracked_monster_types.large_monsters = imgui.checkbox( + language.current_language.customization_menu.large_monsters, cached_config.tracked_monster_types.large_monsters); + config_changed = config_changed or changed; tracked_monster_types_changed = tracked_monster_types_changed or changed; + if tracked_monster_types_changed then for player_id, _player in pairs(player.list) do _player.update_display(player); end + player.update_display(player.total); end + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.tracked_damage_types) then local tracked_damage_types_changed = false; - changed, cached_config.tracked_damage_types.player_damage = - imgui.checkbox(language.current_language.customization_menu.player_damage, - cached_config.tracked_damage_types.player_damage); + + changed, cached_config.tracked_damage_types.player_damage = imgui.checkbox( + language.current_language.customization_menu.player_damage, cached_config.tracked_damage_types.player_damage); + config_changed = config_changed or changed; tracked_damage_types_changed = tracked_damage_types_changed or changed; + changed, cached_config.tracked_damage_types.bomb_damage = imgui.checkbox( language.current_language.customization_menu.bomb_damage, cached_config.tracked_damage_types.bomb_damage); + config_changed = config_changed or changed; tracked_damage_types_changed = tracked_damage_types_changed or changed; - changed, cached_config.tracked_damage_types.kunai_damage = - imgui.checkbox(language.current_language.customization_menu.kunai_damage, - cached_config.tracked_damage_types.kunai_damage); + + changed, cached_config.tracked_damage_types.kunai_damage = imgui.checkbox( + language.current_language.customization_menu.kunai_damage, cached_config.tracked_damage_types.kunai_damage); + config_changed = config_changed or changed; tracked_damage_types_changed = tracked_damage_types_changed or changed; - changed, cached_config.tracked_damage_types.installation_damage = - imgui.checkbox(language.current_language.customization_menu.installation_damage, - cached_config.tracked_damage_types.installation_damage); + + changed, cached_config.tracked_damage_types.installation_damage = imgui.checkbox( + language.current_language.customization_menu.installation_damage, cached_config.tracked_damage_types.installation_damage); + config_changed = config_changed or changed; tracked_damage_types_changed = tracked_damage_types_changed or changed; - changed, cached_config.tracked_damage_types.otomo_damage = - imgui.checkbox(language.current_language.customization_menu.otomo_damage, - cached_config.tracked_damage_types.otomo_damage); + + changed, cached_config.tracked_damage_types.otomo_damage = imgui.checkbox( + language.current_language.customization_menu.otomo_damage, cached_config.tracked_damage_types.otomo_damage); + config_changed = config_changed or changed; tracked_damage_types_changed = tracked_damage_types_changed or changed; - changed, cached_config.tracked_damage_types.wyvern_riding_damage = - imgui.checkbox(language.current_language.customization_menu.wyvern_riding_damage, - cached_config.tracked_damage_types.wyvern_riding_damage); + + changed, cached_config.tracked_damage_types.wyvern_riding_damage = imgui.checkbox( + language.current_language.customization_menu.wyvern_riding_damage, cached_config.tracked_damage_types.wyvern_riding_damage); + config_changed = config_changed or changed; tracked_damage_types_changed = tracked_damage_types_changed or changed; - changed, cached_config.tracked_damage_types.poison_damage = - imgui.checkbox(language.current_language.customization_menu.poison_damage, - cached_config.tracked_damage_types.poison_damage); + + changed, cached_config.tracked_damage_types.poison_damage = imgui.checkbox( + language.current_language.customization_menu.poison_damage, cached_config.tracked_damage_types.poison_damage); + config_changed = config_changed or changed; tracked_damage_types_changed = tracked_damage_types_changed or changed; - changed, cached_config.tracked_damage_types.blast_damage = - imgui.checkbox(language.current_language.customization_menu.blast_damage, - cached_config.tracked_damage_types.blast_damage); + + changed, cached_config.tracked_damage_types.blast_damage = imgui.checkbox( + language.current_language.customization_menu.blast_damage, cached_config.tracked_damage_types.blast_damage); + config_changed = config_changed or changed; tracked_damage_types_changed = tracked_damage_types_changed or changed; - changed, cached_config.tracked_damage_types.endemic_life_damage = - imgui.checkbox(language.current_language.customization_menu.endemic_life_damage, - cached_config.tracked_damage_types.endemic_life_damage); + + changed, cached_config.tracked_damage_types.endemic_life_damage = imgui.checkbox( + language.current_language.customization_menu.endemic_life_damage, cached_config.tracked_damage_types.endemic_life_damage); + config_changed = config_changed or changed; tracked_damage_types_changed = tracked_damage_types_changed or changed; - changed, cached_config.tracked_damage_types.other_damage = - imgui.checkbox(language.current_language.customization_menu.other_damage, - cached_config.tracked_damage_types.other_damage); + + changed, cached_config.tracked_damage_types.other_damage = imgui.checkbox( + language.current_language.customization_menu.other_damage, cached_config.tracked_damage_types.other_damage); + config_changed = config_changed or changed; tracked_damage_types_changed = tracked_damage_types_changed or changed; + if tracked_damage_types_changed then for player_id, _player in pairs(player.list) do player.update_display(_player); end + player.update_display(player.total); end + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.spacing) then - changed, cached_config.spacing.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.spacing.x, 0.1, -screen.width, screen.width, "%.1f"); + changed, cached_config.spacing.x = imgui.drag_float( + language.current_language.customization_menu.x, cached_config.spacing.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; - changed, cached_config.spacing.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.spacing.y, 0.1, -screen.height, screen.height, "%.1f"); + + changed, cached_config.spacing.y = imgui.drag_float( + language.current_language.customization_menu.y, cached_config.spacing.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.position) then - changed, cached_config.position.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.position.x, 0.1, 0, screen.width, "%.1f"); + changed, cached_config.position.x = imgui.drag_float( + language.current_language.customization_menu.x, cached_config.position.x, 0.1, 0, screen.width, "%.1f"); + config_changed = config_changed or changed; - changed, cached_config.position.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.position.y, 0.1, 0, screen.height, "%.1f"); + + changed, cached_config.position.y = imgui.drag_float( + language.current_language.customization_menu.y, cached_config.position.y, 0.1, 0, screen.height, "%.1f"); + config_changed = config_changed or changed; - changed, index = imgui.combo(language.current_language.customization_menu.anchor, table_helpers.find_index( - customization_menu.anchor_types, cached_config.position.anchor), customization_menu.displayed_anchor_types); + + changed, index = imgui.combo( + language.current_language.customization_menu.anchor, + table_helpers.find_index(customization_menu.anchor_types, cached_config.position.anchor), + customization_menu.displayed_anchor_types); + config_changed = config_changed or changed; + if changed then cached_config.position.anchor = customization_menu.anchor_types[index]; end + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.sorting) then - changed, index = imgui.combo(language.current_language.customization_menu.type, table_helpers.find_index( - customization_menu.damage_meter_UI_sorting_types, cached_config.sorting.type), + changed, index = imgui.combo( + language.current_language.customization_menu.type, + table_helpers.find_index(customization_menu.damage_meter_UI_sorting_types, cached_config.sorting.type), customization_menu.displayed_damage_meter_UI_sorting_types); + config_changed = config_changed or changed; + if changed then cached_config.sorting.type = customization_menu.damage_meter_UI_sorting_types[index]; end + changed, cached_config.sorting.reversed_order = imgui.checkbox( language.current_language.customization_menu.reversed_order, cached_config.sorting.reversed_order); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.player_name_label) then changed, cached_config.player_name_label.visibility = imgui.checkbox( language.current_language.customization_menu.visible, cached_config.player_name_label.visibility); + config_changed = config_changed or changed; + if imgui.tree_node(language.current_language.customization_menu.include) then if imgui.tree_node(language.current_language.customization_menu.me) then - changed, cached_config.player_name_label.include.myself.master_rank = - imgui.checkbox(language.current_language.customization_menu.master_rank, - cached_config.player_name_label.include.myself.master_rank); + changed, cached_config.player_name_label.include.myself.master_rank = imgui.checkbox( + language.current_language.customization_menu.master_rank, cached_config.player_name_label.include.myself.master_rank); + config_changed = config_changed or changed; - changed, cached_config.player_name_label.include.myself.hunter_rank = - imgui.checkbox(language.current_language.customization_menu.hunter_rank, - cached_config.player_name_label.include.myself.hunter_rank); + + changed, cached_config.player_name_label.include.myself.hunter_rank = imgui.checkbox( + language.current_language.customization_menu.hunter_rank, cached_config.player_name_label.include.myself.hunter_rank); + config_changed = config_changed or changed; - changed, cached_config.player_name_label.include.myself.cart_count = - imgui.checkbox(language.current_language.customization_menu.cart_count, - cached_config.player_name_label.include.myself.cart_count); + + changed, cached_config.player_name_label.include.myself.cart_count =imgui.checkbox( + language.current_language.customization_menu.cart_count, cached_config.player_name_label.include.myself.cart_count); + config_changed = config_changed or changed; - changed, cached_config.player_name_label.include.myself.word_player = - imgui.checkbox(language.current_language.customization_menu.word_player, - cached_config.player_name_label.include.myself.word_player); + + changed, cached_config.player_name_label.include.myself.word_player = imgui.checkbox( + language.current_language.customization_menu.word_player, cached_config.player_name_label.include.myself.word_player); + config_changed = config_changed or changed; - changed, cached_config.player_name_label.include.myself.player_id = - imgui.checkbox(language.current_language.customization_menu.player_id, - cached_config.player_name_label.include.myself.player_id); + + changed, cached_config.player_name_label.include.myself.player_id = imgui.checkbox( + language.current_language.customization_menu.player_id, cached_config.player_name_label.include.myself.player_id); + config_changed = config_changed or changed; - changed, cached_config.player_name_label.include.myself.player_name = - imgui.checkbox(language.current_language.customization_menu.player_name, - cached_config.player_name_label.include.myself.player_name); + + changed, cached_config.player_name_label.include.myself.player_name = imgui.checkbox( + language.current_language.customization_menu.player_name, cached_config.player_name_label.include.myself.player_name); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.other_players) then - changed, cached_config.player_name_label.include.others.master_rank = - imgui.checkbox(language.current_language.customization_menu.master_rank, - cached_config.player_name_label.include.others.master_rank); + changed, cached_config.player_name_label.include.others.master_rank = imgui.checkbox( + language.current_language.customization_menu.master_rank, cached_config.player_name_label.include.others.master_rank); + config_changed = config_changed or changed; - changed, cached_config.player_name_label.include.others.hunter_rank = - imgui.checkbox(language.current_language.customization_menu.hunter_rank, - cached_config.player_name_label.include.others.hunter_rank); + + changed, cached_config.player_name_label.include.others.hunter_rank = imgui.checkbox( + language.current_language.customization_menu.hunter_rank, cached_config.player_name_label.include.others.hunter_rank); + config_changed = config_changed or changed; - changed, cached_config.player_name_label.include.others.cart_count = - imgui.checkbox(language.current_language.customization_menu.cart_count, - cached_config.player_name_label.include.others.cart_count); + + changed, cached_config.player_name_label.include.others.cart_count = imgui.checkbox( + language.current_language.customization_menu.cart_count, cached_config.player_name_label.include.others.cart_count); + config_changed = config_changed or changed; - changed, cached_config.player_name_label.include.others.word_player = - imgui.checkbox(language.current_language.customization_menu.word_player, - cached_config.player_name_label.include.others.word_player); + + changed, cached_config.player_name_label.include.others.word_player = imgui.checkbox( + language.current_language.customization_menu.word_player, cached_config.player_name_label.include.others.word_player); + config_changed = config_changed or changed; - changed, cached_config.player_name_label.include.others.player_id = - imgui.checkbox(language.current_language.customization_menu.player_id, - cached_config.player_name_label.include.others.player_id); + + changed, cached_config.player_name_label.include.others.player_id = imgui.checkbox( + language.current_language.customization_menu.player_id, cached_config.player_name_label.include.others.player_id); + config_changed = config_changed or changed; - changed, cached_config.player_name_label.include.others.player_name = - imgui.checkbox(language.current_language.customization_menu.player_name, - cached_config.player_name_label.include.others.player_name); + + changed, cached_config.player_name_label.include.others.player_name = imgui.checkbox( + language.current_language.customization_menu.player_name, cached_config.player_name_label.include.others.player_name); + config_changed = config_changed or changed; + imgui.tree_pop(); end + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.player_name_label.offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.player_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + changed, cached_config.player_name_label.offset.x = imgui.drag_float( + language.current_language.customization_menu.x, cached_config.player_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; - changed, cached_config.player_name_label.offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.player_name_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + + changed, cached_config.player_name_label.offset.y = imgui.drag_float( + language.current_language.customization_menu.y, cached_config.player_name_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.player_name_label.color = imgui.color_picker_argb("", cached_config.player_name_label.color, - customization_menu.color_picker_flags); + changed, cached_config.player_name_label.color = imgui.color_picker_argb( + "", cached_config.player_name_label.color, customization_menu.color_picker_flags); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.shadow) then - changed, cached_config.player_name_label.shadow.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.player_name_label.shadow.visibility); + changed, cached_config.player_name_label.shadow.visibility = imgui.checkbox( + language.current_language.customization_menu.visible, cached_config.player_name_label.shadow.visibility); + config_changed = config_changed or changed; + if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.player_name_label.shadow.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.player_name_label.shadow.offset.x, - 0.1, -screen.width, screen.width, "%.1f"); + changed, cached_config.player_name_label.shadow.offset.x = imgui.drag_float( + language.current_language.customization_menu.x, cached_config.player_name_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; - changed, cached_config.player_name_label.shadow.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.player_name_label.shadow.offset.y, - 0.1, -screen.height, screen.height, "%.1f"); + + changed, cached_config.player_name_label.shadow.offset.y = imgui.drag_float( + language.current_language.customization_menu.y, cached_config.player_name_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.player_name_label.shadow.color = imgui.color_picker_argb("", - cached_config.player_name_label.shadow.color, customization_menu.color_picker_flags); + changed, cached_config.player_name_label.shadow.color = imgui.color_picker_argb( + "", cached_config.player_name_label.shadow.color, customization_menu.color_picker_flags); + config_changed = config_changed or changed; + imgui.tree_pop(); end + imgui.tree_pop(); end + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.hunter_rank_label) then - changed, cached_config.master_hunter_rank_label.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.master_hunter_rank_label.visibility); + changed, cached_config.master_hunter_rank_label.visibility = imgui.checkbox( + language.current_language.customization_menu.visible, cached_config.master_hunter_rank_label.visibility); + config_changed = config_changed or changed; + if imgui.tree_node(language.current_language.customization_menu.include) then + if imgui.tree_node(language.current_language.customization_menu.me) then changed, cached_config.master_hunter_rank_label.include.myself.master_rank = imgui.checkbox( - language.current_language.customization_menu.master_rank, - cached_config.player_name_label.include.myself.master_rank); + language.current_language.customization_menu.master_rank, cached_config.player_name_label.include.myself.master_rank); + config_changed = config_changed or changed; + changed, cached_config.master_hunter_rank_label.include.myself.hunter_rank = imgui.checkbox( - language.current_language.customization_menu.hunter_rank, - cached_config.player_name_label.include.myself.hunter_rank); + language.current_language.customization_menu.hunter_rank, cached_config.player_name_label.include.myself.hunter_rank); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.other_players) then changed, cached_config.master_hunter_rank_label.include.others.master_rank = imgui.checkbox( - language.current_language.customization_menu.master_rank, - cached_config.player_name_label.include.others.master_rank); + language.current_language.customization_menu.master_rank, cached_config.player_name_label.include.others.master_rank); + config_changed = config_changed or changed; + changed, cached_config.master_hunter_rank_label.include.others.hunter_rank = imgui.checkbox( - language.current_language.customization_menu.hunter_rank, - cached_config.player_name_label.include.others.hunter_rank); + language.current_language.customization_menu.hunter_rank, cached_config.player_name_label.include.others.hunter_rank); + config_changed = config_changed or changed; + imgui.tree_pop(); end + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.master_hunter_rank_label.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, cached_config.master_hunter_rank_label.offset.x, - 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - changed, cached_config.master_hunter_rank_label.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, cached_config.master_hunter_rank_label.offset.y, - 0.1, -screen.height, screen.height, "%.1f"); + changed, cached_config.master_hunter_rank_label.offset.x = imgui.drag_float( + language.current_language.customization_menu.x, cached_config.master_hunter_rank_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + + config_changed = config_changed or changed; + + changed, cached_config.master_hunter_rank_label.offset.y = imgui.drag_float( + language.current_language.customization_menu.y, cached_config.master_hunter_rank_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.master_hunter_rank_label.color = imgui.color_picker_argb("", - cached_config.master_hunter_rank_label.color, customization_menu.color_picker_flags); + changed, cached_config.master_hunter_rank_label.color = imgui.color_picker_argb( + "", cached_config.master_hunter_rank_label.color, customization_menu.color_picker_flags); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.shadow) then - changed, cached_config.master_hunter_rank_label.shadow.visibility = - imgui.checkbox(language.current_language.customization_menu.visible, - cached_config.master_hunter_rank_label.shadow.visibility); + changed, cached_config.master_hunter_rank_label.shadow.visibility = imgui.checkbox( + language.current_language.customization_menu.visible, cached_config.master_hunter_rank_label.shadow.visibility); + config_changed = config_changed or changed; + if imgui.tree_node(language.current_language.customization_menu.offset) then - changed, cached_config.master_hunter_rank_label.shadow.offset.x = - imgui.drag_float(language.current_language.customization_menu.x, - cached_config.master_hunter_rank_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + changed, cached_config.master_hunter_rank_label.shadow.offset.x = imgui.drag_float( + language.current_language.customization_menu.x, cached_config.master_hunter_rank_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; - changed, cached_config.master_hunter_rank_label.shadow.offset.y = - imgui.drag_float(language.current_language.customization_menu.y, - cached_config.master_hunter_rank_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + + changed, cached_config.master_hunter_rank_label.shadow.offset.y = imgui.drag_float( + language.current_language.customization_menu.y, cached_config.master_hunter_rank_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.color) then - changed, cached_config.master_hunter_rank_label.shadow.color = imgui.color_picker_argb("", - cached_config.master_hunter_rank_label.shadow.color, customization_menu.color_picker_flags); + changed, cached_config.master_hunter_rank_label.shadow.color = imgui.color_picker_argb( + "", cached_config.master_hunter_rank_label.shadow.color, customization_menu.color_picker_flags); + config_changed = config_changed or changed; + imgui.tree_pop(); end + imgui.tree_pop(); end + imgui.tree_pop(); end - changed = label_customization.draw(language.current_language.customization_menu.cart_count_label, - cached_config.cart_count_label); + + changed = label_customization.draw(language.current_language.customization_menu.cart_count_label, cached_config.cart_count_label); config_changed = config_changed or changed; + changed = label_customization.draw(language.current_language.customization_menu.dps_label, cached_config.dps_label); config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.damage_value_label, - cached_config.damage_value_label); + + changed = label_customization.draw(language.current_language.customization_menu.damage_value_label, cached_config.damage_value_label); config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.damage_percentage_label, - cached_config.damage_percentage_label); + + changed = label_customization.draw(language.current_language.customization_menu.damage_percentage_label, cached_config.damage_percentage_label); config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.total_damage_label, - cached_config.total_damage_label); + + changed = label_customization.draw(language.current_language.customization_menu.total_damage_label, cached_config.total_damage_label); config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.total_dps_label, - cached_config.total_dps_label); + + changed = label_customization.draw(language.current_language.customization_menu.total_dps_label, cached_config.total_dps_label); config_changed = config_changed or changed; - changed = label_customization.draw(language.current_language.customization_menu.total_damage_value_label, - cached_config.total_damage_value_label); + + changed = label_customization.draw(language.current_language.customization_menu.total_damage_value_label, cached_config.total_damage_value_label); config_changed = config_changed or changed; + changed = bar_customization.draw(language.current_language.customization_menu.damage_bar, cached_config.damage_bar); config_changed = config_changed or changed; - changed = bar_customization.draw(language.current_language.customization_menu.highlighted_damage_bar, - cached_config.highlighted_damage_bar); + + changed = bar_customization.draw(language.current_language.customization_menu.highlighted_damage_bar, cached_config.highlighted_damage_bar); config_changed = config_changed or changed; + imgui.tree_pop(); end + return config_changed; end function customization_menu.draw_endemic_life_UI() local changed = false; local config_changed = false; + if imgui.tree_node(language.current_language.customization_menu.endemic_life_UI) then local cached_config = config.current_config.endemic_life_UI; - changed, cached_config.enabled = imgui.checkbox(language.current_language.customization_menu.enabled, - cached_config.enabled); + + changed, cached_config.enabled = imgui.checkbox( + language.current_language.customization_menu.enabled, cached_config.enabled); + config_changed = config_changed or changed; + if imgui.tree_node(language.current_language.customization_menu.settings) then changed, cached_config.settings.hide_inactive_creatures = imgui.checkbox( language.current_language.customization_menu.hide_inactive_creatures, cached_config.settings.hide_inactive_creatures); + config_changed = config_changed or changed; + changed, cached_config.settings.opacity_falloff = imgui.checkbox( language.current_language.customization_menu.opacity_falloff, cached_config.settings.opacity_falloff); + config_changed = config_changed or changed; + changed, cached_config.settings.max_distance = imgui.drag_float( language.current_language.customization_menu.max_distance, cached_config.settings.max_distance, 1, 0, 10000, "%.0f"); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.world_offset) then - changed, cached_config.world_offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.world_offset.x, 0.1, -100, 100, "%.1f"); + changed, cached_config.world_offset.x = imgui.drag_float( + language.current_language.customization_menu.x, cached_config.world_offset.x, 0.1, -100, 100, "%.1f"); + config_changed = config_changed or changed; - changed, cached_config.world_offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.world_offset.y, 0.1, -100, 100, "%.1f"); + + changed, cached_config.world_offset.y = imgui.drag_float( + language.current_language.customization_menu.y, cached_config.world_offset.y, 0.1, -100, 100, "%.1f"); + config_changed = config_changed or changed; - changed, cached_config.world_offset.z = imgui.drag_float(language.current_language.customization_menu.z, - cached_config.world_offset.z, 0.1, -100, 100, "%.1f"); + + changed, cached_config.world_offset.z = imgui.drag_float( + language.current_language.customization_menu.z, cached_config.world_offset.z, 0.1, -100, 100, "%.1f"); + config_changed = config_changed or changed; + imgui.tree_pop(); end + if imgui.tree_node(language.current_language.customization_menu.viewport_offset) then - changed, cached_config.viewport_offset.x = imgui.drag_float(language.current_language.customization_menu.x, - cached_config.viewport_offset.x, 0.1, -screen.width, screen.width, "%.1f"); + changed, cached_config.viewport_offset.x = imgui.drag_float( + language.current_language.customization_menu.x, cached_config.viewport_offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; - changed, cached_config.viewport_offset.y = imgui.drag_float(language.current_language.customization_menu.y, - cached_config.viewport_offset.y, 0.1, -screen.height, screen.height, "%.1f"); + + changed, cached_config.viewport_offset.y = imgui.drag_float( + language.current_language.customization_menu.y, cached_config.viewport_offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + imgui.tree_pop(); end - changed = label_customization.draw(language.current_language.customization_menu.creature_name_label, - cached_config.creature_name_label.visibility); + + changed = label_customization.draw( + language.current_language.customization_menu.creature_name_label, cached_config.creature_name_label.visibility); + config_changed = config_changed or changed; + imgui.tree_pop(); end + return config_changed; end @@ -4187,8 +1971,17 @@ function customization_menu.init_module() keyboard = require("MHR_Overlay.Game_Handler.keyboard"); label_customization = require("MHR_Overlay.UI.Customizations.label_customization"); bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization"); + large_monster_UI_customization = require("MHR_Overlay.UI.Customizations.large_monster_UI_customization"); + + health_customization = require("MHR_Overlay.UI.Customizations.health_customization"); + stamina_customization = require("MHR_Overlay.UI.Customizations.stamina_customization"); + rage_customization = require("MHR_Overlay.UI.Customizations.rage_customization"); + body_parts_customization = require("MHR_Overlay.UI.Customizations.body_parts_customization"); + ailments_customization = require("MHR_Overlay.UI.Customizations.ailments_customization"); + ailment_buildups_customization = require("MHR_Overlay.UI.Customizations.ailment_buildups_customization"); + customization_menu.init(); customization_menu.reload_font(false); end -return customization_menu; +return customization_menu; \ No newline at end of file diff --git a/reframework/data/MHR Overlay/languages/en-us.json b/reframework/data/MHR Overlay/languages/en-us.json index 7f172cd..556f52e 100644 --- a/reframework/data/MHR Overlay/languages/en-us.json +++ b/reframework/data/MHR Overlay/languages/en-us.json @@ -116,7 +116,7 @@ "hide_all_active_ailments": "Hide All Active Ailments", "hide_all_inactive_ailments": "Hide All Inactive Ailments", "hide_dead_or_captured": "Hide Dead or Captured", - "hide_disabled_ailments": "Hide Disabled Ailments", + "hide_disabled_ailments": "Hide Disabled Ailments by Game", "hide_inactive_ailments_with_no_buildup_support": "Hide Inactive Ailments with no Buildup Support", "hide_inactive_creatures": "Hide Inactive Creatures", "hide_module_if_total_damage_is_zero": "Hide Module if Total Damage is 0",