From 9298c94b1d8c1b2d705fd39337a761f2653662f9 Mon Sep 17 00:00:00 2001 From: GreenComfyTea Date: Sat, 5 Feb 2022 18:45:47 +0200 Subject: [PATCH] Static and dynamic positioning of large monster UI are now separated. --- MHR_Overlay.lua | 52 +- MHR_Overlay/Damage_Meter/player.lua | 26 +- MHR_Overlay/Misc/config.lua | 940 +++- MHR_Overlay/Monsters/body_part.lua | 93 + MHR_Overlay/Monsters/large_monster.lua | 332 +- MHR_Overlay/Monsters/small_monster.lua | 73 +- MHR_Overlay/UI/Modules/damage_meter_UI.lua | 198 + MHR_Overlay/UI/Modules/large_monster_UI.lua | 148 + MHR_Overlay/UI/Modules/small_monster_UI.lua | 140 + MHR_Overlay/UI/Modules/time_UI.lua | 46 + .../UI/UI_Entities/body_part_UI_entity.lua | 60 + .../UI/UI_Entities/damage_UI_entity.lua | 78 + .../UI/UI_Entities/health_UI_entity.lua | 30 + MHR_Overlay/UI/UI_Entities/rage_UI_entity.lua | 39 + .../UI/UI_Entities/stamina_UI_entity.lua | 29 + MHR_Overlay/UI/customization_menu.lua | 4510 ++++++++++++----- MHR_Overlay/UI/drawing.lua | 42 +- 17 files changed, 5212 insertions(+), 1624 deletions(-) create mode 100644 MHR_Overlay/Monsters/body_part.lua create mode 100644 MHR_Overlay/UI/Modules/damage_meter_UI.lua create mode 100644 MHR_Overlay/UI/Modules/large_monster_UI.lua create mode 100644 MHR_Overlay/UI/Modules/small_monster_UI.lua create mode 100644 MHR_Overlay/UI/Modules/time_UI.lua create mode 100644 MHR_Overlay/UI/UI_Entities/body_part_UI_entity.lua create mode 100644 MHR_Overlay/UI/UI_Entities/damage_UI_entity.lua create mode 100644 MHR_Overlay/UI/UI_Entities/health_UI_entity.lua create mode 100644 MHR_Overlay/UI/UI_Entities/rage_UI_entity.lua create mode 100644 MHR_Overlay/UI/UI_Entities/stamina_UI_entity.lua diff --git a/MHR_Overlay.lua b/MHR_Overlay.lua index e21a2cb..c1ede96 100644 --- a/MHR_Overlay.lua +++ b/MHR_Overlay.lua @@ -1,7 +1,4 @@ -x = "1"; - -local damage_hook = require("MHR_Overlay.Damage_Meter.damage_hook"); -local player = require("MHR_Overlay.Damage_Meter.player"); +x = ""; local quest_status = require("MHR_Overlay.Game_Handler.quest_status"); local screen = require("MHR_Overlay.Game_Handler.screen"); @@ -10,40 +7,60 @@ local singletons = require("MHR_Overlay.Game_Handler.singletons"); local config = require("MHR_Overlay.Misc.config"); local table_helpers = require("MHR_Overlay.Misc.table_helpers"); +local player = require("MHR_Overlay.Damage_Meter.player"); +local damage_hook = require("MHR_Overlay.Damage_Meter.damage_hook"); + +local body_part = require("MHR_Overlay.Monsters.body_part"); local large_monster = require("MHR_Overlay.Monsters.large_monster"); local monster_hook = require("MHR_Overlay.Monsters.monster_hook"); local small_monster = require("MHR_Overlay.Monsters.small_monster"); +local damage_meter_UI = require("MHR_Overlay.UI.Modules.damage_meter_UI"); +local large_monster_UI = require("MHR_Overlay.UI.Modules.large_monster_UI"); +local small_monster_UI = require("MHR_Overlay.UI.Modules.small_monster_UI"); +local time_UI = require("MHR_Overlay.UI.Modules.time_UI"); + +local body_part_UI_entity = require("MHR_Overlay.UI.UI_Entities.body_part_UI_entity"); +local damage_UI_entity = require("MHR_Overlay.UI.UI_Entities.damage_UI_entity"); +local health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity"); +local stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity"); +local rage_UI_entity = require("MHR_Overlay.UI.UI_Entities.rage_UI_entity"); + local customization_menu = require("MHR_Overlay.UI.customization_menu"); -local damage_meter_UI = require("MHR_Overlay.UI.damage_meter_UI"); local drawing = require("MHR_Overlay.UI.drawing"); -local large_monster_UI = require("MHR_Overlay.UI.large_monster_UI"); -local small_monster_UI = require("MHR_Overlay.UI.small_monster_UI"); -local time_UI = require("MHR_Overlay.UI.time_UI"); ------------------------INIT MODULES------------------------- -- #region +screen.init_module(); +singletons.init_module(); +table_helpers.init_module(); + +config.init_module(); +quest_status.init_module(); + +damage_UI_entity.init_module(); +health_UI_entity.init_module(); +stamina_UI_entity.init_module(); +rage_UI_entity.init_module(); + damage_hook.init_module(); player.init_module(); -screen.init_module(); -singletons.init_module(); -quest_status.init_module(); - -config.init_module(); -table_helpers.init_module(); - +body_part.init_module(); large_monster.init_module(); monster_hook.init_module(); small_monster.init_module(); customization_menu.init_module(); +body_part_UI_entity.init_module(); damage_meter_UI.init_module(); drawing.init_module(); large_monster_UI.init_module(); small_monster_UI.init_module(); time_UI.init_module(); + + log.info("[MHR Overlay] loaded"); -- #endregion ------------------------INIT MODULES------------------------- @@ -84,13 +101,12 @@ end, function() singletons.init(); player.update_myself_position(); quest_status.update_is_online(); - if quest_status.index < 2 then quest_status.update_is_training_area(); if quest_status.is_training_area then - if config.current_config.large_monster_UI.enabled and config.current_config.global_settings.module_visibility.training_area.large_monster_UI then + if (config.current_config.large_monster_UI.dynamic.enabled or config.current_config.large_monster_UI.static.enabled) and config.current_config.global_settings.module_visibility.training_area.large_monster_UI then large_monster_UI.draw(); end @@ -104,7 +120,7 @@ end, function() small_monster_UI.draw(); end - if config.current_config.large_monster_UI.enabled and config.current_config.global_settings.module_visibility.during_quest.large_monster_UI then + if (config.current_config.large_monster_UI.dynamic.enabled or config.current_config.large_monster_UI.static.enabled) and config.current_config.global_settings.module_visibility.during_quest.large_monster_UI then large_monster_UI.draw(); end diff --git a/MHR_Overlay/Damage_Meter/player.lua b/MHR_Overlay/Damage_Meter/player.lua index a56eb4e..95fcba0 100644 --- a/MHR_Overlay/Damage_Meter/player.lua +++ b/MHR_Overlay/Damage_Meter/player.lua @@ -1,8 +1,9 @@ local player = {}; -local config = require("MHR_Overlay.Misc.config"); -local table_helpers = require("MHR_Overlay.Misc.table_helpers"); -local singletons = require("MHR_Overlay.Game_Handler.singletons"); -local customization_menu = require("MHR_Overlay.UI.customization_menu"); +local config; +local table_helpers; +local singletons; +local customization_menu; +local damage_UI_entity; player.list = {}; player.myself = nil; @@ -96,6 +97,8 @@ function player.new(player_id, player_name, player_hunter_rank) new_player.display.elemental_damage = 0; new_player.display.ailment_damage = 0; + player.init_UI(new_player); + return new_player; end @@ -249,11 +252,26 @@ function player.init_total() player.total = player.new(0, "Total", 0); end +function player.init_UI(_player) + _player.damage_UI = damage_UI_entity.new( + config.current_config.damage_meter_UI.damage_bar, + config.current_config.damage_meter_UI.highlighted_damage_bar, + config.current_config.damage_meter_UI.player_name_label, + config.current_config.damage_meter_UI.damage_value_label, + config.current_config.damage_meter_UI.damage_percentage_label + ); +end + +function player.draw(_player, position_on_screen, opacity_scale, top_damage) + damage_UI_entity.draw(_player, position_on_screen, opacity_scale, top_damage); +end + function player.init_module() config = require("MHR_Overlay.Misc.config"); table_helpers = require("MHR_Overlay.Misc.table_helpers"); singletons = require("MHR_Overlay.Game_Handler.singletons"); customization_menu = require("MHR_Overlay.UI.customization_menu"); + damage_UI_entity = require("MHR_Overlay.UI.UI_Entities.damage_UI_entity"); player.init_total(); end diff --git a/MHR_Overlay/Misc/config.lua b/MHR_Overlay/Misc/config.lua index 2a0e86d..3cf6d67 100644 --- a/MHR_Overlay/Misc/config.lua +++ b/MHR_Overlay/Misc/config.lua @@ -36,11 +36,6 @@ config.default_config = { small_monster_UI = { enabled = true, - spacing = { - x = 110, - y = 40 - }, - settings = { orientation = "Horizontal" }, @@ -62,12 +57,17 @@ config.default_config = { } }, - sorting = { + static_spacing = { + x = 110, + y = 40 + }, + + static_sorting = { type = "Normal", reversed_order = false }, - position = { + static_position = { x = 0, y = 0, anchor = "Top-Left" @@ -199,7 +199,7 @@ config.default_config = { x = 15, y = 54 }, - color = 0xFFFFFFFF, + color = 0xFFA3F5F0, shadow = { visibility = true, @@ -219,7 +219,7 @@ config.default_config = { x = 55, y = 64 }, - color = 0xFFFFFFFF, + color = 0xFFA3F5F0, shadow = { visibility = true, @@ -252,22 +252,14 @@ config.default_config = { }, large_monster_UI = { - enabled = true, - - spacing = { - x = 220, - y = 40, - }, - - settings = { - orientation = "Horizontal" - }, - - dynamic_positioning = { + dynamic = { enabled = true, - max_distance = 300, - opacity_falloff = true, - + + settings = { + max_distance = 300, + opacity_falloff = true + }, + world_offset = { x = 0, y = 6, @@ -277,54 +269,22 @@ config.default_config = { viewport_offset = { x = -100, y = 0 - } - }, - - sorting = { - type = "Normal", - reversed_order = false - }, - - position = { - x = 525, - y = 125,--y = 44, - anchor = "Top-Left" - }, - - monster_name_label = { - visibility = true, - text = "%s", - - include = { - monster_name = true, - crown = true, - size = true, - crown_thresholds = false }, - - offset = { - x = 5, - y = 0 - }, - color = 0xFFCCF4E1, - - shadow = { + + monster_name_label = { visibility = true, - offset = { - x = 1, - y = 1 + text = "%s", + + include = { + monster_name = true, + crown = true, + size = true, + crown_thresholds = false }, - color = 0xFF000000 - } - }, - - health = { - text_label = { - visibility = false, - text = "HP:", + offset = { - x = -25, - y = 19 + x = 5, + y = 0 }, color = 0xFFCCF4E1, @@ -337,78 +297,399 @@ config.default_config = { color = 0xFF000000 } }, - - value_label = { - visibility = true, - text = "%.0f/%.0f", -- current_health/max_health - offset = { - x = 5, - y = 19 + + health = { + text_label = { + visibility = false, + text = "HP:", + offset = { + x = -25, + y = 19 + }, + color = 0xFFCCF4E1, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } }, - color = 0xFFFFFFFF, - - shadow = { + + value_label = { + visibility = true, + text = "%.0f/%.0f", -- current_health/max_health + offset = { + x = 5, + y = 19 + }, + color = 0xFFFFFFFF, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + percentage_label = { + visibility = true, + text = "%5.1f%%", + + offset = { + x = 150, + y = 19 + }, + color = 0xFFFFFFFF, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + bar = { visibility = true, offset = { - x = 1, - y = 1 + x = 0, + y = 17 }, - color = 0xFF000000 + + size = { + width = 200, + height = 20 + }, + + colors = { + foreground = 0xB974A653, + background = 0xB9000000, + capture ={ + foreground = 0xB9CCCC33, + background = 0x88000000 + } + } } }, - - percentage_label = { - visibility = true, - text = "%5.1f%%", - - offset = { - x = 150, - y = 19 + + stamina = { + text_label = { + visibility = true, + text = "Stamina:", + offset = { + x = 15, + y = 37 + }, + color = 0xFFA3F5F0, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } }, - color = 0xFFFFFFFF, - - shadow = { + + value_label = { + visibility = true, + text = "%.0f/%.0f", -- current_health/max_health + offset = { + x = 55, + y = 54 + }, + color = 0xFFFFFFFF, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + percentage_label = { + visibility = true, + text = "%5.1f%%", + + offset = { + x = 145, + y = 54 + }, + color = 0xFFFFFFFF, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + bar = { visibility = true, offset = { - x = 1, - y = 1 + x = 10, + y = 54 }, - color = 0xFF000000 + + size = { + width = 185, + height = 7 + }, + + colors = { + foreground = 0xB966CCC5, + background = 0x88000000 + } } }, - - bar = { - visibility = true, + + rage = { + text_label = { + visibility = true, + text = "Rage:", + offset = { + x = 15, + y = 61 + }, + color = 0xFFFF9393, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + value_label = { + visibility = true, + text = "%.0f/%.0f", -- current_health/max_health + offset = { + x = 55, + y = 78 + }, + color = 0xFFFFFFFF, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + percentage_label = { + visibility = true, + text = "%5.1f%%", + + offset = { + x = 145, + y = 78 + }, + color = 0xFFFFFFFF, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + bar = { + visibility = true, + offset = { + x = 10, + y = 78 + }, + + size = { + width = 185, + height = 7 + }, + + colors = { + foreground = 0xB9CC6666, + background = 0x88000000 + } + } + }, + + parts = { offset = { x = 0, - y = 17 + y = 50 }, - - size = { - width = 200, - height = 20 + + + spacing = { + x = 0, + y = 24, }, - - colors = { - foreground = 0xB974A653, - background = 0xB9000000, - capture ={ - foreground = 0xB9CCCC33, + + part_name_label = { + visibility = false, + text = "%s", + + include = { + part_name = false, + break_count = true + }, + + offset = { + x = 15, + y = 61 + }, + color = 0xF1F4A3CC, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + text_label = { + visibility = false, + text = "HP:", + offset = { + x = -15, + y = 71 + }, + color = 0xF1F4A3CC, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + value_label = { + visibility = false, + text = "%.0f/%.0f", -- current_health/max_health + offset = { + x = 55, + y = 78 + }, + color = 0xFFFFFFFF, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + percentage_label = { + visibility = false, + text = "%5.1f%%", + + offset = { + x = 145, + y = 78 + }, + color = 0xFFFFFFFF, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + bar = { + visibility = false, + offset = { + x = 10, + y = 78 + }, + + size = { + width = 185, + height = 5 + }, + + colors = { + foreground = 0xF4D0A3CC, background = 0x88000000 } } } }, - stamina = { - text_label = { + static = { + enabled = true, + + spacing = { + x = 220, + y = 40, + }, + + settings = { + orientation = "Horizontal" + }, + + sorting = { + type = "Normal", + reversed_order = false + }, + + position = { + x = 525, + y = 125,--y = 44, + anchor = "Top-Left" + }, + + monster_name_label = { visibility = true, - text = "Stamina:", - offset = { - x = 15, - y = 37 + text = "%s", + + include = { + monster_name = true, + crown = true, + size = true, + crown_thresholds = false }, - color = 0xFFA3F5F0, + + offset = { + x = 5, + y = 0 + }, + color = 0xFFCCF4E1, shadow = { visibility = true, @@ -419,139 +700,356 @@ config.default_config = { color = 0xFF000000 } }, - - value_label = { - visibility = true, - text = "%.0f/%.0f", -- current_health/max_health - offset = { - x = 55, - y = 54 - }, - color = 0xFFFFFFFF, - - shadow = { - visibility = true, + + health = { + text_label = { + visibility = false, + text = "HP:", offset = { - x = 1, - y = 1 + x = -25, + y = 19 }, - color = 0xFF000000 - } - }, - - percentage_label = { - visibility = true, - text = "%5.1f%%", - - offset = { - x = 145, - y = 54 + color = 0xFFCCF4E1, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } }, - color = 0xFFFFFFFF, - - shadow = { + + value_label = { visibility = true, + text = "%.0f/%.0f", -- current_health/max_health offset = { - x = 1, - y = 1 + x = 5, + y = 19 }, - color = 0xFF000000 - } - }, - - bar = { - visibility = true, - offset = { - x = 10, - y = 54 + color = 0xFFFFFFFF, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } }, - - size = { - width = 185, - height = 7 - }, - - colors = { - foreground = 0xB966CCC5, - background = 0x88000000 - } - } - }, - - rage = { - text_label = { - visibility = true, - text = "Rage:", - offset = { - x = 15, - y = 61 - }, - color = 0xFFFF9393, - shadow = { + percentage_label = { + visibility = true, + text = "%5.1f%%", + + offset = { + x = 150, + y = 19 + }, + color = 0xFFFFFFFF, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + bar = { visibility = true, offset = { - x = 1, - y = 1 + x = 0, + y = 17 }, - color = 0xFF000000 + + size = { + width = 200, + height = 20 + }, + + colors = { + foreground = 0xB974A653, + background = 0xB9000000, + capture ={ + foreground = 0xB9CCCC33, + background = 0x88000000 + } + } } }, - - value_label = { - visibility = true, - text = "%.0f/%.0f", -- current_health/max_health - offset = { - x = 55, - y = 78 + + stamina = { + text_label = { + visibility = true, + text = "Stamina:", + offset = { + x = 15, + y = 37 + }, + color = 0xFFA3F5F0, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } }, - color = 0xFFFFFFFF, - - shadow = { + + value_label = { + visibility = true, + text = "%.0f/%.0f", -- current_health/max_health + offset = { + x = 55, + y = 54 + }, + color = 0xFFFFFFFF, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + percentage_label = { + visibility = true, + text = "%5.1f%%", + + offset = { + x = 145, + y = 54 + }, + color = 0xFFFFFFFF, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + bar = { visibility = true, offset = { - x = 1, - y = 1 + x = 10, + y = 54 }, - color = 0xFF000000 + + size = { + width = 185, + height = 7 + }, + + colors = { + foreground = 0xB966CCC5, + background = 0x88000000 + } } }, - - percentage_label = { - visibility = true, - text = "%5.1f%%", - - offset = { - x = 145, - y = 78 + + rage = { + text_label = { + visibility = true, + text = "Rage:", + offset = { + x = 15, + y = 61 + }, + color = 0xFFFF9393, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } }, - color = 0xFFFFFFFF, - - shadow = { + + value_label = { + visibility = true, + text = "%.0f/%.0f", -- current_health/max_health + offset = { + x = 55, + y = 78 + }, + color = 0xFFFFFFFF, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + percentage_label = { + visibility = true, + text = "%5.1f%%", + + offset = { + x = 145, + y = 78 + }, + color = 0xFFFFFFFF, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + bar = { visibility = true, offset = { - x = 1, - y = 1 + x = 10, + y = 78 }, - color = 0xFF000000 + + size = { + width = 185, + height = 7 + }, + + colors = { + foreground = 0xB9CC6666, + background = 0x88000000 + } } }, - - bar = { - visibility = true, + + parts = { offset = { - x = 10, - y = 78 + x = 0, + y = 50 }, - - size = { - width = 185, - height = 7 + + + spacing = { + x = 0, + y = 24, }, - - colors = { - foreground = 0xB9CC6666, - background = 0x88000000 + + part_name_label = { + visibility = true, + text = "%s", + + include = { + part_name = false, + break_count = true + }, + + offset = { + x = 15, + y = 61 + }, + color = 0xF1F4A3CC, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + text_label = { + visibility = false, + text = "HP:", + offset = { + x = -15, + y = 71 + }, + color = 0xF1F4A3CC, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + value_label = { + visibility = true, + text = "%.0f/%.0f", -- current_health/max_health + offset = { + x = 55, + y = 78 + }, + color = 0xFFFFFFFF, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + percentage_label = { + visibility = true, + text = "%5.1f%%", + + offset = { + x = 145, + y = 78 + }, + color = 0xFFFFFFFF, + + shadow = { + visibility = true, + offset = { + x = 1, + y = 1 + }, + color = 0xFF000000 + } + }, + + bar = { + visibility = true, + offset = { + x = 10, + y = 78 + }, + + size = { + width = 185, + height = 5 + }, + + colors = { + foreground = 0xF4D0A3CC, + background = 0x88000000 + } } } } diff --git a/MHR_Overlay/Monsters/body_part.lua b/MHR_Overlay/Monsters/body_part.lua new file mode 100644 index 0000000..f6b4be3 --- /dev/null +++ b/MHR_Overlay/Monsters/body_part.lua @@ -0,0 +1,93 @@ +local body_part = {}; +local singletons; +local customization_menu; +local config; +local table_helpers; +local health_UI_entity; +local stamina_UI_entity; +local rage_UI_entity; +local body_part_UI_entity; +local screen; +local drawing; + +body_part.list = {}; + +function body_part.new(REpart, id) + local part = {}; + + part.REpart = REpart; + part.id = id; + + part.health = 99999; + part.max_health = 99999; + part.health_percentage = 0; + + part.name = "??"; + part.break_count = 0; + + body_part.init_dynamic_UI(part); + body_part.init_static_UI(part); + + return part; +end + + +function body_part.init_dynamic_UI(part) + part.body_part_dynamic_UI = body_part_UI_entity.new( + config.current_config.large_monster_UI.dynamic.parts.bar, + config.current_config.large_monster_UI.dynamic.parts.part_name_label, + config.current_config.large_monster_UI.dynamic.parts.text_label, + config.current_config.large_monster_UI.dynamic.parts.value_label, + config.current_config.large_monster_UI.dynamic.parts.percentage_label + ); +end + +function body_part.init_static_UI(part) + part.body_part_static_UI = body_part_UI_entity.new( + config.current_config.large_monster_UI.static.parts.bar, + config.current_config.large_monster_UI.static.parts.part_name_label, + config.current_config.large_monster_UI.static.parts.text_label, + config.current_config.large_monster_UI.static.parts.value_label, + config.current_config.large_monster_UI.static.parts.percentage_label + ); +end + +function body_part.update(part, new_health, new_max_health) + if part == nil then + return; + end + + if new_health > part.health then + part.break_count = part.break_count + 1; + end + + part.health = new_health; + part.max_health = new_max_health; + + if part.max_health ~= 0 then + part.health_percentage = part.health / part.max_health; + end +end + +function body_part.draw_dynamic(part, position_on_screen, opacity_scale) + body_part_UI_entity.draw_dynamic(part, position_on_screen, opacity_scale); +end + +function body_part.draw_static(part, position_on_screen, opacity_scale) + body_part_UI_entity.draw_static(part, position_on_screen, opacity_scale); +end + +function body_part.init_module() + singletons = require("MHR_Overlay.Game_Handler.singletons"); + customization_menu = require("MHR_Overlay.UI.customization_menu"); + config = require("MHR_Overlay.Misc.config"); + table_helpers = require("MHR_Overlay.Misc.table_helpers"); + health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity"); + stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity"); + rage_UI_entity = require("MHR_Overlay.UI.UI_Entities.rage_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"); +end + +return body_part; \ No newline at end of file diff --git a/MHR_Overlay/Monsters/large_monster.lua b/MHR_Overlay/Monsters/large_monster.lua index 8d8a056..4073d94 100644 --- a/MHR_Overlay/Monsters/large_monster.lua +++ b/MHR_Overlay/Monsters/large_monster.lua @@ -1,60 +1,72 @@ local large_monster = {}; local singletons; local customization_menu; +local config; +local table_helpers; +local health_UI_entity; +local stamina_UI_entity; +local rage_UI_entity; +local screen; +local drawing; +local body_part; large_monster.list = {}; function large_monster.new(enemy) - local new_monster = {}; - new_monster.is_large = true; + local monster = {}; + monster.is_large = true; + monster.id = 0; - new_monster.health = 0; - new_monster.max_health = 999999; - new_monster.health_percentage = 0; - new_monster.missing_health = 0; - new_monster.capture_health = 0; + monster.health = 0; + monster.max_health = 999999; + monster.health_percentage = 0; + monster.missing_health = 0; + monster.capture_health = 0; - new_monster.stamina = 0; - new_monster.max_stamina = 1000; - new_monster.stamina_percentage = 0; - new_monster.missing_stamina = 0; + monster.stamina = 0; + monster.max_stamina = 1000; + monster.stamina_percentage = 0; + monster.missing_stamina = 0; - new_monster.is_in_rage = false; - new_monster.rage_point = 0; - new_monster.rage_limit = 2001; - new_monster.rage_timer = 0; - new_monster.rage_duration = 600; - new_monster.rage_count = 0; - new_monster.rage_percentage = 0; + monster.is_in_rage = false; + monster.rage_point = 0; + monster.rage_limit = 3000; + monster.rage_timer = 0; + monster.rage_duration = 600; + monster.rage_count = 0; + monster.rage_percentage = 0; - new_monster.rage_total_seconds_left = 0; - new_monster.rage_minutes_left = 0; - new_monster.rage_seconds_left = 0; - new_monster.rage_timer_percentage = 0; + monster.rage_total_seconds_left = 0; + monster.rage_minutes_left = 0; + monster.rage_seconds_left = 0; + monster.rage_timer_percentage = 0; - new_monster.position = Vector3f.new(0, 0, 0); + monster.position = Vector3f.new(0, 0, 0); - new_monster.name = "Large Monster"; - new_monster.size = 1; - new_monster.small_border = 0; - new_monster.big_border = 5; - new_monster.king_border = 10; - new_monster.crown = ""; - - large_monster.init(new_monster, enemy); + monster.name = "Large Monster"; + monster.size = 1; + monster.small_border = 0; + monster.big_border = 5; + monster.king_border = 10; + monster.crown = ""; + + monster.parts = {}; + + large_monster.init(monster, enemy); + large_monster.init_static_UI(monster); + large_monster.init_dynamic_UI(monster); if large_monster.list[enemy] == nil then - large_monster.list[enemy] = new_monster; + large_monster.list[enemy] = monster; end - - return new_monster; + return monster; end function large_monster.get_monster(enemy) if large_monster.list[enemy] == nil then - large_monster.list[enemy] = large_monster.new(enemy); + return large_monster.new(enemy); + end - return large_monster.list[enemy]; end @@ -65,6 +77,8 @@ function large_monster.init(monster, enemy) return; end + monster.id = enemy_type; + local enemy_name = singletons.message_manager:call("getEnemyNameMessage", enemy_type); if enemy_name ~= nil then monster.name = enemy_name; @@ -105,35 +119,77 @@ function large_monster.init(monster, enemy) end end +function large_monster.init_static_UI(monster) + monster.static_name_label = table_helpers.deep_copy(config.current_config.large_monster_UI.static.monster_name_label); + + monster.health_static_UI = health_UI_entity.new( + config.current_config.large_monster_UI.static.health.bar, + config.current_config.large_monster_UI.static.health.text_label, + config.current_config.large_monster_UI.static.health.value_label, + config.current_config.large_monster_UI.static.health.percentage_label + ); + + monster.stamina_static_UI = stamina_UI_entity.new( + config.current_config.large_monster_UI.static.stamina.bar, + config.current_config.large_monster_UI.static.stamina.text_label, + config.current_config.large_monster_UI.static.stamina.value_label, + config.current_config.large_monster_UI.static.stamina.percentage_label + ); + + monster.rage_static_UI = rage_UI_entity.new( + config.current_config.large_monster_UI.static.rage.bar, + config.current_config.large_monster_UI.static.rage.text_label, + config.current_config.large_monster_UI.static.rage.value_label, + config.current_config.large_monster_UI.static.rage.percentage_label + ); + + for REpart, part in pairs(monster.parts) do + body_part.init_static_UI(part); + end +end + +function large_monster.init_dynamic_UI(monster) + monster.dynamic_name_label = table_helpers.deep_copy(config.current_config.large_monster_UI.dynamic.monster_name_label); + + monster.health_dynamic_UI = health_UI_entity.new( + config.current_config.large_monster_UI.dynamic.health.bar, + config.current_config.large_monster_UI.dynamic.health.text_label, + config.current_config.large_monster_UI.dynamic.health.value_label, + config.current_config.large_monster_UI.dynamic.health.percentage_label + ); + + monster.stamina_dynamic_UI = stamina_UI_entity.new( + config.current_config.large_monster_UI.dynamic.stamina.bar, + config.current_config.large_monster_UI.dynamic.stamina.text_label, + config.current_config.large_monster_UI.dynamic.stamina.value_label, + config.current_config.large_monster_UI.dynamic.stamina.percentage_label + ); + + monster.rage_dynamic_UI = rage_UI_entity.new( + config.current_config.large_monster_UI.dynamic.rage.bar, + config.current_config.large_monster_UI.dynamic.rage.text_label, + config.current_config.large_monster_UI.dynamic.rage.value_label, + config.current_config.large_monster_UI.dynamic.rage.percentage_label + ); + + for REpart, part in pairs(monster.parts) do + body_part.init_dynamic_UI(part); + end +end + function large_monster.update(enemy) if enemy == nil then return; end - + + local monster = large_monster.get_monster(enemy); + local physical_param = enemy:get_field("k__BackingField"); if physical_param == nil then customization_menu.status = "No physical param"; return; end - local status_param = enemy:get_field("k__BackingField"); - if status_param == nil then - customization_menu.status = "No status param"; - return; - end - - local anger_param = enemy:get_field("k__BackingField"); - if anger_param == nil then - customization_menu.status = "No anger param"; - return; - end - - local stamina_param = enemy:get_field("k__BackingField"); - if stamina_param == nil then - customization_menu.status = "No stamina param"; - return; - end - local vital_param = physical_param:call("getVital", 0, 0); if vital_param == nil then customization_menu.status = "No vital param"; @@ -144,9 +200,21 @@ function large_monster.update(enemy) local max_health = vital_param:call("get_Max"); local capture_health = physical_param:call("get_CaptureHpVital"); + local stamina_param = enemy:get_field("k__BackingField"); + if stamina_param == nil then + customization_menu.status = "No stamina param"; + return; + end + local stamina = stamina_param:call("getStamina"); local max_stamina = stamina_param:call("getMaxStamina"); + local anger_param = enemy:get_field("k__BackingField"); + if anger_param == nil then + customization_menu.status = "No anger param"; + return; + end + local is_in_rage = anger_param:call("isAnger"); local rage_point = anger_param:call("get_AngerPoint"); local rage_limit = anger_param:call("get_LimitAnger"); @@ -154,6 +222,74 @@ function large_monster.update(enemy) local rage_duration = anger_param:call("get_TimerAnger"); local rage_count = anger_param:call("get_CountAnger"); + local vital_list = physical_param:get_field("_VitalList"); + if vital_list == nil then + customization_menu.status = "No vital list"; + return; + end + + local vital_list_count = vital_list:call("get_Count"); + if vital_list_count == nil or vital_list_count < 2 then + customization_menu.status = "No vital list count"; + return; + end + + local part_list = vital_list:call("get_Item", 1); + if part_list == nil then + customization_menu.status = "No part list"; + return; + end + + local part_list_count = part_list:call("get_Count"); + if part_list_count == nil then + customization_menu.status = "No part list count"; + return; + end + + + local last_REpart = part_list:call("get_Item", part_list_count - 1); + local last_REpart_health = 9999999; + if last_REpart ~= nil then + local _last_REpart_health = last_REpart:call("get_Current"); + if last_REpart_health ~= nil then + last_REpart_health = _last_REpart_health; + end + end + + local part_id = 1; + for i = 0, part_list_count - 1 do + + local REpart = part_list:call("get_Item", i); + if REpart == nil then + goto continue; + end + + local part_health = REpart:call("get_Current"); + if part_health == nil then + goto continue; + end + + if part_health == last_REpart_health then + break; + end + + local part_max_health = REpart:call("get_Max"); + if part_max_health == nil or part_max_health <= 0 then + goto continue; + end + + local part = monster.parts[REpart]; + if part == nil then + part = body_part.new(REpart, part_id); + monster.parts[REpart] = part; + end + + body_part.update(part, part_health, part_max_health); + + part_id = part_id + 1; + ::continue:: + end + local enemy_game_object = enemy:call("get_GameObject"); if enemy_game_object == nil then customization_menu.status = "No enemy game object"; @@ -171,9 +307,7 @@ function large_monster.update(enemy) customization_menu.status = "No enemy position"; return; end - - local monster = large_monster.get_monster(enemy); - + if health ~= nil then monster.health = health; end @@ -256,6 +390,80 @@ function large_monster.update(enemy) end end +function large_monster.draw_dynamic(monster, position_on_screen, opacity_scale) + local monster_name_text = ""; + if config.current_config.large_monster_UI.dynamic.monster_name_label.include.monster_name then + monster_name_text = string.format("%s ", monster.name); + end + + if config.current_config.large_monster_UI.dynamic.monster_name_label.include.crown and monster.crown ~= "" then + monster_name_text = monster_name_text .. string.format("%s ", monster.crown); + end + if config.current_config.large_monster_UI.dynamic.monster_name_label.include.size then + monster_name_text = monster_name_text .. string.format("#%.0f ", 100 * monster.size); + end + + if config.current_config.large_monster_UI.dynamic.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 + + drawing.draw_label(monster.dynamic_name_label, position_on_screen, opacity_scale, monster_name_text .. " " .. tostring(monster.id)); + + health_UI_entity.draw(monster, monster.health_dynamic_UI, position_on_screen, opacity_scale); + stamina_UI_entity.draw(monster, monster.stamina_dynamic_UI, position_on_screen, opacity_scale); + rage_UI_entity.draw(monster, monster.rage_dynamic_UI, position_on_screen, opacity_scale); + + local j = 0; + for REpart, part in pairs(monster.parts) do + local part_position_on_screen = { + x = position_on_screen.x + config.current_config.large_monster_UI.dynamic.parts.offset.x + config.current_config.large_monster_UI.dynamic.parts.spacing.x * j, + y = position_on_screen.y + config.current_config.large_monster_UI.dynamic.parts.offset.y + config.current_config.large_monster_UI.dynamic.parts.spacing.y * j; + } + + body_part.draw_dynamic(part, part_position_on_screen, opacity_scale); + + j = j + 1; + end +end + +function large_monster.draw_static(monster, position_on_screen, opacity_scale) + local monster_name_text = ""; + if config.current_config.large_monster_UI.static.monster_name_label.include.monster_name then + monster_name_text = string.format("%s ", monster.name); + end + + if config.current_config.large_monster_UI.static.monster_name_label.include.crown and monster.crown ~= "" then + monster_name_text = monster_name_text .. string.format("%s ", monster.crown); + end + if config.current_config.large_monster_UI.static.monster_name_label.include.size then + monster_name_text = monster_name_text .. string.format("#%.0f ", 100 * monster.size); + end + + if config.current_config.large_monster_UI.static.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 + + drawing.draw_label(monster.static_name_label, position_on_screen, opacity_scale, monster_name_text .. " " .. tostring(monster.id)); + + health_UI_entity.draw(monster, monster.health_static_UI, position_on_screen, opacity_scale); + stamina_UI_entity.draw(monster, monster.stamina_static_UI, position_on_screen, opacity_scale); + rage_UI_entity.draw(monster, monster.rage_static_UI, position_on_screen, opacity_scale); + + local j = 0; + for REpart, part in pairs(monster.parts) do + local part_position_on_screen = { + x = position_on_screen.x + config.current_config.large_monster_UI.static.parts.offset.x + config.current_config.large_monster_UI.static.parts.spacing.x * j, + y = position_on_screen.y + config.current_config.large_monster_UI.static.parts.offset.y + config.current_config.large_monster_UI.static.parts.spacing.y * j; + } + + body_part.draw_static(part, part_position_on_screen, opacity_scale); + + j = j + 1; + end +end + function large_monster.init_list() large_monster.list = {}; end @@ -263,6 +471,14 @@ end function large_monster.init_module() singletons = require("MHR_Overlay.Game_Handler.singletons"); customization_menu = require("MHR_Overlay.UI.customization_menu"); + config = require("MHR_Overlay.Misc.config"); + table_helpers = require("MHR_Overlay.Misc.table_helpers"); + body_part = require("MHR_Overlay.Monsters.body_part"); + health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity"); + stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity"); + rage_UI_entity = require("MHR_Overlay.UI.UI_Entities.rage_UI_entity"); + screen = require("MHR_Overlay.Game_Handler.screen"); + drawing = require("MHR_Overlay.UI.drawing"); end return large_monster; \ No newline at end of file diff --git a/MHR_Overlay/Monsters/small_monster.lua b/MHR_Overlay/Monsters/small_monster.lua index e1e935d..476cc28 100644 --- a/MHR_Overlay/Monsters/small_monster.lua +++ b/MHR_Overlay/Monsters/small_monster.lua @@ -1,33 +1,41 @@ local small_monster = {}; local singletons; -local customization_menu; +local customization_menu; +local config; +local table_helpers; +local health_UI_entity; +local stamina_UI_entity; +local screen; +local drawing; small_monster.list = {}; + function small_monster.new(enemy) - local new_monster = {}; - new_monster.is_large = false; + local monster = {}; + monster.is_large = false; - new_monster.health = 0; - new_monster.max_health = 999999; - new_monster.health_percentage = 0; - new_monster.missing_health = 0; - new_monster.capture_health = 0; + monster.health = 0; + monster.max_health = 999999; + monster.health_percentage = 0; + monster.missing_health = 0; + monster.capture_health = 0; - new_monster.stamina = 0; - new_monster.max_stamina = 1000; - new_monster.stamina_percentage = 0; - new_monster.missing_stamina = 0; + monster.stamina = 0; + monster.max_stamina = 1000; + monster.stamina_percentage = 0; + monster.missing_stamina = 0; - new_monster.position = Vector3f.new(0, 0, 0); - new_monster.name = "Small Monster"; + monster.position = Vector3f.new(0, 0, 0); + monster.name = "Small Monster"; - small_monster.init(new_monster, enemy); + small_monster.init(monster, enemy); + small_monster.init_UI(monster); if small_monster.list[enemy] == nil then - small_monster.list[enemy] = new_monster; + small_monster.list[enemy] = monster; end - return new_monster; + return monster; end function small_monster.get_monster(enemy) @@ -51,6 +59,24 @@ function small_monster.init(monster, enemy) end end +function small_monster.init_UI(monster) + monster.name_label = table_helpers.deep_copy(config.current_config.small_monster_UI.monster_name_label); + + monster.health_UI = health_UI_entity.new( + config.current_config.small_monster_UI.health.bar, + config.current_config.small_monster_UI.health.text_label, + config.current_config.small_monster_UI.health.value_label, + config.current_config.small_monster_UI.health.percentage_label + ); + + monster.stamina_UI = stamina_UI_entity.new( + config.current_config.small_monster_UI.stamina.bar, + config.current_config.small_monster_UI.stamina.text_label, + config.current_config.small_monster_UI.stamina.value_label, + config.current_config.small_monster_UI.stamina.percentage_label + ); +end + function small_monster.update(enemy) if enemy == nil then return; @@ -147,6 +173,13 @@ function small_monster.update(enemy) end end +function small_monster.draw(monster, position_on_screen, opacity_scale) + drawing.draw_label(monster.name_label, position_on_screen, opacity_scale, monster.name); + + health_UI_entity.draw(monster, monster.health_UI, position_on_screen, opacity_scale); + stamina_UI_entity.draw(monster, monster.stamina_UI, position_on_screen, opacity_scale); +end + function small_monster.init_list() small_monster.list = {}; end @@ -154,6 +187,12 @@ end function small_monster.init_module() singletons = require("MHR_Overlay.Game_Handler.singletons"); customization_menu = require("MHR_Overlay.UI.customization_menu"); + config = require("MHR_Overlay.Misc.config"); + table_helpers = require("MHR_Overlay.Misc.table_helpers"); + health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity"); + stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity"); + screen = require("MHR_Overlay.Game_Handler.screen"); + drawing = require("MHR_Overlay.UI.drawing"); end return small_monster; \ No newline at end of file diff --git a/MHR_Overlay/UI/Modules/damage_meter_UI.lua b/MHR_Overlay/UI/Modules/damage_meter_UI.lua new file mode 100644 index 0000000..9d7bb17 --- /dev/null +++ b/MHR_Overlay/UI/Modules/damage_meter_UI.lua @@ -0,0 +1,198 @@ +local damage_meter_UI = {}; +local singletons; +local config; +local customization_menu; +local player; +local quest_status; +local screen; +local drawing; + +damage_meter_UI.last_displayed_players = {}; + +function damage_meter_UI.draw() + + if player.total.display.total_damage == 0 and config.current_config.damage_meter_UI.settings.hide_module_if_total_damage_is_zero then + return; + end + + if singletons.lobby_manager == nil then + return; + end + + if singletons.progress_manager == nil then + return; + end + + -- myself player + local myself_player_info = singletons.lobby_manager:get_field("_myHunterInfo"); + if myself_player_info == nil then + customization_menu.status = "No myself player info list"; + return; + end + + local myself_player_name = myself_player_info:get_field("_name"); + if myself_player_name == nil then + customization_menu.status = "No myself player name"; + return; + end + + if quest_status.is_online then + player.myself_id = singletons.lobby_manager:get_field("_myselfQuestIndex"); + if player.myself_id == nil then + customization_menu.status = "No myself player id"; + return; + end + else + player.myself_id = singletons.lobby_manager:get_field("_myselfIndex"); + if player.myself_id == nil then + customization_menu.status = "No myself player id"; + return; + end + end + + local myself_hunter_rank = singletons.progress_manager:call("get_HunterRank"); + if myself_hunter_rank == nil then + customization_menu.status = "No myself hunter rank"; + myself_hunter_rank = 0; + end + + if player.list[player.myself_id] == nil then + player.list[player.myself_id] = player.new(player.myself_id, myself_player_name, myself_hunter_rank); + player.myself = player.list[player.myself_id]; + end + + local quest_players = {}; + + if quest_status.index > 2 then + quest_players = damage_meter_UI.last_displayed_players; + else + -- other players + local player_info_list = singletons.lobby_manager:get_field("_questHunterInfo"); + if player_info_list == nil then + customization_menu.status = "No player info list"; + end + + local count = player_info_list:call("get_Count"); + if count == nil then + customization_menu.status = "No player info list count"; + return; + end + + for i = 0, count - 1 do + + local player_info = player_info_list:call("get_Item", i); + if player_info == nil then + goto continue + end + + local player_id = player_info:get_field("_memberIndex"); + if player_id == nil then + + goto continue + end + + local player_hunter_rank = player_info:get_field("_hunterRank"); + if player_hunter_rank == nil then + goto continue + end + + if player_id == player.myself_id and config.current_config.damage_meter_UI.settings.my_damage_bar_location ~= "Normal" then + player.list[player.myself_id].hunter_rank = player_hunter_rank; + goto continue + end + + local player_name = player_info:get_field("_name"); + if player_name == nil then + goto continue + end + + if player.list[player_id] == nil then + player.list[player_id] = player.new(player_id, player_name, player_hunter_rank); + elseif player.list[player_id].name ~= player_name then + player.list[player_id] = player.new(player_id, player_name, player_hunter_rank); + end + + table.insert(quest_players, player.list[player_id]); + + ::continue:: + end + + -- sort here + if config.current_config.damage_meter_UI.sorting.type == "Normal" and config.current_config.damage_meter_UI.sorting.reversed_order then + + local reversed_quest_players = {}; + for i = #quest_players, 1, -1 do + table.insert(reversed_quest_players, quest_players[i]); + end + quest_players = reversed_quest_players; + elseif config.current_config.damage_meter_UI.sorting.type == "Damage" then + if config.current_config.damage_meter_UI.sorting.reversed_order then + table.sort(quest_players, function(left, right) + return left.display.total_damage < right.display.total_damage; + end); + else + table.sort(quest_players, function(left, right) + return left.display.total_damage > right.display.total_damage; + end); + end + end + + if config.current_config.damage_meter_UI.settings.my_damage_bar_location == "First" then + table.insert(quest_players, 1, player.list[player.myself_id]); + elseif config.current_config.damage_meter_UI.settings.my_damage_bar_location == "Last" then + table.insert(quest_players, #quest_players + 1, player.list[player.myself_id]); + elseif #quest_players == 0 then + table.insert(quest_players, 1, player.list[player.myself_id]); + end + + damage_meter_UI.last_displayed_players = quest_players; + end + + local top_damage = 0; + for _, _player in ipairs(quest_players) do + if _player.display.total_damage > top_damage then + top_damage = _player.display.total_damage; + end + end + + -- draw + local position_on_screen = screen.calculate_absolute_coordinates(config.current_config.damage_meter_UI.position); + for _, _player in ipairs(quest_players) do + + if _player.display.total_damage == 0 and config.current_config.damage_meter_UI.settings.hide_player_if_player_damage_is_zero then + goto continue1 + end + + player.draw(_player, position_on_screen, 1, top_damage); + + if config.current_config.damage_meter_UI.settings.orientation == "Horizontal" then + position_on_screen.x = position_on_screen.x + config.current_config.damage_meter_UI.spacing.x; + else + position_on_screen.y = position_on_screen.y + config.current_config.damage_meter_UI.spacing.y; + end + + ::continue1:: + + end + + -- draw total damage + if not config.current_config.damage_meter_UI.settings.total_damage_offset_is_relative then + position_on_screen = screen.calculate_absolute_coordinates(config.current_config.damage_meter_UI.position); + end + + drawing.draw_label(config.current_config.damage_meter_UI.total_damage_label, position_on_screen, 1); + drawing.draw_label(config.current_config.damage_meter_UI.total_damage_value_label, position_on_screen, 1, player.total.display.total_damage); + +end + +function damage_meter_UI.init_module() + singletons = require("MHR_Overlay.Game_Handler.singletons"); + config = require("MHR_Overlay.Misc.config"); + customization_menu = require("MHR_Overlay.UI.customization_menu"); + player = require("MHR_Overlay.Damage_Meter.player"); + quest_status = require("MHR_Overlay.Game_Handler.quest_status"); + screen = require("MHR_Overlay.Game_Handler.screen"); + drawing = require("MHR_Overlay.UI.drawing"); +end + +return damage_meter_UI; \ No newline at end of file diff --git a/MHR_Overlay/UI/Modules/large_monster_UI.lua b/MHR_Overlay/UI/Modules/large_monster_UI.lua new file mode 100644 index 0000000..77bcfe4 --- /dev/null +++ b/MHR_Overlay/UI/Modules/large_monster_UI.lua @@ -0,0 +1,148 @@ +local large_monster_UI = {}; +local singletons; +local config; +local customization_menu; +local large_monster; +local screen; +local player; +local drawing; +local table_helpers; +local health_UI_entity; +local stamina_UI_entity; +local rage_UI_entity; + +function large_monster_UI.draw() + if singletons.enemy_manager == nil then + return; + end + + local displayed_monsters = {}; + + local enemy_count = singletons.enemy_manager:call("getBossEnemyCount"); + if enemy_count == nil then + return; + end + + for i = 0, enemy_count - 1 do + local enemy = singletons.enemy_manager:call("getBossEnemy", i); + if enemy == nil then + customization_menu.status = "No enemy"; + break + end + + local monster = large_monster.list[enemy]; + if monster == nil then + customization_menu.status = "No monster hp entry"; + break + end + + table.insert(displayed_monsters, monster); + end + + if config.current_config.large_monster_UI.dynamic.enabled then + local i = 0; + for _, monster in ipairs(displayed_monsters) do + + if config.current_config.large_monster_UI.dynamic.settings.max_distance == 0 then + break; + end + + local position_on_screen = {}; + + local world_offset = Vector3f.new(config.current_config.large_monster_UI.dynamic.world_offset.x, config.current_config.large_monster_UI.dynamic.world_offset.y, config.current_config.large_monster_UI.dynamic.world_offset.z); + + position_on_screen = draw.world_to_screen(monster.position + world_offset); + + if position_on_screen == nil then + goto continue; + end + + position_on_screen.x = position_on_screen.x + config.current_config.large_monster_UI.dynamic.viewport_offset.x; + position_on_screen.y = position_on_screen.y + config.current_config.large_monster_UI.dynamic.viewport_offset.y; + + local opacity_scale = 1; + local distance = (player.myself_position - monster.position):length(); + if distance > config.current_config.large_monster_UI.dynamic.settings.max_distance then + goto continue; + end + + if config.current_config.large_monster_UI.dynamic.settings.opacity_falloff then + opacity_scale = 1 - (distance / config.current_config.large_monster_UI.dynamic.settings.max_distance); + end + + large_monster.draw_dynamic(monster, position_on_screen, opacity_scale); + + i = i + 1; + ::continue:: + end + end + + if config.current_config.large_monster_UI.static.enabled then + -- sort here + if config.current_config.large_monster_UI.static.sorting.type == "Normal" and config.current_config.large_monster_UI.static.sorting.reversed_order then + local reversed_monsters = {}; + for i = #displayed_monsters, 1, -1 do + table.insert(reversed_monsters, displayed_monsters[i]); + end + + displayed_monsters = reversed_monsters; + + elseif config.current_config.large_monster_UI.static.sorting.type == "Health" then + if config.current_config.large_monster_UI.static.sorting.reversed_order then + table.sort(displayed_monsters, function(left, right) + return left.health > right.health; + end); + else + table.sort(displayed_monsters, function(left, right) + return left.health < right.health; + end); + end + elseif config.current_config.large_monster_UI.static.sorting.type == "Health Percentage" then + if config.current_config.large_monster_UI.static.sorting.reversed_order then + table.sort(displayed_monsters, function(left, right) + return left.health_percentage > right.health_percentage; + end); + else + table.sort(displayed_monsters, function(left, right) + return left.health_percentage < right.health_percentage; + end); + end + end + + local position_on_screen = screen.calculate_absolute_coordinates(config.current_config.large_monster_UI.static.position); + + local i = 0; + for _, monster in ipairs(displayed_monsters) do + local monster_position_on_screen = { + x = position_on_screen.x, + y = position_on_screen.y + } + + if config.current_config.large_monster_UI.static.settings.orientation == "Horizontal" then + monster_position_on_screen.x = monster_position_on_screen.x + config.current_config.large_monster_UI.static.spacing.x * i; + else + monster_position_on_screen.y = monster_position_on_screen.y + config.current_config.large_monster_UI.static.spacing.y * i; + end + + large_monster.draw_static(monster, monster_position_on_screen, 1); + + i = i + 1; + end + end +end + +function large_monster_UI.init_module() + singletons = require("MHR_Overlay.Game_Handler.singletons"); + config = require("MHR_Overlay.Misc.config"); + customization_menu = require("MHR_Overlay.UI.customization_menu"); + large_monster = require("MHR_Overlay.Monsters.large_monster"); + screen = require("MHR_Overlay.Game_Handler.screen"); + player = require("MHR_Overlay.Damage_Meter.player"); + drawing = require("MHR_Overlay.UI.drawing"); + table_helpers = require("MHR_Overlay.Misc.table_helpers"); + health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity"); + stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity"); + rage_UI_entity = require("MHR_Overlay.UI.UI_Entities.rage_UI_entity"); +end + +return large_monster_UI; \ No newline at end of file diff --git a/MHR_Overlay/UI/Modules/small_monster_UI.lua b/MHR_Overlay/UI/Modules/small_monster_UI.lua new file mode 100644 index 0000000..4ab524a --- /dev/null +++ b/MHR_Overlay/UI/Modules/small_monster_UI.lua @@ -0,0 +1,140 @@ +local small_monster_UI = {}; +local singletons; +local config; +local small_monster; +local customization_menu; +local screen; +local player; +local drawing; +local table_helpers; +local health_UI_entity; +local stamina_UI_entity; + +function small_monster_UI.draw() + if singletons.enemy_manager == nil then + return; + end + + local displayed_monsters = {}; + + local enemy_count = singletons.enemy_manager:call("getZakoEnemyCount"); + if enemy_count == nil then + customization_menu.status = "No enemy count"; + return; + end + + for i = 0, enemy_count - 1 do + local enemy = singletons.enemy_manager:call("getZakoEnemy", i); + if enemy == nil then + customization_menu.status = "No enemy"; + break + end + + local monster = small_monster.list[enemy]; + if monster == nil then + customization_menu.status = "No monster hp entry"; + break + end + + table.insert(displayed_monsters, monster); + end + + if not config.current_config.small_monster_UI.dynamic_positioning.enabled then + -- sort here + + if config.current_config.small_monster_UI.static_sorting.type == "Normal" and config.current_config.small_monster_UI.static_sorting.reversed_order then + local reversed_monsters = {}; + for i = #displayed_monsters, 1, -1 do + table.insert(reversed_monsters, displayed_monsters[i]); + end + displayed_monsters = reversed_monsters; + + elseif config.current_config.small_monster_UI.static_sorting.type == "Health" then + if config.current_config.small_monster_UI.static_sorting.reversed_order then + table.sort(displayed_monsters, function(left, right) + return left.health > right.health; + end); + else + table.sort(displayed_monsters, function(left, right) + return left.health < right.health; + end); + end + + elseif config.current_config.small_monster_UI.static_sorting.type == "Health Percentage" then + if config.current_config.small_monster_UI.static_sorting.reversed_order then + table.sort(displayed_monsters, function(left, right) + return left.health_percentage > right.health_percentage; + end); + else + table.sort(displayed_monsters, function(left, right) + return left.health_percentage < right.health_percentage; + end); + end + end + end + + local i = 0; + for _, monster in ipairs(displayed_monsters) do + local position_on_screen; + + if config.current_config.small_monster_UI.dynamic_positioning.enabled then + local world_offset = Vector3f.new(config.current_config.small_monster_UI.dynamic_positioning.world_offset.x, config.current_config.small_monster_UI.dynamic_positioning.world_offset.y, config.current_config.small_monster_UI.dynamic_positioning.world_offset.z); + + position_on_screen = draw.world_to_screen(monster.position + world_offset); + + if position_on_screen == nil then + goto continue + end + + position_on_screen.x = position_on_screen.x + config.current_config.small_monster_UI.dynamic_positioning.viewport_offset.x; + position_on_screen.y = position_on_screen.y + config.current_config.small_monster_UI.dynamic_positioning.viewport_offset.y; + else + position_on_screen = screen.calculate_absolute_coordinates(config.current_config.small_monster_UI.static_position); + if config.current_config.small_monster_UI.settings.orientation == "Horizontal" then + position_on_screen.x = position_on_screen.x + config.current_config.small_monster_UI.static_spacing.x * i; + + else + position_on_screen.y = position_on_screen.y + config.current_config.small_monster_UI.static_spacing.y * i; + end + end + + + local opacity_scale = 1; + if config.current_config.small_monster_UI.dynamic_positioning.enabled then + if config.current_config.small_monster_UI.dynamic_positioning.max_distance == 0 then + return; + end + + local distance = (player.myself_position - monster.position):length(); + + if distance > config.current_config.small_monster_UI.dynamic_positioning.max_distance then + goto continue; + end + + if config.current_config.small_monster_UI.dynamic_positioning.opacity_falloff then + opacity_scale = 1 - (distance / config.current_config.small_monster_UI.dynamic_positioning.max_distance); + end + end + + + small_monster.draw(monster, position_on_screen, opacity_scale); + + i = i + 1; + ::continue:: + end +end + +function small_monster_UI.init_module() + singletons = require("MHR_Overlay.Game_Handler.singletons"); + config = require("MHR_Overlay.Misc.config"); + customization_menu = require("MHR_Overlay.UI.customization_menu"); + small_monster = require("MHR_Overlay.Monsters.small_monster"); + screen = require("MHR_Overlay.Game_Handler.screen"); + player = require("MHR_Overlay.Damage_Meter.player"); + drawing = require("MHR_Overlay.UI.drawing"); + table_helpers = require("MHR_Overlay.Misc.table_helpers"); + health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity"); + stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity"); +end + +return small_monster_UI; \ No newline at end of file diff --git a/MHR_Overlay/UI/Modules/time_UI.lua b/MHR_Overlay/UI/Modules/time_UI.lua new file mode 100644 index 0000000..e07b6b6 --- /dev/null +++ b/MHR_Overlay/UI/Modules/time_UI.lua @@ -0,0 +1,46 @@ +local time_UI = {}; +local singletons; +local customization_menu; +local screen; +local config; +local drawing; + +function time_UI.draw() + if singletons.quest_manager == nil then + return; + end + + + + local quest_time_elapsed_minutes = singletons.quest_manager:call("getQuestElapsedTimeMin"); + if quest_time_elapsed_minutes == nil then + customization_menu.status = "No quest time elapsed minutes"; + return; + end + + local quest_time_total_elapsed_seconds = singletons.quest_manager:call("getQuestElapsedTimeSec"); + if quest_time_total_elapsed_seconds == nil then + customization_menu.status = "No quest time total elapsed seconds"; + return; + end + + if quest_time_total_elapsed_seconds == 0 then + return; + end + + local quest_time_elapsed_seconds = quest_time_total_elapsed_seconds - quest_time_elapsed_minutes * 60; + + local position_on_screen = screen.calculate_absolute_coordinates(config.current_config.time_UI.position); + + drawing.draw_label(config.current_config.time_UI.time_label, position_on_screen, 1, quest_time_elapsed_minutes, quest_time_elapsed_seconds); +end + +function time_UI.init_module() + singletons = require("MHR_Overlay.Game_Handler.singletons"); + customization_menu = require("MHR_Overlay.UI.customization_menu"); + screen = require("MHR_Overlay.Game_Handler.screen"); + config = require("MHR_Overlay.Misc.config"); + drawing = require("MHR_Overlay.UI.drawing"); +end + +return time_UI; \ No newline at end of file diff --git a/MHR_Overlay/UI/UI_Entities/body_part_UI_entity.lua b/MHR_Overlay/UI/UI_Entities/body_part_UI_entity.lua new file mode 100644 index 0000000..f71a721 --- /dev/null +++ b/MHR_Overlay/UI/UI_Entities/body_part_UI_entity.lua @@ -0,0 +1,60 @@ +local body_part_UI_entity = {}; +local config; +local table_helpers; +local drawing; + +function body_part_UI_entity.new(bar, name_label, text_label, value_label, percentage_label) + local entity = {}; + + entity.bar = table_helpers.deep_copy(bar); + entity.name_label = table_helpers.deep_copy(name_label); + entity.text_label = table_helpers.deep_copy(text_label); + entity.value_label = table_helpers.deep_copy(value_label); + entity.percentage_label = table_helpers.deep_copy(percentage_label); + + return entity; +end + +function body_part_UI_entity.draw_dynamic(part, position_on_screen, opacity_scale) + + local part_name = ""; + if config.current_config.large_monster_UI.dynamic.parts.part_name_label.include.part_name then + part_name = part.name .. " "; + end + if config.current_config.large_monster_UI.dynamic.parts.part_name_label.include.break_count and part.break_count ~= 0 then + part_name = part_name .. "x" .. tostring(part.break_count); + end + + drawing.draw_bar(part.body_part_dynamic_UI.bar, position_on_screen, opacity_scale, part.health_percentage); + + drawing.draw_label(part.body_part_dynamic_UI.name_label, position_on_screen, opacity_scale, part_name); + drawing.draw_label(part.body_part_dynamic_UI.text_label, position_on_screen, opacity_scale); + drawing.draw_label(part.body_part_dynamic_UI.value_label, position_on_screen, opacity_scale, part.health, part.max_health); + drawing.draw_label(part.body_part_dynamic_UI.percentage_label, position_on_screen, opacity_scale, 100 * part.health_percentage); +end + +function body_part_UI_entity.draw_static(part, position_on_screen, opacity_scale) + + local part_name = ""; + if config.current_config.large_monster_UI.static.parts.part_name_label.include.part_name then + part_name = part.name .. " "; + end + if config.current_config.large_monster_UI.static.parts.part_name_label.include.break_count and part.break_count ~= 0 then + part_name = part_name .. "x" .. tostring(part.break_count); + end + + drawing.draw_bar(part.body_part_static_UI.bar, position_on_screen, opacity_scale, part.health_percentage); + + drawing.draw_label(part.body_part_static_UI.name_label, position_on_screen, opacity_scale, part_name); + drawing.draw_label(part.body_part_static_UI.text_label, position_on_screen, opacity_scale); + drawing.draw_label(part.body_part_static_UI.value_label, position_on_screen, opacity_scale, part.health, part.max_health); + drawing.draw_label(part.body_part_static_UI.percentage_label, position_on_screen, opacity_scale, 100 * part.health_percentage); +end + +function body_part_UI_entity.init_module() + table_helpers = require("MHR_Overlay.Misc.table_helpers"); + drawing = require("MHR_Overlay.UI.drawing"); + config = require("MHR_Overlay.Misc.config"); +end + +return body_part_UI_entity; \ No newline at end of file diff --git a/MHR_Overlay/UI/UI_Entities/damage_UI_entity.lua b/MHR_Overlay/UI/UI_Entities/damage_UI_entity.lua new file mode 100644 index 0000000..df99709 --- /dev/null +++ b/MHR_Overlay/UI/UI_Entities/damage_UI_entity.lua @@ -0,0 +1,78 @@ +local damage_UI_entity = {}; +local table_helpers; +local drawing; +local config; +local player; + +function damage_UI_entity.new(bar, highlighted_bar, player_name_label, value_label, percentage_label) + local entity = {}; + + entity.bar = table_helpers.deep_copy(bar); + entity.highlighted_bar = table_helpers.deep_copy(highlighted_bar); + entity.player_name_label = table_helpers.deep_copy(player_name_label); + entity.value_label = table_helpers.deep_copy(value_label); + entity.percentage_label = table_helpers.deep_copy(percentage_label); + + return entity; +end + +function damage_UI_entity.draw(_player, position_on_screen, opacity_scale, top_damage) + local player_include = config.current_config.damage_meter_UI.player_name_label.include.others; + if _player.id == _player.myself_id then + player_include = config.current_config.damage_meter_UI.player_name_label.include.myself; + end + + local player_name_text = ""; + if player_include.hunter_rank then + player_name_text = string.format("[%d] ", _player.hunter_rank); + end + + if player_include.word_player then + player_name_text = player_name_text .. "Player "; + end + + if player_include.player_id then + player_name_text = player_name_text .. string.format("%d ", _player.id); + end + + if player_include.player_name then + player_name_text = player_name_text .. _player.name; + end + + local player_damage_percentage = 0; + if player.total.display.total_damage ~= 0 then + player_damage_percentage = _player.display.total_damage / player.total.display.total_damage; + end + + local player_damage_bar_percentage = 0; + if config.current_config.damage_meter_UI.settings.damage_bar_relative_to == "Total Damage" then + if _player.total.display.total_damage ~= 0 then + player_damage_bar_percentage = _player.display.total_damage / player.total.display.total_damage; + end + else + if top_damage ~= 0 then + player_damage_bar_percentage = _player.display.total_damage / top_damage; + end + end + + if _player.id == player.myself_id and config.current_config.damage_meter_UI.settings.highlighted_bar == "Me" then + drawing.draw_bar(_player.damage_UI.highlighted_bar, position_on_screen, opacity_scale, player_damage_bar_percentage); + elseif config.current_config.damage_meter_UI.settings.highlighted_bar == "Top Damage" and _player.display.total_damage == top_damage then + drawing.draw_bar(_player.damage_UI.highlighted_bar, position_on_screen, opacity_scale, player_damage_bar_percentage); + else + drawing.draw_bar(_player.damage_UI.bar, position_on_screen, opacity_scale, player_damage_bar_percentage); + end + + drawing.draw_label(_player.damage_UI.player_name_label, position_on_screen, opacity_scale, player_name_text); + drawing.draw_label(_player.damage_UI.value_label, position_on_screen, opacity_scale, _player.display.total_damage); + drawing.draw_label(_player.damage_UI.percentage_label, position_on_screen, opacity_scale, 100 * player_damage_percentage); +end + +function damage_UI_entity.init_module() + table_helpers = require("MHR_Overlay.Misc.table_helpers"); + drawing = require("MHR_Overlay.UI.drawing"); + config = require("MHR_Overlay.Misc.config"); + player = require("MHR_Overlay.Damage_Meter.player"); +end + +return damage_UI_entity; \ No newline at end of file diff --git a/MHR_Overlay/UI/UI_Entities/health_UI_entity.lua b/MHR_Overlay/UI/UI_Entities/health_UI_entity.lua new file mode 100644 index 0000000..8af44bf --- /dev/null +++ b/MHR_Overlay/UI/UI_Entities/health_UI_entity.lua @@ -0,0 +1,30 @@ +local health_UI_entity = {}; +local table_helpers; +local drawing; + +function health_UI_entity.new(bar, text_label, value_label, percentage_label) + local entity = {}; + + entity.bar = table_helpers.deep_copy(bar); + entity.text_label = table_helpers.deep_copy(text_label); + entity.value_label = table_helpers.deep_copy(value_label); + entity.percentage_label = table_helpers.deep_copy(percentage_label); + + return entity; +end + +function health_UI_entity.draw(monster, health_UI, position_on_screen, opacity_scale) + + drawing.draw_bar(health_UI.bar, position_on_screen, opacity_scale, monster.health_percentage); + + drawing.draw_label(health_UI.text_label, position_on_screen, opacity_scale); + drawing.draw_label(health_UI.value_label, position_on_screen, opacity_scale, monster.health, monster.max_health); + drawing.draw_label(health_UI.percentage_label, position_on_screen, opacity_scale, 100 * monster.health_percentage); +end + +function health_UI_entity.init_module() + table_helpers = require("MHR_Overlay.Misc.table_helpers"); + drawing = require("MHR_Overlay.UI.drawing"); +end + +return health_UI_entity; \ No newline at end of file diff --git a/MHR_Overlay/UI/UI_Entities/rage_UI_entity.lua b/MHR_Overlay/UI/UI_Entities/rage_UI_entity.lua new file mode 100644 index 0000000..a638e2c --- /dev/null +++ b/MHR_Overlay/UI/UI_Entities/rage_UI_entity.lua @@ -0,0 +1,39 @@ +local rage_UI_entity = {}; +local table_helpers; +local drawing; + +function rage_UI_entity.new(bar, text_label, value_label, percentage_label) + local entity = {}; + + entity.bar = table_helpers.deep_copy(bar); + entity.text_label = table_helpers.deep_copy(text_label); + entity.value_label = table_helpers.deep_copy(value_label); + entity.percentage_label = table_helpers.deep_copy(percentage_label); + entity.timer_label = table_helpers.deep_copy(percentage_label); + + entity.timer_label.text = "%.0f:%04.1f"; + return entity; +end + +function rage_UI_entity.draw(monster, rage_UI, position_on_screen, opacity_scale) + if monster.is_in_rage then + drawing.draw_bar(rage_UI.bar, position_on_screen, opacity_scale, monster.rage_timer_percentage); + + drawing.draw_label(rage_UI.text_label, position_on_screen, opacity_scale); + drawing.draw_label(rage_UI.value_label, position_on_screen, opacity_scale, monster.rage_point, monster.rage_limit); + drawing.draw_label(rage_UI.timer_label, position_on_screen, opacity_scale, monster.rage_minutes_left, monster.rage_seconds_left); + else + drawing.draw_bar(rage_UI.bar, position_on_screen, opacity_scale, monster.rage_percentage); + + drawing.draw_label(rage_UI.text_label, position_on_screen, opacity_scale); + drawing.draw_label(rage_UI.value_label, position_on_screen, opacity_scale, monster.rage_point, monster.rage_limit); + drawing.draw_label(rage_UI.percentage_label, position_on_screen, opacity_scale, 100 * monster.rage_percentage); + end +end + +function rage_UI_entity.init_module() + table_helpers = require("MHR_Overlay.Misc.table_helpers"); + drawing = require("MHR_Overlay.UI.drawing"); +end + +return rage_UI_entity; \ No newline at end of file diff --git a/MHR_Overlay/UI/UI_Entities/stamina_UI_entity.lua b/MHR_Overlay/UI/UI_Entities/stamina_UI_entity.lua new file mode 100644 index 0000000..fe470e0 --- /dev/null +++ b/MHR_Overlay/UI/UI_Entities/stamina_UI_entity.lua @@ -0,0 +1,29 @@ +local stamina_UI_entity = {}; +local table_helpers; +local drawing; + +function stamina_UI_entity.new(bar, text_label, value_label, percentage_label) + local entity = {}; + + entity.bar = table_helpers.deep_copy(bar); + entity.text_label = table_helpers.deep_copy(text_label); + entity.value_label = table_helpers.deep_copy(value_label); + entity.percentage_label = table_helpers.deep_copy(percentage_label); + + return entity; +end + +function stamina_UI_entity.draw(monster, stamina_UI, position_on_screen, opacity_scale) + drawing.draw_bar(stamina_UI.bar, position_on_screen, opacity_scale, monster.stamina_percentage); + + drawing.draw_label(stamina_UI.text_label, position_on_screen, opacity_scale); + drawing.draw_label(stamina_UI.value_label, position_on_screen, opacity_scale, monster.stamina, monster.max_stamina); + drawing.draw_label(stamina_UI.percentage_label, position_on_screen, opacity_scale, 100 * monster.stamina_percentage); +end + +function stamina_UI_entity.init_module() + table_helpers = require("MHR_Overlay.Misc.table_helpers"); + drawing = require("MHR_Overlay.UI.drawing"); +end + +return stamina_UI_entity; \ No newline at end of file diff --git a/MHR_Overlay/UI/customization_menu.lua b/MHR_Overlay/UI/customization_menu.lua index 7bafb7c..dc2cac9 100644 --- a/MHR_Overlay/UI/customization_menu.lua +++ b/MHR_Overlay/UI/customization_menu.lua @@ -4,6 +4,8 @@ local table_helpers; local config; local screen; local player; +local large_monster; +local small_monster; customization_menu.is_opened = false; customization_menu.status = "OK"; @@ -11,6 +13,7 @@ customization_menu.window_flags = 0x10120; customization_menu.color_picker_flags = 327680; customization_menu.orientation_types = {"Horizontal", "Vertical"}; +customization_menu.anchor_types = {"Top-left", "Top-Right", "Bottom-Left", "Bottom-Right"}; customization_menu.monster_UI_sorting_types = {"Normal", "Health", "Health Percentage"}; @@ -19,15 +22,17 @@ customization_menu.damage_meter_UI_damage_bar_relative_types = {"Total Damage", customization_menu.damage_meter_UI_my_damage_bar_location_types = {"Normal", "First", "Last"}; customization_menu.damage_meter_UI_sorting_types = {"Normal", "Damage"}; -customization_menu.fonts = {"Arial", "Arial Black", "Bahnschrift", "Calibri", "Cambria", "Cambria Math", "Candara", "Comic Sans MS", -"Consolas", "Constantia", "Corbel", "Courier New", "Ebrima", "Franklin Gothic Medium", "Gabriola", "Gadugi", -"Georgia", "HoloLens MDL2 Assets", "Impact", "Ink Free", "Javanese Text", "Leelawadee UI", "Lucida Console", -"Lucida Sans Unicode", "Malgun Gothic", "Marlett", "Microsoft Himalaya", "Microsoft JhengHei", -"Microsoft New Tai Lue", "Microsoft PhagsPa", "Microsoft Sans Serif", "Microsoft Tai Le", "Microsoft YaHei", -"Microsoft Yi Baiti", "MingLiU-ExtB", "Mongolian Baiti", "MS Gothic", "MV Boli", "Myanmar Text", "Nirmala UI", -"Palatino Linotype", "Segoe MDL2 Assets", "Segoe Print", "Segoe Script", "Segoe UI", "Segoe UI Historic", -"Segoe UI Emoji", "Segoe UI Symbol", "SimSun", "Sitka", "Sylfaen", "Symbol", "Tahoma", "Times New Roman", -"Trebuchet MS", "Verdana", "Webdings", "Wingdings", "Yu Gothic"}; +customization_menu.fonts = {"Arial", "Arial Black", "Bahnschrift", "Calibri", "Cambria", "Cambria Math", "Candara", + "Comic Sans MS", "Consolas", "Constantia", "Corbel", "Courier New", "Ebrima", + "Franklin Gothic Medium", "Gabriola", "Gadugi", "Georgia", "HoloLens MDL2 Assets", "Impact", + "Ink Free", "Javanese Text", "Leelawadee UI", "Lucida Console", "Lucida Sans Unicode", + "Malgun Gothic", "Marlett", "Microsoft Himalaya", "Microsoft JhengHei", + "Microsoft New Tai Lue", "Microsoft PhagsPa", "Microsoft Sans Serif", "Microsoft Tai Le", + "Microsoft YaHei", "Microsoft Yi Baiti", "MingLiU-ExtB", "Mongolian Baiti", "MS Gothic", + "MV Boli", "Myanmar Text", "Nirmala UI", "Palatino Linotype", "Segoe MDL2 Assets", + "Segoe Print", "Segoe Script", "Segoe UI", "Segoe UI Historic", "Segoe UI Emoji", + "Segoe UI Symbol", "SimSun", "Sitka", "Sylfaen", "Symbol", "Tahoma", "Times New Roman", + "Trebuchet MS", "Verdana", "Webdings", "Wingdings", "Yu Gothic"}; customization_menu.monster_UI_orientation_index = 0; customization_menu.monster_UI_sorting_type_index = 0; @@ -41,31 +46,38 @@ customization_menu.damage_meter_UI_my_damage_bar_location_index = 0; customization_menu.selected_font_index = 9; function customization_menu.init() - customization_menu.monster_UI_orientation_index = table_helpers.find_index(customization_menu.orientation_types, config.current_config.large_monster_UI.settings.orientation, false); + customization_menu.monster_UI_orientation_index = table_helpers.find_index(customization_menu.orientation_types, + config.current_config.large_monster_UI.static.settings.orientation, false); - customization_menu.monster_UI_sorting_type_index = table_helpers.find_index(customization_menu.monster_UI_sorting_types, config.current_config.large_monster_UI.sorting.type, false); + customization_menu.monster_UI_sorting_type_index = table_helpers.find_index( + customization_menu.monster_UI_sorting_types, config.current_config.large_monster_UI.static.sorting.type, false); - customization_menu.damage_meter_UI_orientation_index = table_helpers.find_index(customization_menu.orientation_types, config.current_config.damage_meter_UI.settings.orientation, - false); + customization_menu.damage_meter_UI_orientation_index = table_helpers.find_index(customization_menu.orientation_types, + config.current_config.damage_meter_UI.settings.orientation, false); - customization_menu.damage_meter_UI_highlighted_bar_index = table_helpers.find_index(customization_menu.damage_meter_UI_highlighted_bar_types, - config.current_config.damage_meter_UI.settings.highlighted_bar, false); + customization_menu.damage_meter_UI_highlighted_bar_index = table_helpers.find_index( + customization_menu.damage_meter_UI_highlighted_bar_types, + config.current_config.damage_meter_UI.settings.highlighted_bar, false); - customization_menu.damage_meter_UI_damage_bar_relative_index = table_helpers.find_index(customization_menu.damage_meter_UI_damage_bar_relative_types, - config.current_config.damage_meter_UI.settings.damage_bar_relative_to, false); + customization_menu.damage_meter_UI_damage_bar_relative_index = table_helpers.find_index( + customization_menu.damage_meter_UI_damage_bar_relative_types, + config.current_config.damage_meter_UI.settings.damage_bar_relative_to, false); - customization_menu.damage_meter_UI_my_damage_bar_location_index = table_helpers.find_index(customization_menu.damage_meter_UI_my_damage_bar_location_types, - config.current_config.damage_meter_UI.settings.my_damage_bar_location, false); + customization_menu.damage_meter_UI_my_damage_bar_location_index = table_helpers.find_index( + customization_menu.damage_meter_UI_my_damage_bar_location_types, + config.current_config.damage_meter_UI.settings.my_damage_bar_location, false); - customization_menu.damage_meter_UI_sorting_type_index = table_helpers.find_index(customization_menu.damage_meter_UI_sorting_types, config.current_config.damage_meter_UI.sorting.type, - false); + customization_menu.damage_meter_UI_sorting_type_index = table_helpers.find_index( + customization_menu.damage_meter_UI_sorting_types, config.current_config.damage_meter_UI.sorting.type, false); - customization_menu.selected_font_index = table_helpers.find_index(customization_menu.fonts, config.current_config.global_settings.font.family, false); + customization_menu.selected_font_index = table_helpers.find_index(customization_menu.fonts, + config.current_config.global_settings.font.family, false); end function customization_menu.draw() - customization_menu.is_opened = imgui.begin_window("MHR Overlay " .. config.current_config.version, customization_menu.is_opened, customization_menu.window_flags); - + customization_menu.is_opened = imgui.begin_window("MHR Overlay " .. config.current_config.version, + customization_menu.is_opened, customization_menu.window_flags); + if not customization_menu.is_opened then return; end @@ -76,18 +88,25 @@ function customization_menu.draw() imgui.text("Status: " .. status_string); if imgui.tree_node("Modules") then - changed, config.current_config.small_monster_UI.enabled = imgui.checkbox("Small Monster UI", config.current_config.small_monster_UI.enabled); + changed, config.current_config.small_monster_UI.enabled = imgui.checkbox("Small Monster UI", config.current_config + .small_monster_UI.enabled); config_changed = config_changed or changed; imgui.same_line(); - changed, config.current_config.large_monster_UI.enabled = imgui.checkbox("Large Monster UI", config.current_config.large_monster_UI.enabled); + changed, config.current_config.large_monster_UI.static.enabled = + imgui.checkbox("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.static.enabled = + imgui.checkbox("Large Monster Dynamic UI", config.current_config.large_monster_UI.static.enabled); config_changed = config_changed or changed; changed, config.current_config.time_UI.enabled = imgui.checkbox("Time UI", config.current_config.time_UI.enabled); config_changed = config_changed or changed; imgui.same_line(); - changed, config.current_config.damage_meter_UI.enabled = imgui.checkbox("Damage Meter UI", config.current_config.damage_meter_UI.enabled); + changed, config.current_config.damage_meter_UI.enabled = imgui.checkbox("Damage Meter UI", + config.current_config.damage_meter_UI.enabled); config_changed = config_changed or changed; imgui.tree_pop(); @@ -95,42 +114,51 @@ function customization_menu.draw() if imgui.tree_node("Global Settings") then if imgui.tree_node("Module Visibility on Different Screens") then - + if imgui.tree_node("During Quest") then - changed, config.current_config.global_settings.module_visibility.during_quest.small_monster_UI = imgui.checkbox("Small Monster UI", config.current_config.global_settings.module_visibility.during_quest.small_monster_UI); + changed, config.current_config.global_settings.module_visibility.during_quest.small_monster_UI = imgui.checkbox( + "Small Monster UI", config.current_config.global_settings.module_visibility.during_quest.small_monster_UI); config_changed = config_changed or changed; imgui.same_line(); - changed, config.current_config.global_settings.module_visibility.during_quest.large_monster_UI = imgui.checkbox("Large Monster UI", config.current_config.global_settings.module_visibility.during_quest.large_monster_UI); + changed, config.current_config.global_settings.module_visibility.during_quest.large_monster_UI = imgui.checkbox( + "Large Monster UI", config.current_config.global_settings.module_visibility.during_quest.large_monster_UI); config_changed = config_changed or changed; - changed, config.current_config.global_settings.module_visibility.during_quest.time_UI = imgui.checkbox("Time UI", config.current_config.global_settings.module_visibility.during_quest.time_UI); + changed, config.current_config.global_settings.module_visibility.during_quest.time_UI = imgui.checkbox("Time UI", + config.current_config.global_settings.module_visibility.during_quest.time_UI); config_changed = config_changed or changed; imgui.same_line(); - changed, config.current_config.global_settings.module_visibility.during_quest.damage_meter_UI = imgui.checkbox("Damage Meter UI", config.current_config.global_settings.module_visibility.during_quest.damage_meter_UI); + changed, config.current_config.global_settings.module_visibility.during_quest.damage_meter_UI = imgui.checkbox( + "Damage Meter UI", config.current_config.global_settings.module_visibility.during_quest.damage_meter_UI); config_changed = config_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Quest Summary Screen") then - changed, config.current_config.global_settings.module_visibility.quest_summary_screen.time_UI = imgui.checkbox("Time UI", config.current_config.global_settings.module_visibility.quest_summary_screen.time_UI); + changed, config.current_config.global_settings.module_visibility.quest_summary_screen.time_UI = imgui.checkbox( + "Time UI", config.current_config.global_settings.module_visibility.quest_summary_screen.time_UI); config_changed = config_changed or changed; imgui.same_line(); - changed, config.current_config.global_settings.module_visibility.quest_summary_screen.damage_meter_UI = imgui.checkbox("Damage Meter UI", config.current_config.global_settings.module_visibility.quest_summary_screen.damage_meter_UI); + changed, config.current_config.global_settings.module_visibility.quest_summary_screen.damage_meter_UI = + imgui.checkbox("Damage Meter UI", + config.current_config.global_settings.module_visibility.quest_summary_screen.damage_meter_UI); config_changed = config_changed or changed; imgui.tree_pop(); end - + if imgui.tree_node("Training Area") then - changed, config.current_config.global_settings.module_visibility.training_area.large_monster_UI = imgui.checkbox("Large Monster UI", config.current_config.global_settings.module_visibility.training_area.large_monster_UI); + changed, config.current_config.global_settings.module_visibility.training_area.large_monster_UI = imgui.checkbox( + "Large Monster UI", config.current_config.global_settings.module_visibility.training_area.large_monster_UI); config_changed = config_changed or changed; imgui.same_line(); - - changed, config.current_config.global_settings.module_visibility.training_area.damage_meter_UI = imgui.checkbox("Damage Meter UI", config.current_config.global_settings.module_visibility.training_area.damage_meter_UI); + + changed, config.current_config.global_settings.module_visibility.training_area.damage_meter_UI = imgui.checkbox( + "Damage Meter UI", config.current_config.global_settings.module_visibility.training_area.damage_meter_UI); config_changed = config_changed or changed; imgui.tree_pop(); @@ -141,20 +169,24 @@ function customization_menu.draw() if imgui.tree_node("Font") then imgui.text("Any changes to the font require script reload!"); - - changed, customization_menu.selected_font_index = imgui.combo("Family", customization_menu.selected_font_index, customization_menu.fonts); + + changed, customization_menu.selected_font_index = imgui.combo("Family", customization_menu.selected_font_index, + customization_menu.fonts); config_changed = config_changed or changed; if changed then config.current_config.global_settings.font.family = customization_menu.fonts[customization_menu.selected_font_index]; end - - changed, config.current_config.global_settings.font.size = imgui.slider_int("Size", config.current_config.global_settings.font.size, 1, 100); + + changed, config.current_config.global_settings.font.size = + imgui.slider_int("Size", config.current_config.global_settings.font.size, 1, 100); config_changed = config_changed or changed; - - changed, config.current_config.global_settings.font.bold = imgui.checkbox("Bold", config.current_config.global_settings.font.bold); + + changed, config.current_config.global_settings.font.bold = + imgui.checkbox("Bold", config.current_config.global_settings.font.bold); config_changed = config_changed or changed; - - changed, config.current_config.global_settings.font.italic = imgui.checkbox("Italic", config.current_config.global_settings.font.italic); + + changed, config.current_config.global_settings.font.italic = + imgui.checkbox("Italic", config.current_config.global_settings.font.italic); config_changed = config_changed or changed; imgui.tree_pop(); @@ -164,42 +196,36 @@ function customization_menu.draw() end if imgui.tree_node("Small Monster UI") then - changed, config.current_config.small_monster_UI.enabled = imgui.checkbox("Enabled", config.current_config.small_monster_UI.enabled); + local small_monster_UI_changed = false; + changed, config.current_config.small_monster_UI.enabled = imgui.checkbox("Enabled", config.current_config + .small_monster_UI.enabled); config_changed = config_changed or changed; - if imgui.tree_node("Spacing") then - changed, config.current_config.small_monster_UI.spacing.y = imgui.drag_float("X", - config.current_config.small_monster_UI.spacing.y, 0.1, 0, screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.small_monster_UI.spacing.y = imgui.drag_float("Y", - config.current_config.small_monster_UI.spacing.y, 0.1, 0, screen.width, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - if imgui.tree_node("Settings") then - changed, customization_menu.monster_UI_orientation_index = imgui.combo("Orientation", customization_menu.monster_UI_orientation_index, customization_menu.orientation_types); + changed, customization_menu.monster_UI_orientation_index = imgui.combo("Static Orientation", + customization_menu.monster_UI_orientation_index, customization_menu.orientation_types); config_changed = config_changed or changed; if changed then - config.current_config.small_monster_UI.settings.orientation = customization_menu.orientation_types[customization_menu.monster_UI_orientation_index]; + config.current_config.small_monster_UI.settings.orientation = + customization_menu.orientation_types[customization_menu.monster_UI_orientation_index]; end imgui.tree_pop(); end if imgui.tree_node("Dynamic Positioning") then - changed, config.current_config.small_monster_UI.dynamic_positioning.enabled = - imgui.checkbox("Enabled", config.current_config.small_monster_UI.dynamic_positioning.enabled); + changed, config.current_config.small_monster_UI.dynamic_positioning.enabled = imgui.checkbox("Enabled", + config.current_config.small_monster_UI.dynamic_positioning.enabled); config_changed = config_changed or changed; - changed, config.current_config.small_monster_UI.dynamic_positioning.opacity_falloff = imgui.checkbox("Opacity Falloff", config.current_config.small_monster_UI.dynamic_positioning.opacity_falloff); + changed, config.current_config.small_monster_UI.dynamic_positioning.opacity_falloff = imgui.checkbox( + "Opacity Falloff", config.current_config.small_monster_UI.dynamic_positioning.opacity_falloff); config_changed = config_changed or changed; - changed, config.current_config.small_monster_UI.dynamic_positioning.max_distance = imgui.drag_float("Max Distance", - config.current_config.small_monster_UI.dynamic_positioning.max_distance, 1, 0, 10000, "%.0f"); - config_changed = config_changed or changed; + changed, config.current_config.small_monster_UI.dynamic_positioning.max_distance = + imgui.drag_float("Max Distance", config.current_config.small_monster_UI.dynamic_positioning.max_distance, 1, 0, + 10000, "%.0f"); + config_changed = config_changed or changed; if imgui.tree_node("World Offset") then changed, config.current_config.small_monster_UI.dynamic_positioning.world_offset.x = imgui.drag_float("X", @@ -219,11 +245,13 @@ function customization_menu.draw() if imgui.tree_node("Viewport Offset") then changed, config.current_config.small_monster_UI.dynamic_positioning.viewport_offset.x = imgui.drag_float("X", - config.current_config.small_monster_UI.dynamic_positioning.viewport_offset.x, 0.1, 0, screen.width, "%.1f"); + config.current_config.small_monster_UI.dynamic_positioning.viewport_offset.x, 0.1, -screen.width, screen.width, + "%.1f"); config_changed = config_changed or changed; changed, config.current_config.small_monster_UI.dynamic_positioning.viewport_offset.y = imgui.drag_float("Y", - config.current_config.small_monster_UI.dynamic_positioning.viewport_offset.y, 0.1, 0, screen.height, "%.1f"); + config.current_config.small_monster_UI.dynamic_positioning.viewport_offset.y, 0.1, -screen.height, screen.height, + "%.1f"); config_changed = config_changed or changed; imgui.tree_pop(); @@ -232,55 +260,73 @@ function customization_menu.draw() imgui.tree_pop(); end - if imgui.tree_node("Position") then - changed, config.current_config.small_monster_UI.position.x = imgui.drag_float("X", config.current_config.small_monster_UI.position.x, 0.1, 0, - screen.width, "%.1f"); + if imgui.tree_node("Static Position") then + changed, config.current_config.small_monster_UI.static_position.x = + imgui.drag_float("X", config.current_config.small_monster_UI.static_position.x, 0.1, 0, screen.width, "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.small_monster_UI.position.y = imgui.drag_float("Y", config.current_config.small_monster_UI.position.y, 0.1, 0, - screen.height, "%.1f"); + changed, config.current_config.small_monster_UI.static_position.y = + imgui.drag_float("Y", config.current_config.small_monster_UI.static_position.y, 0.1, 0, screen.height, "%.1f"); config_changed = config_changed or changed; imgui.tree_pop(); end - if imgui.tree_node("Sorting") then - changed, customization_menu.monster_UI_sort_type_index = imgui.combo("Type", customization_menu.monster_UI_sort_type_index, customization_menu.monster_UI_sorting_types); + if imgui.tree_node("Static Spacing") then + changed, config.current_config.small_monster_UI.static_spacing.x = + imgui.drag_float("X", config.current_config.small_monster_UI.static_spacing.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + + changed, config.current_config.small_monster_UI.static_spacing.y = + imgui.drag_float("Y", config.current_config.small_monster_UI.static_spacing.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Static Sorting") then + changed, customization_menu.monster_UI_sort_type_index = imgui.combo("Type", + customization_menu.monster_UI_sort_type_index, customization_menu.monster_UI_sorting_types); config_changed = config_changed or changed; if changed then - config.current_config.small_monster_UI.sorting.type = customization_menu.monster_UI_sorting_types[customization_menu.monster_UI_sort_type_index]; + config.current_config.small_monster_UI.static_sorting.type = + customization_menu.monster_UI_sorting_types[customization_menu.monster_UI_sort_type_index]; end - changed, config.current_config.small_monster_UI.sorting.reversed_order = imgui.checkbox("Reversed Order", - config.current_config.small_monster_UI.sorting.reversed_order); + changed, config.current_config.small_monster_UI.static_sorting.reversed_order = + imgui.checkbox("Reversed Order", config.current_config.small_monster_UI.static_sorting.reversed_order); config_changed = config_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Monster Name Label") then - changed, config.current_config.small_monster_UI.monster_name_label.visibility = - imgui.checkbox("Visible", config.current_config.small_monster_UI.monster_name_label.visibility); + changed, config.current_config.small_monster_UI.monster_name_label.visibility = imgui.checkbox("Visible", + config.current_config.small_monster_UI.monster_name_label.visibility); config_changed = config_changed or changed; + small_monster_UI_changed = small_monster_UI_changed or changed; if imgui.tree_node("Offset") then - changed, config.current_config.small_monster_UI.monster_name_label.offset.x = - imgui.drag_float("X", config.current_config.small_monster_UI.monster_name_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.small_monster_UI.monster_name_label.offset.x = imgui.drag_float("X", + config.current_config.small_monster_UI.monster_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; + small_monster_UI_changed = small_monster_UI_changed or changed; - changed, config.current_config.small_monster_UI.monster_name_label.offset.y = - imgui.drag_float("Y", config.current_config.small_monster_UI.monster_name_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); + changed, config.current_config.small_monster_UI.monster_name_label.offset.y = imgui.drag_float("Y", + config.current_config.small_monster_UI.monster_name_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); config_changed = config_changed or changed; + small_monster_UI_changed = small_monster_UI_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Color") then - --changed, config.current_config.small_monster_UI.monster_name_label.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.monster_name_label.color, color_picker_flags); + -- changed, config.current_config.small_monster_UI.monster_name_label.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.monster_name_label.color, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end @@ -288,258 +334,294 @@ function customization_menu.draw() changed, config.current_config.small_monster_UI.monster_name_label.shadow.visibility = imgui.checkbox("Enable", config.current_config.small_monster_UI.monster_name_label.shadow.visibility); config_changed = config_changed or changed; + small_monster_UI_changed = small_monster_UI_changed or changed; if imgui.tree_node("Offset") then changed, config.current_config.small_monster_UI.monster_name_label.shadow.offset.x = imgui.drag_float("X", - config.current_config.small_monster_UI.monster_name_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config.current_config.small_monster_UI.monster_name_label.shadow.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); config_changed = config_changed or changed; + small_monster_UI_changed = small_monster_UI_changed or changed; changed, config.current_config.small_monster_UI.monster_name_label.shadow.offset.y = imgui.drag_float("Y", - config.current_config.small_monster_UI.monster_name_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config.current_config.small_monster_UI.monster_name_label.shadow.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); config_changed = config_changed or changed; + small_monster_UI_changed = small_monster_UI_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Color") then - --changed, config.current_config.small_monster_UI.monster_name_label.shadow.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.monster_name_label.shadow.color, color_picker_flags); + -- changed, config.current_config.small_monster_UI.monster_name_label.shadow.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.monster_name_label.shadow.color, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end imgui.tree_pop(); end + + imgui.tree_pop(); end if imgui.tree_node("Health") then if imgui.tree_node("Text Label") then - changed, config.current_config.small_monster_UI.health.text_label.visibility = - imgui.checkbox("Visible", config.current_config.small_monster_UI.health.text_label.visibility); + changed, config.current_config.small_monster_UI.health.text_label.visibility = imgui.checkbox("Visible", + config.current_config.small_monster_UI.health.text_label.visibility); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + -- add text format - + if imgui.tree_node("Offset") then - changed, config.current_config.small_monster_UI.health.text_label.offset.x = - imgui.drag_float("X", config.current_config.small_monster_UI.health.text_label.offset.x, 0.1, -screen.width, screen.width, - "%.1f"); + changed, config.current_config.small_monster_UI.health.text_label.offset.x = imgui.drag_float("X", + config.current_config.small_monster_UI.health.text_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - - changed, config.current_config.small_monster_UI.health.text_label.offset.y = - imgui.drag_float("Y", config.current_config.small_monster_UI.health.text_label.offset.y, 0.1, -screen.height, screen.height, - "%.1f"); + small_monster_UI_changed = small_monster_UI_changed or changed; + + changed, config.current_config.small_monster_UI.health.text_label.offset.y = imgui.drag_float("Y", + config.current_config.small_monster_UI.health.text_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Color") then - --changed, config.current_config.small_monster_UI.health.text_label.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.health.text_label.color, color_picker_flags); + -- changed, config.current_config.small_monster_UI.health.text_label.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.health.text_label.color, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Shadow") then - changed, config.current_config.small_monster_UI.health.text_label.shadow.visibility = - imgui.checkbox("Enable", config.current_config.small_monster_UI.health.text_label.shadow.visibility); + changed, config.current_config.small_monster_UI.health.text_label.shadow.visibility = imgui.checkbox("Enable", + config.current_config.small_monster_UI.health.text_label.shadow.visibility); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + if imgui.tree_node("Offset") then - changed, config.current_config.small_monster_UI.health.text_label.shadow.offset.x = - imgui.drag_float("X", config.current_config.small_monster_UI.health.text_label.shadow.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.small_monster_UI.health.text_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.small_monster_UI.health.text_label.shadow.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); config_changed = config_changed or changed; - - changed, config.current_config.small_monster_UI.health.text_label.shadow.offset.y = - imgui.drag_float("Y", config.current_config.small_monster_UI.health.text_label.shadow.offset.y, 0.1, -screen.width, - screen.width, "%.1f"); + small_monster_UI_changed = small_monster_UI_changed or changed; + + changed, config.current_config.small_monster_UI.health.text_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.small_monster_UI.health.text_label.shadow.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Color") then - --changed, config.current_config.small_monster_UI.health.text_label.shadow.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.health.text_label.shadow.color, color_picker_flags); + -- changed, config.current_config.small_monster_UI.health.text_label.shadow.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.health.text_label.shadow.color, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + imgui.tree_pop(); end - + imgui.tree_pop(); end - + if imgui.tree_node("Value Label") then - changed, config.current_config.small_monster_UI.health.value_label.visibility = - imgui.checkbox("Visible", config.current_config.small_monster_UI.health.value_label.visibility); + changed, config.current_config.small_monster_UI.health.value_label.visibility = imgui.checkbox("Visible", + config.current_config.small_monster_UI.health.value_label.visibility); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + -- add text format - + if imgui.tree_node("Offset") then - changed, config.current_config.small_monster_UI.health.value_label.offset.x = - imgui.drag_float("X", config.current_config.small_monster_UI.health.value_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.small_monster_UI.health.value_label.offset.x = imgui.drag_float("X", + config.current_config.small_monster_UI.health.value_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - - changed, config.current_config.small_monster_UI.health.value_label.offset.y = - imgui.drag_float("Y", config.current_config.small_monster_UI.health.value_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); + small_monster_UI_changed = small_monster_UI_changed or changed; + + changed, config.current_config.small_monster_UI.health.value_label.offset.y = imgui.drag_float("Y", + config.current_config.small_monster_UI.health.value_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Color") then - --changed, config.current_config.small_monster_UI.health.value_label.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.health.value_label.color, color_picker_flags); + -- changed, config.current_config.small_monster_UI.health.value_label.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.health.value_label.color, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Shadow") then changed, config.current_config.small_monster_UI.health.value_label.shadow.visibility = imgui.checkbox("Enable", config.current_config.small_monster_UI.health.value_label.shadow.visibility); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + if imgui.tree_node("Offset") then changed, config.current_config.small_monster_UI.health.value_label.shadow.offset.x = imgui.drag_float("X", - config.current_config.small_monster_UI.health.value_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config.current_config.small_monster_UI.health.value_label.shadow.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + changed, config.current_config.small_monster_UI.health.value_label.shadow.offset.y = imgui.drag_float("Y", - config.current_config.small_monster_UI.health.value_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config.current_config.small_monster_UI.health.value_label.shadow.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Color") then - --changed, config.current_config.small_monster_UI.health.value_label.shadow.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.health.value_label.shadow.color, color_picker_flags); + -- changed, config.current_config.small_monster_UI.health.value_label.shadow.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.health.value_label.shadow.color, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + imgui.tree_pop(); end - + imgui.tree_pop(); end - + if imgui.tree_node("Percentage Label") then changed, config.current_config.small_monster_UI.health.percentage_label.visibility = imgui.checkbox("Visible", config.current_config.small_monster_UI.health.percentage_label.visibility); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + -- add text format - + if imgui.tree_node("Offset") then - changed, config.current_config.small_monster_UI.health.percentage_label.offset.x = - imgui.drag_float("X", config.current_config.small_monster_UI.health.percentage_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.small_monster_UI.health.percentage_label.offset.x = imgui.drag_float("X", + config.current_config.small_monster_UI.health.percentage_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - - changed, config.current_config.small_monster_UI.health.percentage_label.offset.y = - imgui.drag_float("Y", config.current_config.small_monster_UI.health.percentage_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); + small_monster_UI_changed = small_monster_UI_changed or changed; + + changed, config.current_config.small_monster_UI.health.percentage_label.offset.y = imgui.drag_float("Y", + config.current_config.small_monster_UI.health.percentage_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Color") then - --changed, config.current_config.small_monster_UI.health.percentage_label.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.health.percentage_label.color, color_picker_flags); + -- changed, config.current_config.small_monster_UI.health.percentage_label.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.health.percentage_label.color, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Shadow") then - changed, config.current_config.small_monster_UI.health.percentage_label.shadow.visibility = imgui.checkbox("Enable", - config.current_config.small_monster_UI.health.percentage_label.shadow.visibility); + changed, config.current_config.small_monster_UI.health.percentage_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.small_monster_UI.health.percentage_label.shadow.visibility); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + if imgui.tree_node("Offset") then changed, config.current_config.small_monster_UI.health.percentage_label.shadow.offset.x = imgui.drag_float("X", config.current_config.small_monster_UI.health.percentage_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + changed, config.current_config.small_monster_UI.health.percentage_label.shadow.offset.y = imgui.drag_float("Y", - config.current_config.small_monster_UI.health.percentage_label.shadow.offset.y, 0.1, -screen.height, screen.height, - "%.1f"); + config.current_config.small_monster_UI.health.percentage_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Color") then - --changed, config.current_config.small_monster_UI.health.percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.health.percentage_label.shadow.color, color_picker_flags); + -- changed, config.current_config.small_monster_UI.health.percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.health.percentage_label.shadow.color, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + imgui.tree_pop(); end - + imgui.tree_pop(); end - + if imgui.tree_node("Bar") then - changed, config.current_config.small_monster_UI.health.bar.visibility = imgui.checkbox("Visible", config.current_config.small_monster_UI.health.bar - .visibility); + changed, config.current_config.small_monster_UI.health.bar.visibility = imgui.checkbox("Visible", + config.current_config.small_monster_UI.health.bar.visibility); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + if imgui.tree_node("Offset") then - changed, config.current_config.small_monster_UI.health.bar.offset.x = imgui.drag_float("X", config.current_config.small_monster_UI.health.bar - .offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.small_monster_UI.health.bar.offset.y = imgui.drag_float("Y", config.current_config.small_monster_UI.health.bar - .offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Size") then - changed, config.current_config.small_monster_UI.health.bar.size.width = - imgui.drag_float("Width", config.current_config.small_monster_UI.health.bar.size.width, 0.1, -screen.width, + changed, config.current_config.small_monster_UI.health.bar.offset.x = + imgui.drag_float("X", config.current_config.small_monster_UI.health.bar.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - - changed, config.current_config.small_monster_UI.health.bar.size.height = - imgui.drag_float("Height", config.current_config.small_monster_UI.health.bar.size.height, 0.1, -screen.height, + small_monster_UI_changed = small_monster_UI_changed or changed; + + changed, config.current_config.small_monster_UI.health.bar.offset.y = + imgui.drag_float("Y", config.current_config.small_monster_UI.health.bar.offset.y, 0.1, -screen.height, screen.height, "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + + if imgui.tree_node("Size") then + changed, config.current_config.small_monster_UI.health.bar.size.width = imgui.drag_float("Width", + config.current_config.small_monster_UI.health.bar.size.width, 0.1, 0, screen.width, "%.1f"); + config_changed = config_changed or changed; + small_monster_UI_changed = small_monster_UI_changed or changed; + + changed, config.current_config.small_monster_UI.health.bar.size.height = imgui.drag_float("Height", + config.current_config.small_monster_UI.health.bar.size.height, 0.1, 0, screen.height, "%.1f"); + config_changed = config_changed or changed; + small_monster_UI_changed = small_monster_UI_changed or changed; + + imgui.tree_pop(); + end + if imgui.tree_node("Colors") then if imgui.tree_node("Foreground") then - --changed, config.current_config.small_monster_UI.health.bar.colors.foreground = imgui.color_picker_argb("", config.current_config.small_monster_UI.health.bar.colors.foreground, color_picker_flags); + -- changed, config.current_config.small_monster_UI.health.bar.colors.foreground = imgui.color_picker_argb("", config.current_config.small_monster_UI.health.bar.colors.foreground, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Background") then - -- changed, config.current_config.small_monster_UI.health.bar.colors.background = imgui.color_picker_argb("", config.current_config.small_monster_UI.health.bar.colors.background, color_picker_flags); + -- changed, config.current_config.small_monster_UI.health.bar.colors.background = imgui.color_picker_argb("", config.current_config.small_monster_UI.health.bar.colors.background, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + imgui.tree_pop(); end - + imgui.tree_pop(); end @@ -548,1128 +630,2967 @@ function customization_menu.draw() if imgui.tree_node("Stamina (Pointless: small monsters don't get tired)") then if imgui.tree_node("Text Label") then - changed, config.current_config.small_monster_UI.stamina.text_label.visibility = - imgui.checkbox("Visible", config.current_config.small_monster_UI.stamina.text_label.visibility); + changed, config.current_config.small_monster_UI.stamina.text_label.visibility = imgui.checkbox("Visible", + config.current_config.small_monster_UI.stamina.text_label.visibility); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + -- add text format - + if imgui.tree_node("Offset") then - changed, config.current_config.small_monster_UI.stamina.text_label.offset.x = - imgui.drag_float("X", config.current_config.small_monster_UI.stamina.text_label.offset.x, 0.1, -screen.width, screen.width, - "%.1f"); + changed, config.current_config.small_monster_UI.stamina.text_label.offset.x = imgui.drag_float("X", + config.current_config.small_monster_UI.stamina.text_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - - changed, config.current_config.small_monster_UI.stamina.text_label.offset.y = - imgui.drag_float("Y", config.current_config.small_monster_UI.stamina.text_label.offset.y, 0.1, -screen.height, screen.height, - "%.1f"); + small_monster_UI_changed = small_monster_UI_changed or changed; + + changed, config.current_config.small_monster_UI.stamina.text_label.offset.y = imgui.drag_float("Y", + config.current_config.small_monster_UI.stamina.text_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Color") then - --changed, config.current_config.small_monster_UI.stamina.text_label.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.stamina.text_label.color, color_picker_flags); + -- changed, config.current_config.small_monster_UI.stamina.text_label.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.stamina.text_label.color, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Shadow") then - changed, config.current_config.small_monster_UI.stamina.text_label.shadow.visibility = - imgui.checkbox("Enable", config.current_config.small_monster_UI.stamina.text_label.shadow.visibility); + changed, config.current_config.small_monster_UI.stamina.text_label.shadow.visibility = imgui.checkbox("Enable", + config.current_config.small_monster_UI.stamina.text_label.shadow.visibility); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + if imgui.tree_node("Offset") then - changed, config.current_config.small_monster_UI.stamina.text_label.shadow.offset.x = - imgui.drag_float("X", config.current_config.small_monster_UI.stamina.text_label.shadow.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.small_monster_UI.stamina.text_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.small_monster_UI.stamina.text_label.shadow.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); config_changed = config_changed or changed; - - changed, config.current_config.small_monster_UI.stamina.text_label.shadow.offset.y = - imgui.drag_float("Y", config.current_config.small_monster_UI.stamina.text_label.shadow.offset.y, 0.1, -screen.width, - screen.width, "%.1f"); + small_monster_UI_changed = small_monster_UI_changed or changed; + + changed, config.current_config.small_monster_UI.stamina.text_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.small_monster_UI.stamina.text_label.shadow.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Color") then - --changed, config.current_config.small_monster_UI.stamina.text_label.shadow.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.stamina.text_label.shadow.color, color_picker_flags); + -- changed, config.current_config.small_monster_UI.stamina.text_label.shadow.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.stamina.text_label.shadow.color, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + imgui.tree_pop(); end - + imgui.tree_pop(); end - + if imgui.tree_node("Value Label") then - changed, config.current_config.small_monster_UI.stamina.value_label.visibility = - imgui.checkbox("Visible", config.current_config.small_monster_UI.stamina.value_label.visibility); + changed, config.current_config.small_monster_UI.stamina.value_label.visibility = imgui.checkbox("Visible", + config.current_config.small_monster_UI.stamina.value_label.visibility); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + -- add text format - + if imgui.tree_node("Offset") then - changed, config.current_config.small_monster_UI.stamina.value_label.offset.x = - imgui.drag_float("X", config.current_config.small_monster_UI.stamina.value_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.small_monster_UI.stamina.value_label.offset.x = imgui.drag_float("X", + config.current_config.small_monster_UI.stamina.value_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - - changed, config.current_config.small_monster_UI.stamina.value_label.offset.y = - imgui.drag_float("Y", config.current_config.small_monster_UI.stamina.value_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); + small_monster_UI_changed = small_monster_UI_changed or changed; + + changed, config.current_config.small_monster_UI.stamina.value_label.offset.y = imgui.drag_float("Y", + config.current_config.small_monster_UI.stamina.value_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Color") then - --changed, config.current_config.small_monster_UI.stamina.value_label.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.stamina.value_label.color, color_picker_flags); + -- changed, config.current_config.small_monster_UI.stamina.value_label.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.stamina.value_label.color, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Shadow") then changed, config.current_config.small_monster_UI.stamina.value_label.shadow.visibility = imgui.checkbox("Enable", config.current_config.small_monster_UI.stamina.value_label.shadow.visibility); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + if imgui.tree_node("Offset") then changed, config.current_config.small_monster_UI.stamina.value_label.shadow.offset.x = imgui.drag_float("X", - config.current_config.small_monster_UI.stamina.value_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config.current_config.small_monster_UI.stamina.value_label.shadow.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + changed, config.current_config.small_monster_UI.stamina.value_label.shadow.offset.y = imgui.drag_float("Y", - config.current_config.small_monster_UI.stamina.value_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config.current_config.small_monster_UI.stamina.value_label.shadow.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Color") then - --changed, config.current_config.small_monster_UI.stamina.value_label.shadow.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.stamina.value_label.shadow.color, color_picker_flags); + -- changed, config.current_config.small_monster_UI.stamina.value_label.shadow.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.stamina.value_label.shadow.color, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + imgui.tree_pop(); end - + imgui.tree_pop(); end - + if imgui.tree_node("Percentage Label") then changed, config.current_config.small_monster_UI.stamina.percentage_label.visibility = imgui.checkbox("Visible", config.current_config.small_monster_UI.stamina.percentage_label.visibility); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + -- add text format - + if imgui.tree_node("Offset") then - changed, config.current_config.small_monster_UI.stamina.percentage_label.offset.x = - imgui.drag_float("X", config.current_config.small_monster_UI.stamina.percentage_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.small_monster_UI.stamina.percentage_label.offset.x = imgui.drag_float("X", + config.current_config.small_monster_UI.stamina.percentage_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - - changed, config.current_config.small_monster_UI.stamina.percentage_label.offset.y = - imgui.drag_float("Y", config.current_config.small_monster_UI.stamina.percentage_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); + small_monster_UI_changed = small_monster_UI_changed or changed; + + changed, config.current_config.small_monster_UI.stamina.percentage_label.offset.y = imgui.drag_float("Y", + config.current_config.small_monster_UI.stamina.percentage_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Color") then - --changed, config.current_config.small_monster_UI.stamina.percentage_label.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.stamina.percentage_label.color, color_picker_flags); + -- changed, config.current_config.small_monster_UI.stamina.percentage_label.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.stamina.percentage_label.color, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Shadow") then - changed, config.current_config.small_monster_UI.stamina.percentage_label.shadow.visibility = imgui.checkbox("Enable", - config.current_config.small_monster_UI.stamina.percentage_label.shadow.visibility); + changed, config.current_config.small_monster_UI.stamina.percentage_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.small_monster_UI.stamina.percentage_label.shadow.visibility); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + if imgui.tree_node("Offset") then changed, config.current_config.small_monster_UI.stamina.percentage_label.shadow.offset.x = imgui.drag_float("X", - config.current_config.small_monster_UI.stamina.percentage_label.shadow.offset.x, 0.1, -screen.width, screen.width, - "%.1f"); + config.current_config.small_monster_UI.stamina.percentage_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + changed, config.current_config.small_monster_UI.stamina.percentage_label.shadow.offset.y = imgui.drag_float("Y", - config.current_config.small_monster_UI.stamina.percentage_label.shadow.offset.y, 0.1, -screen.height, screen.height, - "%.1f"); + config.current_config.small_monster_UI.stamina.percentage_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Color") then - --changed, config.current_config.small_monster_UI.stamina.percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.stamina.percentage_label.shadow.color, color_picker_flags); + -- changed, config.current_config.small_monster_UI.stamina.percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.small_monster_UI.stamina.percentage_label.shadow.color, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + imgui.tree_pop(); end - + imgui.tree_pop(); end - + if imgui.tree_node("Bar") then - changed, config.current_config.small_monster_UI.stamina.bar.visibility = imgui.checkbox("Visible", config.current_config.small_monster_UI.stamina.bar - .visibility); + changed, config.current_config.small_monster_UI.stamina.bar.visibility = imgui.checkbox("Visible", + config.current_config.small_monster_UI.stamina.bar.visibility); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + if imgui.tree_node("Offset") then - changed, config.current_config.small_monster_UI.stamina.bar.offset.x = imgui.drag_float("X", config.current_config.small_monster_UI.stamina.bar - .offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.small_monster_UI.stamina.bar.offset.y = imgui.drag_float("Y", config.current_config.small_monster_UI.stamina.bar - .offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Size") then - changed, config.current_config.small_monster_UI.stamina.bar.size.width = - imgui.drag_float("Width", config.current_config.small_monster_UI.stamina.bar.size.width, 0.1, -screen.width, + changed, config.current_config.small_monster_UI.stamina.bar.offset.x = + imgui.drag_float("X", config.current_config.small_monster_UI.stamina.bar.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - - changed, config.current_config.small_monster_UI.stamina.bar.size.height = - imgui.drag_float("Height", config.current_config.small_monster_UI.stamina.bar.size.height, 0.1, -screen.height, + small_monster_UI_changed = small_monster_UI_changed or changed; + + changed, config.current_config.small_monster_UI.stamina.bar.offset.y = + imgui.drag_float("Y", config.current_config.small_monster_UI.stamina.bar.offset.y, 0.1, -screen.height, screen.height, "%.1f"); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + + if imgui.tree_node("Size") then + changed, config.current_config.small_monster_UI.stamina.bar.size.width = imgui.drag_float("Width", + config.current_config.small_monster_UI.stamina.bar.size.width, 0.1, 0, screen.width, "%.1f"); + config_changed = config_changed or changed; + small_monster_UI_changed = small_monster_UI_changed or changed; + + changed, config.current_config.small_monster_UI.stamina.bar.size.height = imgui.drag_float("Height", + config.current_config.small_monster_UI.stamina.bar.size.height, 0.1, 0, screen.height, "%.1f"); + config_changed = config_changed or changed; + small_monster_UI_changed = small_monster_UI_changed or changed; + + imgui.tree_pop(); + end + if imgui.tree_node("Colors") then if imgui.tree_node("Foreground") then - --changed, config.current_config.small_monster_UI.stamina.bar.colors.foreground = imgui.color_picker_argb("", config.current_config.small_monster_UI.stamina.bar.colors.foreground, color_picker_flags); + -- changed, config.current_config.small_monster_UI.stamina.bar.colors.foreground = imgui.color_picker_argb("", config.current_config.small_monster_UI.stamina.bar.colors.foreground, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Background") then - --changed, config.current_config.small_monster_UI.stamina.bar.colors.background = imgui.color_picker_argb("", config.current_config.small_monster_UI.stamina.bar.colors.background, color_picker_flags); + -- changed, config.current_config.small_monster_UI.stamina.bar.colors.background = imgui.color_picker_argb("", config.current_config.small_monster_UI.stamina.bar.colors.background, color_picker_flags); config_changed = config_changed or changed; - + small_monster_UI_changed = small_monster_UI_changed or changed; + imgui.tree_pop(); end - + imgui.tree_pop(); end - + imgui.tree_pop(); end imgui.tree_pop(); end + if small_monster_UI_changed then + for _, monster in pairs(small_monster.list) do + small_monster.init_UI(monster); + end + end + imgui.tree_pop(); end if imgui.tree_node("Large Monster UI") then - changed, config.current_config.large_monster_UI.enabled = imgui.checkbox("Enabled", config.current_config.large_monster_UI.enabled); - config_changed = config_changed or changed; + if imgui.tree_node("Dynamically Positioned") then + local large_monster_dynamic_UI_changed = false; - if imgui.tree_node("Spacing") then - changed, config.current_config.large_monster_UI.spacing.x = imgui.drag_float("X", - config.current_config.large_monster_UI.spacing.x, 0.1, 0, screen.width, "%.1f"); + changed, config.current_config.large_monster_UI.dynamic.enabled = + imgui.checkbox("Enabled", config.current_config.large_monster_UI.dynamic.enabled); config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; - changed, config.current_config.large_monster_UI.spacing.y = imgui.drag_float("Y", - config.current_config.large_monster_UI.spacing.y, 0.1, 0, screen.width, "%.1f"); - config_changed = config_changed or changed; + if imgui.tree_node("Settings") then + changed, config.current_config.large_monster_UI.dynamic.settings.opacity_falloff = + imgui.checkbox("Opacity Falloff", config.current_config.large_monster_UI.dynamic.settings.opacity_falloff); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; - imgui.tree_pop(); - end + changed, config.current_config.large_monster_UI.dynamic.settings.max_distance = + imgui.drag_float("Max Distance", config.current_config.large_monster_UI.dynamic.settings.max_distance, 1, 0, 10000, "%.0f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; - if imgui.tree_node("Settings") then - changed, customization_menu.monster_UI_orientation_index = imgui.combo("Orientation", customization_menu.monster_UI_orientation_index, customization_menu.orientation_types); - config_changed = config_changed or changed; - if changed then - config.current_config.large_monster_UI.settings.orientation = customization_menu.orientation_types[customization_menu.monster_UI_orientation_index]; + imgui.tree_pop(); end - imgui.tree_pop(); - end - - if imgui.tree_node("Dynamic Positioning") then - changed, config.current_config.large_monster_UI.dynamic_positioning.enabled = - imgui.checkbox("Enabled", config.current_config.large_monster_UI.dynamic_positioning.enabled); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.dynamic_positioning.opacity_falloff = imgui.checkbox("Opacity Falloff", config.current_config.large_monster_UI.dynamic_positioning.opacity_falloff); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.dynamic_positioning.max_distance = imgui.drag_float("Max Distance", - config.current_config.large_monster_UI.dynamic_positioning.max_distance, 1, 0, 10000, "%.0f"); - config_changed = config_changed or changed; - if imgui.tree_node("World Offset") then - changed, config.current_config.large_monster_UI.dynamic_positioning.world_offset.x = imgui.drag_float("X", - config.current_config.large_monster_UI.dynamic_positioning.world_offset.x, 0.1, -100, 100, "%.1f"); + changed, config.current_config.large_monster_UI.dynamic.world_offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.world_offset.x, 0.1, -100, 100, "%.1f"); config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; - changed, config.current_config.large_monster_UI.dynamic_positioning.world_offset.y = imgui.drag_float("Y", - config.current_config.large_monster_UI.dynamic_positioning.world_offset.y, 0.1, -100, 100, "%.1f"); + changed, config.current_config.large_monster_UI.dynamic.world_offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.world_offset.y, 0.1, -100, 100, "%.1f"); config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; - changed, config.current_config.large_monster_UI.dynamic_positioning.world_offset.z = imgui.drag_float("Z", - config.current_config.large_monster_UI.dynamic_positioning.world_offset.z, 0.1, -100, 100, "%.1f"); + changed, config.current_config.large_monster_UI.dynamic.world_offset.z = imgui.drag_float("Z", + config.current_config.large_monster_UI.dynamic.world_offset.z, 0.1, -100, 100, "%.1f"); config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Viewport Offset") then - changed, config.current_config.large_monster_UI.dynamic_positioning.viewport_offset.x = imgui.drag_float("X", - config.current_config.large_monster_UI.dynamic_positioning.viewport_offset.x, 0.1, 0, screen.width, "%.1f"); + changed, config.current_config.large_monster_UI.dynamic.viewport_offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.viewport_offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; - changed, config.current_config.large_monster_UI.dynamic_positioning.viewport_offset.y = imgui.drag_float("Y", - config.current_config.large_monster_UI.dynamic_positioning.viewport_offset.y, 0.1, 0, screen.height, "%.1f"); + changed, config.current_config.large_monster_UI.dynamic.viewport_offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.viewport_offset.y, 0.1, -screen.height, screen.height, "%.1f"); config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; imgui.tree_pop(); end - imgui.tree_pop(); - end - - if imgui.tree_node("Position") then - changed, config.current_config.large_monster_UI.position.x = imgui.drag_float("X", config.current_config.large_monster_UI.position.x, 0.1, 0, - screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.position.y = imgui.drag_float("Y", config.current_config.large_monster_UI.position.y, 0.1, 0, - screen.height, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Sorting") then - changed, customization_menu.monster_UI_sort_type_index = imgui.combo("Type", customization_menu.monster_UI_sort_type_index, customization_menu.monster_UI_sorting_types); - config_changed = config_changed or changed; - if changed then - config.current_config.large_monster_UI.sorting.type = customization_menu.monster_UI_sorting_types[customization_menu.monster_UI_sort_type_index]; - end - - changed, config.current_config.large_monster_UI.sorting.reversed_order = imgui.checkbox("Reversed Order", - config.current_config.large_monster_UI.sorting.reversed_order); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Monster Name Label") then - changed, config.current_config.large_monster_UI.monster_name_label.visibility = - imgui.checkbox("Visible", config.current_config.large_monster_UI.monster_name_label.visibility); - config_changed = config_changed or changed; - - if imgui.tree_node("Include") then - changed, config.current_config.large_monster_UI.monster_name_label.include.monster_name = - imgui.checkbox("Monster Name", config.current_config.large_monster_UI.monster_name_label.include.monster_name); + if imgui.tree_node("Monster Name Label") then + changed, config.current_config.large_monster_UI.dynamic.monster_name_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.dynamic.monster_name_label.visibility); config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; - changed, config.current_config.large_monster_UI.monster_name_label.include.crown = - imgui.checkbox("Crown", config.current_config.large_monster_UI.monster_name_label.include.crown); - config_changed = config_changed or changed; + if imgui.tree_node("Include") then + changed, config.current_config.large_monster_UI.dynamic.monster_name_label.include.monster_name = imgui.checkbox( + "Monster Name", config.current_config.large_monster_UI.dynamic.monster_name_label.include.monster_name); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; - changed, config.current_config.large_monster_UI.monster_name_label.include.size = - imgui.checkbox("Size", config.current_config.large_monster_UI.monster_name_label.include.size); - config_changed = config_changed or changed; + changed, config.current_config.large_monster_UI.dynamic.monster_name_label.include.crown = imgui.checkbox("Crown", + config.current_config.large_monster_UI.dynamic.monster_name_label.include.crown); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; - changed, config.current_config.large_monster_UI.monster_name_label.include.scrown_thresholds = imgui.checkbox( - "Crown Thresholds", config.current_config.large_monster_UI.monster_name_label.include.scrown_thresholds); - config_changed = config_changed or changed; + changed, config.current_config.large_monster_UI.dynamic.monster_name_label.include.size = imgui.checkbox("Size", + config.current_config.large_monster_UI.dynamic.monster_name_label.include.size); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; - imgui.tree_pop(); - end + changed, config.current_config.large_monster_UI.dynamic.monster_name_label.include.scrown_thresholds = + imgui.checkbox("Crown Thresholds", + config.current_config.large_monster_UI.dynamic.monster_name_label.include.scrown_thresholds); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.monster_name_label.offset.x = - imgui.drag_float("X", config.current_config.large_monster_UI.monster_name_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.monster_name_label.offset.y = - imgui.drag_float("Y", config.current_config.large_monster_UI.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("Color") then - --changed, config.current_config.large_monster_UI.monster_name_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.monster_name_label.color, color_picker_flags); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Shadow") then - changed, config.current_config.large_monster_UI.monster_name_label.shadow.visibility = imgui.checkbox("Enable", - config.current_config.large_monster_UI.monster_name_label.shadow.visibility); - config_changed = config_changed or changed; + imgui.tree_pop(); + end if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.monster_name_label.shadow.offset.x = imgui.drag_float("X", - config.current_config.large_monster_UI.monster_name_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + changed, config.current_config.large_monster_UI.dynamic.monster_name_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.monster_name_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; - changed, config.current_config.large_monster_UI.monster_name_label.shadow.offset.y = imgui.drag_float("Y", - config.current_config.large_monster_UI.monster_name_label.shadow.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + changed, config.current_config.large_monster_UI.dynamic.monster_name_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.monster_name_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Color") then - --changed, config.current_config.large_monster_UI.monster_name_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.monster_name_label.shadow.color, color_picker_flags); + -- changed, config.current_config.large_monster_UI.dynamic.monster_name_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.monster_name_label.color, color_picker_flags); config_changed = config_changed or changed; - + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + imgui.tree_pop(); end - imgui.tree_pop(); - end - - imgui.tree_pop(); - end - - if imgui.tree_node("Health") then - if imgui.tree_node("Text Label") then - changed, config.current_config.large_monster_UI.health.text_label.visibility = - imgui.checkbox("Visible", config.current_config.large_monster_UI.health.text_label.visibility); - config_changed = config_changed or changed; - - -- add text format - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.health.text_label.offset.x = - imgui.drag_float("X", config.current_config.large_monster_UI.health.text_label.offset.x, 0.1, -screen.width, screen.width, - "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.health.text_label.offset.y = - imgui.drag_float("Y", config.current_config.large_monster_UI.health.text_label.offset.y, 0.1, -screen.height, screen.height, - "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Color") then - --changed, config.current_config.large_monster_UI.health.text_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.health.text_label.color, color_picker_flags); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - if imgui.tree_node("Shadow") then - changed, config.current_config.large_monster_UI.health.text_label.shadow.visibility = - imgui.checkbox("Enable", config.current_config.large_monster_UI.health.text_label.shadow.visibility); + changed, config.current_config.large_monster_UI.dynamic.monster_name_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.dynamic.monster_name_label.shadow.visibility); config_changed = config_changed or changed; - + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.health.text_label.shadow.offset.x = - imgui.drag_float("X", config.current_config.large_monster_UI.health.text_label.shadow.offset.x, 0.1, -screen.width, + changed, config.current_config.large_monster_UI.dynamic.monster_name_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.monster_name_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.monster_name_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.monster_name_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.monster_name_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.monster_name_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Health") then + if imgui.tree_node("Text Label") then + changed, config.current_config.large_monster_UI.dynamic.health.text_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.dynamic.health.text_label.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.health.text_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.health.text_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.health.text_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.health.text_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.health.text_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.health.text_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.dynamic.health.text_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.dynamic.health.text_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.health.text_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.health.text_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.health.text_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.health.text_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.health.text_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.health.text_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Value Label") then + changed, config.current_config.large_monster_UI.dynamic.health.value_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.dynamic.health.value_label.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.health.value_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.health.value_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.health.text_label.shadow.offset.y = - imgui.drag_float("Y", config.current_config.large_monster_UI.health.text_label.shadow.offset.y, 0.1, -screen.width, + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.health.value_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.health.value_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.health.value_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.health.value_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.dynamic.health.value_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.dynamic.health.value_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.health.value_label.shadow.offset.x = imgui.drag_float( + "X", config.current_config.large_monster_UI.dynamic.health.value_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.health.value_label.shadow.offset.y = imgui.drag_float( + "Y", config.current_config.large_monster_UI.dynamic.health.value_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.health.value_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.health.value_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + imgui.tree_pop(); end - - if imgui.tree_node("Color") then - --changed, config.current_config.large_monster_UI.health.text_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.health.text_label.shadow.color, 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("Value Label") then - changed, config.current_config.large_monster_UI.health.value_label.visibility = - imgui.checkbox("Visible", config.current_config.large_monster_UI.health.value_label.visibility); - config_changed = config_changed or changed; - - -- add text format - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.health.value_label.offset.x = - imgui.drag_float("X", config.current_config.large_monster_UI.health.value_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + + if imgui.tree_node("Percentage Label") then + changed, config.current_config.large_monster_UI.dynamic.health.percentage_label.visibility = imgui.checkbox( + "Visible", config.current_config.large_monster_UI.dynamic.health.percentage_label.visibility); config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.health.value_label.offset.y = - imgui.drag_float("Y", config.current_config.large_monster_UI.health.value_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Color") then - --changed, config.current_config.large_monster_UI.health.value_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.health.value_label.color, color_picker_flags); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Shadow") then - changed, config.current_config.large_monster_UI.health.value_label.shadow.visibility = imgui.checkbox("Enable", - config.current_config.large_monster_UI.health.value_label.shadow.visibility); - config_changed = config_changed or changed; - + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + -- add text format + if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.health.value_label.shadow.offset.x = imgui.drag_float("X", - config.current_config.large_monster_UI.health.value_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.health.value_label.shadow.offset.y = imgui.drag_float("Y", - config.current_config.large_monster_UI.health.value_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("Color") then - --changed, config.current_config.large_monster_UI.health.value_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.health.value_label.shadow.color, 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("Percentage Label") then - changed, config.current_config.large_monster_UI.health.percentage_label.visibility = imgui.checkbox("Visible", - config.current_config.large_monster_UI.health.percentage_label.visibility); - config_changed = config_changed or changed; - - -- add text format - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.health.percentage_label.offset.x = - imgui.drag_float("X", config.current_config.large_monster_UI.health.percentage_label.offset.x, 0.1, -screen.width, + changed, config.current_config.large_monster_UI.dynamic.health.percentage_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.health.percentage_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.health.percentage_label.offset.y = - imgui.drag_float("Y", config.current_config.large_monster_UI.health.percentage_label.offset.y, 0.1, -screen.height, + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.health.percentage_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.health.percentage_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.health.percentage_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.health.percentage_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.dynamic.health.percentage_label.shadow.visibility = + imgui.checkbox("Enable", config.current_config.large_monster_UI.dynamic.health.percentage_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.health.percentage_label.shadow.offset.x = + imgui.drag_float("X", config.current_config.large_monster_UI.dynamic.health.percentage_label.shadow.offset.x, + 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.health.percentage_label.shadow.offset.y = + imgui.drag_float("Y", config.current_config.large_monster_UI.dynamic.health.percentage_label.shadow.offset.y, + 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.health.percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.health.percentage_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + imgui.tree_pop(); end - - if imgui.tree_node("Color") then - --changed, config.current_config.large_monster_UI.health.percentage_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.health.percentage_label.color, color_picker_flags); + + if imgui.tree_node("Bar") then + changed, config.current_config.large_monster_UI.dynamic.health.bar.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.dynamic.health.bar.visibility); config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Shadow") then - changed, config.current_config.large_monster_UI.health.percentage_label.shadow.visibility = imgui.checkbox("Enable", - config.current_config.large_monster_UI.health.percentage_label.shadow.visibility); - config_changed = config_changed or changed; - + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.health.percentage_label.shadow.offset.x = imgui.drag_float("X", - config.current_config.large_monster_UI.health.percentage_label.shadow.offset.x, 0.1, -screen.width, screen.width, - "%.1f"); + changed, config.current_config.large_monster_UI.dynamic.health.bar.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.health.bar.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.health.percentage_label.shadow.offset.y = imgui.drag_float("Y", - config.current_config.large_monster_UI.health.percentage_label.shadow.offset.y, 0.1, -screen.height, screen.height, - "%.1f"); + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.health.bar.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.health.bar.offset.y, 0.1, -screen.height, screen.height, "%.1f"); config_changed = config_changed or changed; - + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + imgui.tree_pop(); end - - if imgui.tree_node("Color") then - --changed, config.current_config.large_monster_UI.health.percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.health.percentage_label.shadow.color, color_picker_flags); + + if imgui.tree_node("Size") then + changed, config.current_config.large_monster_UI.dynamic.health.bar.size.width = imgui.drag_float("Width", + config.current_config.large_monster_UI.dynamic.health.bar.size.width, 0.1, 0, screen.width, "%.1f"); config_changed = config_changed or changed; - + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.health.bar.size.height = imgui.drag_float("Height", + config.current_config.large_monster_UI.dynamic.health.bar.size.height, 0.1, 0, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + imgui.tree_pop(); end - - imgui.tree_pop(); - end - - imgui.tree_pop(); - end - - if imgui.tree_node("Bar") then - changed, config.current_config.large_monster_UI.health.bar.visibility = imgui.checkbox("Visible", config.current_config.large_monster_UI.health.bar - .visibility); - config_changed = config_changed or changed; - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.health.bar.offset.x = imgui.drag_float("X", config.current_config.large_monster_UI.health.bar - .offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.health.bar.offset.y = imgui.drag_float("Y", config.current_config.large_monster_UI.health.bar - .offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Size") then - changed, config.current_config.large_monster_UI.health.bar.size.width = - imgui.drag_float("Width", config.current_config.large_monster_UI.health.bar.size.width, 0.1, -screen.width, - screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.health.bar.size.height = - imgui.drag_float("Height", config.current_config.large_monster_UI.health.bar.size.height, 0.1, -screen.height, - screen.height, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Colors") then - if imgui.tree_node("Foreground") then - --changed, config.current_config.large_monster_UI.health.bar.colors.foreground = imgui.color_picker_argb("", config.current_config.large_monster_UI.health.bar.colors.foreground, color_picker_flags); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Background") then - --changed, config.current_config.large_monster_UI.health.bar.colors.background = imgui.color_picker_argb("", config.current_config.large_monster_UI.health.bar.colors.background, color_picker_flags); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Monster can be captured") then + + if imgui.tree_node("Colors") then if imgui.tree_node("Foreground") then - --changed, config.current_config.large_monster_UI.health.bar.colors.capture.foreground = imgui.color_picker_argb("", config.current_config.large_monster_UI.health.bar.colors.capture.foreground, color_picker_flags); + -- changed, config.current_config.large_monster_UI.dynamic.health.bar.colors.foreground = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.health.bar.colors.foreground, color_picker_flags); config_changed = config_changed or changed; - + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + imgui.tree_pop(); end - + if imgui.tree_node("Background") then - --changed, config.current_config.large_monster_UI.health.bar.colors.capture.background = imgui.color_picker_argb("", config.current_config.large_monster_UI.health.bar.colors.capture.background, color_picker_flags); + -- changed, config.current_config.large_monster_UI.dynamic.health.bar.colors.background = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.health.bar.colors.background, color_picker_flags); config_changed = config_changed or changed; - + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + imgui.tree_pop(); end + + if imgui.tree_node("Monster can be captured") then + if imgui.tree_node("Foreground") then + -- changed, config.current_config.large_monster_UI.dynamic.health.bar.colors.capture.foreground = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.health.bar.colors.capture.foreground, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Background") then + -- changed, config.current_config.large_monster_UI.dynamic.health.bar.colors.capture.background = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.health.bar.colors.capture.background, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + end + + imgui.tree_pop(); end - + imgui.tree_pop(); end - + imgui.tree_pop(); end - imgui.tree_pop(); + if imgui.tree_node("Stamina") then + if imgui.tree_node("Text Label") then + changed, config.current_config.large_monster_UI.dynamic.stamina.text_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.dynamic.stamina.text_label.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.stamina.text_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.stamina.text_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.stamina.text_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.stamina.text_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.stamina.text_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.stamina.text_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.dynamic.stamina.text_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.dynamic.stamina.text_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.stamina.text_label.shadow.offset.x = imgui.drag_float( + "X", config.current_config.large_monster_UI.dynamic.stamina.text_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.stamina.text_label.shadow.offset.y = imgui.drag_float( + "Y", config.current_config.large_monster_UI.dynamic.stamina.text_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.stamina.text_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.stamina.text_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Value Label") then + changed, config.current_config.large_monster_UI.dynamic.stamina.value_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.dynamic.stamina.value_label.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.stamina.value_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.stamina.value_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.stamina.value_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.stamina.value_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.stamina.value_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.stamina.value_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.dynamic.stamina.value_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.dynamic.stamina.value_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.stamina.value_label.shadow.offset.x = imgui.drag_float( + "X", config.current_config.large_monster_UI.dynamic.stamina.value_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.stamina.value_label.shadow.offset.y = imgui.drag_float( + "Y", config.current_config.large_monster_UI.dynamic.stamina.value_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.stamina.value_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.stamina.value_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Percentage Label") then + changed, config.current_config.large_monster_UI.dynamic.stamina.percentage_label.visibility = imgui.checkbox( + "Visible", config.current_config.large_monster_UI.dynamic.stamina.percentage_label.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.stamina.percentage_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.stamina.percentage_label.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.stamina.percentage_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.stamina.percentage_label.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.stamina.percentage_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.stamina.percentage_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.dynamic.stamina.percentage_label.shadow.visibility = + imgui.checkbox("Enable", + config.current_config.large_monster_UI.dynamic.stamina.percentage_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.stamina.percentage_label.shadow.offset.x = + imgui.drag_float("X", config.current_config.large_monster_UI.dynamic.stamina.percentage_label.shadow.offset.x, + 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.stamina.percentage_label.shadow.offset.y = + imgui.drag_float("Y", config.current_config.large_monster_UI.dynamic.stamina.percentage_label.shadow.offset.y, + 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.stamina.percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.stamina.percentage_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Bar") then + changed, config.current_config.large_monster_UI.dynamic.stamina.bar.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.dynamic.stamina.bar.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.stamina.bar.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.stamina.bar.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.stamina.bar.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.stamina.bar.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Size") then + changed, config.current_config.large_monster_UI.dynamic.stamina.bar.size.width = imgui.drag_float("Width", + config.current_config.large_monster_UI.dynamic.stamina.bar.size.width, 0.1, 0, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.stamina.bar.size.height = imgui.drag_float("Height", + config.current_config.large_monster_UI.dynamic.stamina.bar.size.height, 0.1, 0, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Colors") then + if imgui.tree_node("Foreground") then + -- changed, config.current_config.large_monster_UI.dynamic.stamina.bar.colors.foreground = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.stamina.bar.colors.foreground, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Background") then + -- changed, config.current_config.large_monster_UI.dynamic.stamina.bar.colors.background = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.stamina.bar.colors.background, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Rage") then + if imgui.tree_node("Text Label") then + changed, config.current_config.large_monster_UI.dynamic.rage.text_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.dynamic.rage.text_label.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.rage.text_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.rage.text_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.rage.text_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.rage.text_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.rage.text_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.rage.text_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.dynamic.rage.text_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.dynamic.rage.text_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.rage.text_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.rage.text_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.rage.text_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.rage.text_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.rage.text_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.rage.text_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Value Label") then + changed, config.current_config.large_monster_UI.dynamic.rage.value_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.dynamic.rage.value_label.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.rage.value_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.rage.value_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.rage.value_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.rage.value_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.rage.value_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.rage.value_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.dynamic.rage.value_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.dynamic.rage.value_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.rage.value_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.rage.value_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.rage.value_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.rage.value_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.rage.value_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.rage.value_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Percentage Label") then + changed, config.current_config.large_monster_UI.dynamic.rage.percentage_label.visibility = imgui.checkbox( + "Visible", config.current_config.large_monster_UI.dynamic.rage.percentage_label.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.rage.percentage_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.rage.percentage_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.rage.percentage_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.rage.percentage_label.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.rage.percentage_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.rage.percentage_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.dynamic.rage.percentage_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.dynamic.rage.percentage_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.rage.percentage_label.shadow.offset.x = imgui.drag_float( + "X", config.current_config.large_monster_UI.dynamic.rage.percentage_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.rage.percentage_label.shadow.offset.y = imgui.drag_float( + "Y", config.current_config.large_monster_UI.dynamic.rage.percentage_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.rage.percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.rage.percentage_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Bar") then + changed, config.current_config.large_monster_UI.dynamic.rage.bar.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.dynamic.rage.bar.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.rage.bar.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.rage.bar.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.rage.bar.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.rage.bar.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Size") then + changed, config.current_config.large_monster_UI.dynamic.rage.bar.size.width = imgui.drag_float("Width", + config.current_config.large_monster_UI.dynamic.rage.bar.size.width, 0.1, 0, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.rage.bar.size.height = imgui.drag_float("Height", + config.current_config.large_monster_UI.dynamic.rage.bar.size.height, 0.1, 0, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Colors") then + if imgui.tree_node("Foreground") then + -- changed, config.current_config.large_monster_UI.dynamic.rage.bar.colors.foreground = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.rage.bar.colors.foreground, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Background") then + -- changed, config.current_config.large_monster_UI.dynamic.rage.bar.colors.background = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.rage.bar.colors.background, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Body Parts") then + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.parts.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.parts.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.parts.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.parts.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Spacing") then + changed, config.current_config.large_monster_UI.dynamic.parts.spacing.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.parts.spacing.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.parts.spacing.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.parts.spacing.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Part Name Label") then + changed, config.current_config.large_monster_UI.dynamic.parts.part_name_label.visibility = imgui.checkbox( + "Visible", config.current_config.large_monster_UI.dynamic.parts.part_name_label.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Include") then + changed, config.current_config.large_monster_UI.dynamic.parts.part_name_label.include.part_name = imgui.checkbox( + "Part Name", config.current_config.large_monster_UI.dynamic.parts.part_name_label.include.part_name); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.parts.part_name_label.include.break_count = + imgui.checkbox("Break Count", + config.current_config.large_monster_UI.dynamic.parts.part_name_label.include.break_count); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.parts.part_name_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.parts.part_name_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.parts.part_name_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.parts.part_name_label.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.parts.part_name_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.parts.part_name_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.dynamic.parts.part_name_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.dynamic.parts.part_name_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.parts.part_name_label.shadow.offset.x = imgui.drag_float( + "X", config.current_config.large_monster_UI.dynamic.parts.part_name_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.parts.part_name_label.shadow.offset.y = imgui.drag_float( + "Y", config.current_config.large_monster_UI.dynamic.parts.part_name_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.parts.part_name_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.parts.part_name_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Text Label") then + changed, config.current_config.large_monster_UI.dynamic.parts.text_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.dynamic.parts.text_label.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.parts.text_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.parts.text_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.parts.text_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.parts.text_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.parts.text_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.parts.text_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.dynamic.parts.text_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.dynamic.parts.text_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.parts.text_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.parts.text_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.parts.text_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.parts.text_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.parts.text_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.parts.text_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Value Label") then + changed, config.current_config.large_monster_UI.dynamic.parts.value_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.dynamic.parts.value_label.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.parts.value_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.parts.value_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.parts.value_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.parts.value_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.parts.value_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.parts.value_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.dynamic.parts.value_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.dynamic.parts.value_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.parts.value_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.parts.value_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.parts.value_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.parts.value_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.parts.value_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.parts.value_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Percentage Label") then + changed, config.current_config.large_monster_UI.dynamic.parts.percentage_label.visibility = imgui.checkbox( + "Visible", config.current_config.large_monster_UI.dynamic.parts.percentage_label.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.parts.percentage_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.parts.percentage_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.parts.percentage_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.parts.percentage_label.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.parts.percentage_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.parts.percentage_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.dynamic.parts.percentage_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.dynamic.parts.percentage_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.parts.percentage_label.shadow.offset.x = + imgui.drag_float("X", config.current_config.large_monster_UI.dynamic.parts.percentage_label.shadow.offset.x, + 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.parts.percentage_label.shadow.offset.y = + imgui.drag_float("Y", config.current_config.large_monster_UI.dynamic.parts.percentage_label.shadow.offset.y, + 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.dynamic.parts.percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.parts.percentage_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Bar") then + changed, config.current_config.large_monster_UI.dynamic.parts.bar.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.dynamic.parts.bar.visibility); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.dynamic.parts.bar.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.dynamic.parts.bar.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.parts.bar.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.dynamic.parts.bar.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Size") then + changed, config.current_config.large_monster_UI.dynamic.parts.bar.size.width = imgui.drag_float("Width", + config.current_config.large_monster_UI.dynamic.parts.bar.size.width, 0.1, 0, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.parts.bar.size.height = imgui.drag_float("Height", + config.current_config.large_monster_UI.dynamic.parts.bar.size.height, 0.1, 0, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Colors") then + if imgui.tree_node("Foreground") then + -- changed, config.current_config.large_monster_UI.dynamic.parts.bar.colors.foreground = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.parts.bar.colors.foreground, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Background") then + -- changed, config.current_config.large_monster_UI.dynamic.parts.bar.colors.background = imgui.color_picker_argb("", config.current_config.large_monster_UI.dynamic.parts.bar.colors.background, color_picker_flags); + config_changed = config_changed or changed; + large_monster_dynamic_UI_changed = large_monster_dynamic_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if large_monster_dynamic_UI_changed then + for _, monster in pairs(large_monster.list) do + large_monster.init_dynamic_UI(monster); + end + end + end - if imgui.tree_node("Stamina") then - if imgui.tree_node("Text Label") then - changed, config.current_config.large_monster_UI.stamina.text_label.visibility = - imgui.checkbox("Visible", config.current_config.large_monster_UI.stamina.text_label.visibility); + if imgui.tree_node("Statically Positioned") then + local large_monster_static_UI_changed = false; + + changed, config.current_config.large_monster_UI.static.enabled = + imgui.checkbox("Enabled", config.current_config.large_monster_UI.static.enabled); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + + if imgui.tree_node("Settings") then + changed, customization_menu.monster_UI_orientation_index = imgui.combo("Orientation", + customization_menu.monster_UI_orientation_index, customization_menu.orientation_types); config_changed = config_changed or changed; - - -- add text format - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.stamina.text_label.offset.x = - imgui.drag_float("X", config.current_config.large_monster_UI.stamina.text_label.offset.x, 0.1, -screen.width, screen.width, - "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.stamina.text_label.offset.y = - imgui.drag_float("Y", config.current_config.large_monster_UI.stamina.text_label.offset.y, 0.1, -screen.height, screen.height, - "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + if changed then + config.current_config.large_monster_UI.static.settings.orientation = + customization_menu.orientation_types[customization_menu.monster_UI_orientation_index]; end - - if imgui.tree_node("Color") then - --changed, config.current_config.large_monster_UI.stamina.text_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.stamina.text_label.color, color_picker_flags); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Shadow") then - changed, config.current_config.large_monster_UI.stamina.text_label.shadow.visibility = - imgui.checkbox("Enable", config.current_config.large_monster_UI.stamina.text_label.shadow.visibility); - config_changed = config_changed or changed; - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.stamina.text_label.shadow.offset.x = - imgui.drag_float("X", config.current_config.large_monster_UI.stamina.text_label.shadow.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.stamina.text_label.shadow.offset.y = - imgui.drag_float("Y", config.current_config.large_monster_UI.stamina.text_label.shadow.offset.y, 0.1, -screen.width, - screen.width, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Color") then - --changed, config.current_config.large_monster_UI.stamina.text_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.stamina.text_label.shadow.color, 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("Value Label") then - changed, config.current_config.large_monster_UI.stamina.value_label.visibility = - imgui.checkbox("Visible", config.current_config.large_monster_UI.stamina.value_label.visibility); - config_changed = config_changed or changed; - - -- add text format - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.stamina.value_label.offset.x = - imgui.drag_float("X", config.current_config.large_monster_UI.stamina.value_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.stamina.value_label.offset.y = - imgui.drag_float("Y", config.current_config.large_monster_UI.stamina.value_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Color") then - --changed, config.current_config.large_monster_UI.stamina.value_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.stamina.value_label.color, color_picker_flags); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Shadow") then - changed, config.current_config.large_monster_UI.stamina.value_label.shadow.visibility = imgui.checkbox("Enable", - config.current_config.large_monster_UI.stamina.value_label.shadow.visibility); - config_changed = config_changed or changed; - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.stamina.value_label.shadow.offset.x = imgui.drag_float("X", - config.current_config.large_monster_UI.stamina.value_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.stamina.value_label.shadow.offset.y = imgui.drag_float("Y", - config.current_config.large_monster_UI.stamina.value_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("Color") then - --changed, config.current_config.large_monster_UI.stamina.value_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.stamina.value_label.shadow.color, 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("Percentage Label") then - changed, config.current_config.large_monster_UI.stamina.percentage_label.visibility = imgui.checkbox("Visible", - config.current_config.large_monster_UI.stamina.percentage_label.visibility); - config_changed = config_changed or changed; - - -- add text format - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.stamina.percentage_label.offset.x = - imgui.drag_float("X", config.current_config.large_monster_UI.stamina.percentage_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.stamina.percentage_label.offset.y = - imgui.drag_float("Y", config.current_config.large_monster_UI.stamina.percentage_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Color") then - --changed, config.current_config.large_monster_UI.stamina.percentage_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.stamina.percentage_label.color, color_picker_flags); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Shadow") then - changed, config.current_config.large_monster_UI.stamina.percentage_label.shadow.visibility = imgui.checkbox("Enable", - config.current_config.large_monster_UI.stamina.percentage_label.shadow.visibility); - config_changed = config_changed or changed; - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.stamina.percentage_label.shadow.offset.x = imgui.drag_float("X", - config.current_config.large_monster_UI.stamina.percentage_label.shadow.offset.x, 0.1, -screen.width, screen.width, - "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.stamina.percentage_label.shadow.offset.y = imgui.drag_float("Y", - config.current_config.large_monster_UI.stamina.percentage_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("Color") then - --changed, config.current_config.large_monster_UI.stamina.percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.stamina.percentage_label.shadow.color, 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("Bar") then - changed, config.current_config.large_monster_UI.stamina.bar.visibility = imgui.checkbox("Visible", config.current_config.large_monster_UI.stamina.bar - .visibility); - config_changed = config_changed or changed; - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.stamina.bar.offset.x = imgui.drag_float("X", config.current_config.large_monster_UI.stamina.bar - .offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.stamina.bar.offset.y = imgui.drag_float("Y", config.current_config.large_monster_UI.stamina.bar - .offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Size") then - changed, config.current_config.large_monster_UI.stamina.bar.size.width = - imgui.drag_float("Width", config.current_config.large_monster_UI.stamina.bar.size.width, 0.1, -screen.width, - screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.stamina.bar.size.height = - imgui.drag_float("Height", config.current_config.large_monster_UI.stamina.bar.size.height, 0.1, -screen.height, - screen.height, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Colors") then - if imgui.tree_node("Foreground") then - --changed, config.current_config.large_monster_UI.stamina.bar.colors.foreground = imgui.color_picker_argb("", config.current_config.large_monster_UI.stamina.bar.colors.foreground, color_picker_flags); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Background") then - --changed, config.current_config.large_monster_UI.stamina.bar.colors.background = imgui.color_picker_argb("", config.current_config.large_monster_UI.stamina.bar.colors.background, color_picker_flags); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - imgui.tree_pop(); - end - + imgui.tree_pop(); end - imgui.tree_pop(); - end + if imgui.tree_node("Position") then + changed, config.current_config.large_monster_UI.static.position.x = + imgui.drag_float("X", config.current_config.large_monster_UI.static.position.x, 0.1, 0, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; - if imgui.tree_node("Rage") then - if imgui.tree_node("Text Label") then - changed, config.current_config.large_monster_UI.rage.text_label.visibility = - imgui.checkbox("Visible", config.current_config.large_monster_UI.rage.text_label.visibility); + changed, config.current_config.large_monster_UI.static.position.y = + imgui.drag_float("Y", config.current_config.large_monster_UI.static.position.y, 0.1, 0, screen.height, "%.1f"); config_changed = config_changed or changed; - - -- add text format - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.rage.text_label.offset.x = - imgui.drag_float("X", config.current_config.large_monster_UI.rage.text_label.offset.x, 0.1, -screen.width, screen.width, - "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.rage.text_label.offset.y = - imgui.drag_float("Y", config.current_config.large_monster_UI.rage.text_label.offset.y, 0.1, -screen.height, screen.height, - "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Color") then - --changed, config.current_config.large_monster_UI.rage.text_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.rage.text_label.color, color_picker_flags); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Shadow") then - changed, config.current_config.large_monster_UI.rage.text_label.shadow.visibility = - imgui.checkbox("Enable", config.current_config.large_monster_UI.rage.text_label.shadow.visibility); - config_changed = config_changed or changed; - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.rage.text_label.shadow.offset.x = - imgui.drag_float("X", config.current_config.large_monster_UI.rage.text_label.shadow.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.rage.text_label.shadow.offset.y = - imgui.drag_float("Y", config.current_config.large_monster_UI.rage.text_label.shadow.offset.y, 0.1, -screen.width, - screen.width, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Color") then - --changed, config.current_config.large_monster_UI.rage.text_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.rage.text_label.shadow.color, 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("Value Label") then - changed, config.current_config.large_monster_UI.rage.value_label.visibility = - imgui.checkbox("Visible", config.current_config.large_monster_UI.rage.value_label.visibility); - config_changed = config_changed or changed; - - -- add text format - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.rage.value_label.offset.x = - imgui.drag_float("X", config.current_config.large_monster_UI.rage.value_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.rage.value_label.offset.y = - imgui.drag_float("Y", config.current_config.large_monster_UI.rage.value_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Color") then - --changed, config.current_config.large_monster_UI.rage.value_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.rage.value_label.color, color_picker_flags); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Shadow") then - changed, config.current_config.large_monster_UI.rage.value_label.shadow.visibility = imgui.checkbox("Enable", - config.current_config.large_monster_UI.rage.value_label.shadow.visibility); - config_changed = config_changed or changed; - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.rage.value_label.shadow.offset.x = imgui.drag_float("X", - config.current_config.large_monster_UI.rage.value_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.rage.value_label.shadow.offset.y = imgui.drag_float("Y", - config.current_config.large_monster_UI.rage.value_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("Color") then - --changed, config.current_config.large_monster_UI.rage.value_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.rage.value_label.shadow.color, 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("Percentage Label") then - changed, config.current_config.large_monster_UI.rage.percentage_label.visibility = imgui.checkbox("Visible", - config.current_config.large_monster_UI.rage.percentage_label.visibility); - config_changed = config_changed or changed; - - -- add text format - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.rage.percentage_label.offset.x = - imgui.drag_float("X", config.current_config.large_monster_UI.rage.percentage_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.rage.percentage_label.offset.y = - imgui.drag_float("Y", config.current_config.large_monster_UI.rage.percentage_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Color") then - --changed, config.current_config.large_monster_UI.rage.percentage_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.rage.percentage_label.color, color_picker_flags); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Shadow") then - changed, config.current_config.large_monster_UI.rage.percentage_label.shadow.visibility = imgui.checkbox("Enable", - config.current_config.large_monster_UI.rage.percentage_label.shadow.visibility); - config_changed = config_changed or changed; - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.rage.percentage_label.shadow.offset.x = imgui.drag_float("X", - config.current_config.large_monster_UI.rage.percentage_label.shadow.offset.x, 0.1, -screen.width, screen.width, - "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.rage.percentage_label.shadow.offset.y = imgui.drag_float("Y", - config.current_config.large_monster_UI.rage.percentage_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("Color") then - --changed, config.current_config.large_monster_UI.rage.percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.rage.percentage_label.shadow.color, 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("Bar") then - changed, config.current_config.large_monster_UI.rage.bar.visibility = imgui.checkbox("Visible", config.current_config.large_monster_UI.rage.bar - .visibility); - config_changed = config_changed or changed; - - if imgui.tree_node("Offset") then - changed, config.current_config.large_monster_UI.rage.bar.offset.x = imgui.drag_float("X", config.current_config.large_monster_UI.rage.bar - .offset.x, 0.1, -screen.width, screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.rage.bar.offset.y = imgui.drag_float("Y", config.current_config.large_monster_UI.rage.bar - .offset.y, 0.1, -screen.height, screen.height, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Size") then - changed, config.current_config.large_monster_UI.rage.bar.size.width = - imgui.drag_float("Width", config.current_config.large_monster_UI.rage.bar.size.width, 0.1, -screen.width, - screen.width, "%.1f"); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.rage.bar.size.height = - imgui.drag_float("Height", config.current_config.large_monster_UI.rage.bar.size.height, 0.1, -screen.height, - screen.height, "%.1f"); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Colors") then - if imgui.tree_node("Foreground") then - --changed, config.current_config.large_monster_UI.rage.bar.colors.foreground = imgui.color_picker_argb("", config.current_config.large_monster_UI.rage.bar.colors.foreground, color_picker_flags); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - if imgui.tree_node("Background") then - --changed, config.current_config.large_monster_UI.rage.bar.colors.background = imgui.color_picker_argb("", config.current_config.large_monster_UI.rage.bar.colors.background, color_picker_flags); - config_changed = config_changed or changed; - - imgui.tree_pop(); - end - - imgui.tree_pop(); - end - + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + imgui.tree_pop(); end - imgui.tree_pop(); + if imgui.tree_node("Spacing") then + changed, config.current_config.large_monster_UI.static.spacing.x = + imgui.drag_float("X", config.current_config.large_monster_UI.static.spacing.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.spacing.y = + imgui.drag_float("Y", config.current_config.large_monster_UI.static.spacing.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Sorting") then + changed, customization_menu.monster_UI_sort_type_index = imgui.combo("Type", + customization_menu.monster_UI_sort_type_index, customization_menu.monster_UI_sorting_types); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + if changed then + config.current_config.large_monster_UI.static.sorting.type = + customization_menu.monster_UI_sorting_types[customization_menu.monster_UI_sort_type_index]; + end + + changed, config.current_config.large_monster_UI.static.sorting.reversed_order = + imgui.checkbox("Reversed Order", config.current_config.large_monster_UI.static.sorting.reversed_order); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Monster Name Label") then + changed, config.current_config.large_monster_UI.static.monster_name_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.static.monster_name_label.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Include") then + changed, config.current_config.large_monster_UI.static.monster_name_label.include.monster_name = imgui.checkbox( + "Monster Name", config.current_config.large_monster_UI.static.monster_name_label.include.monster_name); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.monster_name_label.include.crown = imgui.checkbox("Crown", + config.current_config.large_monster_UI.static.monster_name_label.include.crown); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.monster_name_label.include.size = imgui.checkbox("Size", + config.current_config.large_monster_UI.static.monster_name_label.include.size); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.monster_name_label.include.scrown_thresholds = + imgui.checkbox("Crown Thresholds", + config.current_config.large_monster_UI.static.monster_name_label.include.scrown_thresholds); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.monster_name_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.monster_name_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.monster_name_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.monster_name_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.monster_name_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.monster_name_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.static.monster_name_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.static.monster_name_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.monster_name_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.monster_name_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.monster_name_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.monster_name_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.monster_name_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.monster_name_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Health") then + if imgui.tree_node("Text Label") then + changed, config.current_config.large_monster_UI.static.health.text_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.static.health.text_label.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.health.text_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.health.text_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.health.text_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.health.text_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.health.text_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.health.text_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.static.health.text_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.static.health.text_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.health.text_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.health.text_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.health.text_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.health.text_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.health.text_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.health.text_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Value Label") then + changed, config.current_config.large_monster_UI.static.health.value_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.static.health.value_label.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.health.value_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.health.value_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.health.value_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.health.value_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.health.value_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.health.value_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.static.health.value_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.static.health.value_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.health.value_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.health.value_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.health.value_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.health.value_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.health.value_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.health.value_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Percentage Label") then + changed, config.current_config.large_monster_UI.static.health.percentage_label.visibility = imgui.checkbox( + "Visible", config.current_config.large_monster_UI.static.health.percentage_label.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.health.percentage_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.health.percentage_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.health.percentage_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.health.percentage_label.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.health.percentage_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.health.percentage_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.static.health.percentage_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.static.health.percentage_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.health.percentage_label.shadow.offset.x = + imgui.drag_float("X", config.current_config.large_monster_UI.static.health.percentage_label.shadow.offset.x, + 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.health.percentage_label.shadow.offset.y = + imgui.drag_float("Y", config.current_config.large_monster_UI.static.health.percentage_label.shadow.offset.y, + 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.health.percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.health.percentage_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Bar") then + changed, config.current_config.large_monster_UI.static.health.bar.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.static.health.bar.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.health.bar.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.health.bar.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.health.bar.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.health.bar.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Size") then + changed, config.current_config.large_monster_UI.static.health.bar.size.width = imgui.drag_float("Width", + config.current_config.large_monster_UI.static.health.bar.size.width, 0.1, 0, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.health.bar.size.height = imgui.drag_float("Height", + config.current_config.large_monster_UI.static.health.bar.size.height, 0.1, 0, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Colors") then + if imgui.tree_node("Foreground") then + -- changed, config.current_config.large_monster_UI.static.health.bar.colors.foreground = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.health.bar.colors.foreground, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Background") then + -- changed, config.current_config.large_monster_UI.static.health.bar.colors.background = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.health.bar.colors.background, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Monster can be captured") then + if imgui.tree_node("Foreground") then + -- changed, config.current_config.large_monster_UI.static.health.bar.colors.capture.foreground = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.health.bar.colors.capture.foreground, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Background") then + -- changed, config.current_config.large_monster_UI.static.health.bar.colors.capture.background = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.health.bar.colors.capture.background, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Stamina") then + if imgui.tree_node("Text Label") then + changed, config.current_config.large_monster_UI.static.stamina.text_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.static.stamina.text_label.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.stamina.text_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.stamina.text_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.stamina.text_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.stamina.text_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.stamina.text_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.stamina.text_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.static.stamina.text_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.static.stamina.text_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.stamina.text_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.stamina.text_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.stamina.text_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.stamina.text_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.stamina.text_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.stamina.text_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Value Label") then + changed, config.current_config.large_monster_UI.static.stamina.value_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.static.stamina.value_label.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.stamina.value_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.stamina.value_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.stamina.value_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.stamina.value_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.stamina.value_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.stamina.value_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.static.stamina.value_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.static.stamina.value_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.stamina.value_label.shadow.offset.x = imgui.drag_float( + "X", config.current_config.large_monster_UI.static.stamina.value_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.stamina.value_label.shadow.offset.y = imgui.drag_float( + "Y", config.current_config.large_monster_UI.static.stamina.value_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.stamina.value_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.stamina.value_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Percentage Label") then + changed, config.current_config.large_monster_UI.static.stamina.percentage_label.visibility = imgui.checkbox( + "Visible", config.current_config.large_monster_UI.static.stamina.percentage_label.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.stamina.percentage_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.stamina.percentage_label.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.stamina.percentage_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.stamina.percentage_label.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.stamina.percentage_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.stamina.percentage_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.static.stamina.percentage_label.shadow.visibility = + imgui.checkbox("Enable", config.current_config.large_monster_UI.static.stamina.percentage_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.stamina.percentage_label.shadow.offset.x = + imgui.drag_float("X", config.current_config.large_monster_UI.static.stamina.percentage_label.shadow.offset.x, + 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.stamina.percentage_label.shadow.offset.y = + imgui.drag_float("Y", config.current_config.large_monster_UI.static.stamina.percentage_label.shadow.offset.y, + 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.stamina.percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.stamina.percentage_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Bar") then + changed, config.current_config.large_monster_UI.static.stamina.bar.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.static.stamina.bar.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.stamina.bar.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.stamina.bar.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.stamina.bar.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.stamina.bar.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Size") then + changed, config.current_config.large_monster_UI.static.stamina.bar.size.width = imgui.drag_float("Width", + config.current_config.large_monster_UI.static.stamina.bar.size.width, 0.1, 0, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.stamina.bar.size.height = imgui.drag_float("Height", + config.current_config.large_monster_UI.static.stamina.bar.size.height, 0.1, 0, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Colors") then + if imgui.tree_node("Foreground") then + -- changed, config.current_config.large_monster_UI.static.stamina.bar.colors.foreground = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.stamina.bar.colors.foreground, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Background") then + -- changed, config.current_config.large_monster_UI.static.stamina.bar.colors.background = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.stamina.bar.colors.background, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Rage") then + if imgui.tree_node("Text Label") then + changed, config.current_config.large_monster_UI.static.rage.text_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.static.rage.text_label.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.rage.text_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.rage.text_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.rage.text_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.rage.text_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.rage.text_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.rage.text_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.static.rage.text_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.static.rage.text_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.rage.text_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.rage.text_label.shadow.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.rage.text_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.rage.text_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.rage.text_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.rage.text_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Value Label") then + changed, config.current_config.large_monster_UI.static.rage.value_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.static.rage.value_label.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.rage.value_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.rage.value_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.rage.value_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.rage.value_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.rage.value_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.rage.value_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.static.rage.value_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.static.rage.value_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.rage.value_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.rage.value_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.rage.value_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.rage.value_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.rage.value_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.rage.value_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Percentage Label") then + changed, config.current_config.large_monster_UI.static.rage.percentage_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.static.rage.percentage_label.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.rage.percentage_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.rage.percentage_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.rage.percentage_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.rage.percentage_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.rage.percentage_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.rage.percentage_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.static.rage.percentage_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.static.rage.percentage_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.rage.percentage_label.shadow.offset.x = imgui.drag_float( + "X", config.current_config.large_monster_UI.static.rage.percentage_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.rage.percentage_label.shadow.offset.y = imgui.drag_float( + "Y", config.current_config.large_monster_UI.static.rage.percentage_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.rage.percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.rage.percentage_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Bar") then + changed, config.current_config.large_monster_UI.static.rage.bar.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.static.rage.bar.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.rage.bar.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.rage.bar.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.rage.bar.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.rage.bar.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Size") then + changed, config.current_config.large_monster_UI.static.rage.bar.size.width = imgui.drag_float("Width", + config.current_config.large_monster_UI.static.rage.bar.size.width, 0.1, 0, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.rage.bar.size.height = imgui.drag_float("Height", + config.current_config.large_monster_UI.static.rage.bar.size.height, 0.1, 0, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Colors") then + if imgui.tree_node("Foreground") then + -- changed, config.current_config.large_monster_UI.static.rage.bar.colors.foreground = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.rage.bar.colors.foreground, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Background") then + -- changed, config.current_config.large_monster_UI.static.rage.bar.colors.background = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.rage.bar.colors.background, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Body Parts") then + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.parts.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.parts.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.parts.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.parts.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Spacing") then + changed, config.current_config.large_monster_UI.static.parts.spacing.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.parts.spacing.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.parts.spacing.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.parts.spacing.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Part Name Label") then + changed, config.current_config.large_monster_UI.static.parts.part_name_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.static.parts.part_name_label.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Include") then + changed, config.current_config.large_monster_UI.static.parts.part_name_label.include.part_name = imgui.checkbox( + "Part Name", config.current_config.large_monster_UI.static.parts.part_name_label.include.part_name); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.parts.part_name_label.include.break_count = imgui.checkbox( + "Break Count", config.current_config.large_monster_UI.static.parts.part_name_label.include.break_count); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.parts.part_name_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.parts.part_name_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.parts.part_name_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.parts.part_name_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.parts.part_name_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.parts.part_name_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.static.parts.part_name_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.static.parts.part_name_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.parts.part_name_label.shadow.offset.x = imgui.drag_float( + "X", config.current_config.large_monster_UI.static.parts.part_name_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.parts.part_name_label.shadow.offset.y = imgui.drag_float( + "Y", config.current_config.large_monster_UI.static.parts.part_name_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.parts.part_name_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.parts.part_name_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Text Label") then + changed, config.current_config.large_monster_UI.static.parts.text_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.static.parts.text_label.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.parts.text_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.parts.text_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.parts.text_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.parts.text_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.parts.text_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.parts.text_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.static.parts.text_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.static.parts.text_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.parts.text_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.parts.text_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.parts.text_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.parts.text_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.parts.text_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.parts.text_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Value Label") then + changed, config.current_config.large_monster_UI.static.parts.value_label.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.static.parts.value_label.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.parts.value_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.parts.value_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.parts.value_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.parts.value_label.offset.y, 0.1, -screen.height, screen.height, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.parts.value_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.parts.value_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.static.parts.value_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.static.parts.value_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.parts.value_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.parts.value_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.parts.value_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.parts.value_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.parts.value_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.parts.value_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Percentage Label") then + changed, config.current_config.large_monster_UI.static.parts.percentage_label.visibility = imgui.checkbox( + "Visible", config.current_config.large_monster_UI.static.parts.percentage_label.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + -- add text format + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.parts.percentage_label.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.parts.percentage_label.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.parts.percentage_label.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.parts.percentage_label.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.parts.percentage_label.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.parts.percentage_label.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Shadow") then + changed, config.current_config.large_monster_UI.static.parts.percentage_label.shadow.visibility = imgui.checkbox( + "Enable", config.current_config.large_monster_UI.static.parts.percentage_label.shadow.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.parts.percentage_label.shadow.offset.x = imgui.drag_float( + "X", config.current_config.large_monster_UI.static.parts.percentage_label.shadow.offset.x, 0.1, -screen.width, + screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.parts.percentage_label.shadow.offset.y = imgui.drag_float( + "Y", config.current_config.large_monster_UI.static.parts.percentage_label.shadow.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Color") then + -- changed, config.current_config.large_monster_UI.static.parts.percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.parts.percentage_label.shadow.color, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if imgui.tree_node("Bar") then + changed, config.current_config.large_monster_UI.static.parts.bar.visibility = imgui.checkbox("Visible", + config.current_config.large_monster_UI.static.parts.bar.visibility); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + if imgui.tree_node("Offset") then + changed, config.current_config.large_monster_UI.static.parts.bar.offset.x = imgui.drag_float("X", + config.current_config.large_monster_UI.static.parts.bar.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.parts.bar.offset.y = imgui.drag_float("Y", + config.current_config.large_monster_UI.static.parts.bar.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Size") then + changed, config.current_config.large_monster_UI.static.parts.bar.size.width = imgui.drag_float("Width", + config.current_config.large_monster_UI.static.parts.bar.size.width, 0.1, 0, screen.width, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + changed, config.current_config.large_monster_UI.static.parts.bar.size.height = imgui.drag_float("Height", + config.current_config.large_monster_UI.static.parts.bar.size.height, 0.1, 0, screen.height, "%.1f"); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Colors") then + if imgui.tree_node("Foreground") then + -- changed, config.current_config.large_monster_UI.static.parts.bar.colors.foreground = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.parts.bar.colors.foreground, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + if imgui.tree_node("Background") then + -- changed, config.current_config.large_monster_UI.static.parts.bar.colors.background = imgui.color_picker_argb("", config.current_config.large_monster_UI.static.parts.bar.colors.background, color_picker_flags); + config_changed = config_changed or changed; + large_monster_static_UI_changed = large_monster_static_UI_changed or changed; + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + imgui.tree_pop(); + end + + if large_monster_static_UI_changed then + for _, monster in pairs(large_monster.list) do + large_monster.init_static_UI(monster); + end + end + end imgui.tree_pop(); @@ -1680,63 +3601,66 @@ function customization_menu.draw() config_changed = config_changed or changed; if imgui.tree_node("Position") then - changed, config.current_config.time_UI.position.x = imgui.drag_float("X", config.current_config.time_UI.position.x, 0.1, 0, screen.width, - "%.1f"); + changed, config.current_config.time_UI.position.x = imgui.drag_float("X", config.current_config.time_UI.position.x, + 0.1, 0, screen.width, "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.time_UI.position.y = imgui.drag_float("Y", config.current_config.time_UI.position.y, 0.1, 0, screen.height, - "%.1f"); + changed, config.current_config.time_UI.position.y = imgui.drag_float("Y", config.current_config.time_UI.position.y, + 0.1, 0, screen.height, "%.1f"); config_changed = config_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Time Label") then - changed, config.current_config.time_UI.time_label.visibility = imgui.checkbox("Visible", config.current_config.time_UI.time_label.visibility); + changed, config.current_config.time_UI.time_label.visibility = + imgui.checkbox("Visible", config.current_config.time_UI.time_label.visibility); config_changed = config_changed or changed; -- add text format if imgui.tree_node("Offset") then - changed, config.current_config.time_UI.time_label.offset.x = imgui.drag_float("X", config.current_config.time_UI.time_label.offset.x, 0.1, - -screen.width, screen.width, "%.1f"); + changed, config.current_config.time_UI.time_label.offset.x = + imgui.drag_float("X", config.current_config.time_UI.time_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.time_UI.time_label.offset.y = imgui.drag_float("Y", config.current_config.time_UI.time_label.offset.y, 0.1, - -screen.height, screen.height, "%.1f"); + changed, config.current_config.time_UI.time_label.offset.y = + imgui.drag_float("Y", config.current_config.time_UI.time_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); config_changed = config_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Color") then - --changed, config.current_config.time_UI.time_label.color = imgui.color_picker_argb("", config.current_config.time_UI.time_label.color, color_picker_flags); + -- changed, config.current_config.time_UI.time_label.color = imgui.color_picker_argb("", config.current_config.time_UI.time_label.color, color_picker_flags); config_changed = config_changed or changed; - + imgui.tree_pop(); end if imgui.tree_node("Shadow") then - changed, config.current_config.time_UI.time_label.shadow.visibility = imgui.checkbox("Enable", - config.current_config.time_UI.time_label.shadow.visibility); + changed, config.current_config.time_UI.time_label.shadow.visibility = + imgui.checkbox("Enable", config.current_config.time_UI.time_label.shadow.visibility); config_changed = config_changed or changed; if imgui.tree_node("Offset") then - changed, config.current_config.time_UI.time_label.shadow.offset.x = imgui.drag_float("X", - config.current_config.time_UI.time_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + changed, config.current_config.time_UI.time_label.shadow.offset.x = + imgui.drag_float("X", config.current_config.time_UI.time_label.shadow.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.time_UI.time_label.shadow.offset.y = imgui.drag_float("Y", - config.current_config.time_UI.time_label.shadow.offset.y, 0.1, -screen.width, screen.width, "%.1f"); + changed, config.current_config.time_UI.time_label.shadow.offset.y = + imgui.drag_float("Y", config.current_config.time_UI.time_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("Color") then - --changed, config.current_config.time_UI.time_label.shadow.color = imgui.color_picker_argb("", config.current_config.time_UI.time_label.shadow.color, color_picker_flags); + -- changed, config.current_config.time_UI.time_label.shadow.color = imgui.color_picker_argb("", config.current_config.time_UI.time_label.shadow.color, color_picker_flags); config_changed = config_changed or changed; - + imgui.tree_pop(); end @@ -1749,51 +3673,58 @@ function customization_menu.draw() end if imgui.tree_node("Damage Meter UI") then - changed, config.current_config.damage_meter_UI.enabled = imgui.checkbox("Enabled", config.current_config.damage_meter_UI.enabled); + changed, config.current_config.damage_meter_UI.enabled = imgui.checkbox("Enabled", + config.current_config.damage_meter_UI.enabled); config_changed = config_changed or changed; if imgui.tree_node("Settings") then changed, config.current_config.damage_meter_UI.settings.hide_module_if_total_damage_is_zero = imgui.checkbox( - "Hide Module if Total Damage is 0", config.current_config.damage_meter_UI.settings.hide_module_if_total_damage_is_zero); + "Hide Module if Total Damage is 0", + config.current_config.damage_meter_UI.settings.hide_module_if_total_damage_is_zero); config_changed = config_changed or changed; changed, config.current_config.damage_meter_UI.settings.hide_player_if_player_damage_is_zero = imgui.checkbox( - "Hide Player if Player Damage is 0", config.current_config.damage_meter_UI.settings.hide_player_if_player_damage_is_zero); + "Hide Player if Player Damage is 0", + config.current_config.damage_meter_UI.settings.hide_player_if_player_damage_is_zero); config_changed = config_changed or changed; changed, config.current_config.damage_meter_UI.settings.total_damage_offset_is_relative = imgui.checkbox( "Total Damage Offset is Relative", config.current_config.damage_meter_UI.settings.total_damage_offset_is_relative); config_changed = config_changed or changed; - changed, customization_menu.damage_meter_UI_orientation_index = imgui.combo("Orientation", customization_menu.damage_meter_UI_orientation_index, - customization_menu.orientation_types); + changed, customization_menu.damage_meter_UI_orientation_index = imgui.combo("Orientation", + customization_menu.damage_meter_UI_orientation_index, customization_menu.orientation_types); config_changed = config_changed or changed; if changed then - config.current_config.damage_meter_UI.settings.orientation = customization_menu.orientation_types[customization_menu.damage_meter_UI_orientation_index]; + config.current_config.damage_meter_UI.settings.orientation = + customization_menu.orientation_types[customization_menu.damage_meter_UI_orientation_index]; end - changed, customization_menu.damage_meter_UI_highlighted_bar_index = imgui.combo("Highlighted Bar", - customization_menu.damage_meter_UI_highlighted_bar_index, customization_menu.damage_meter_UI_highlighted_bar_types); + changed, customization_menu.damage_meter_UI_highlighted_bar_index = + imgui.combo("Highlighted Bar", customization_menu.damage_meter_UI_highlighted_bar_index, + customization_menu.damage_meter_UI_highlighted_bar_types); config_changed = config_changed or changed; if changed then config.current_config.damage_meter_UI.settings.highlighted_bar = - customization_menu.damage_meter_UI_highlighted_bar_types[customization_menu.damage_meter_UI_highlighted_bar_index]; + customization_menu.damage_meter_UI_highlighted_bar_types[customization_menu.damage_meter_UI_highlighted_bar_index]; end - changed, customization_menu.damage_meter_UI_damage_bar_relative_index = imgui.combo("Damage Bars are Relative to", - customization_menu.damage_meter_UI_damage_bar_relative_index, customization_menu.damage_meter_UI_damage_bar_relative_types); + changed, customization_menu.damage_meter_UI_damage_bar_relative_index = + imgui.combo("Damage Bars are Relative to", customization_menu.damage_meter_UI_damage_bar_relative_index, + customization_menu.damage_meter_UI_damage_bar_relative_types); config_changed = config_changed or changed; if changed then config.current_config.damage_meter_UI.settings.damage_bar_relative_to = - customization_menu.damage_meter_UI_damage_bar_relative_types[customization_menu.damage_meter_UI_damage_bar_relative_index]; + customization_menu.damage_meter_UI_damage_bar_relative_types[customization_menu.damage_meter_UI_damage_bar_relative_index]; end - changed, customization_menu.damage_meter_UI_my_damage_bar_location_index = imgui.combo("My Damage Bar Location", - customization_menu.damage_meter_UI_my_damage_bar_location_index, customization_menu.damage_meter_UI_my_damage_bar_location_types); + changed, customization_menu.damage_meter_UI_my_damage_bar_location_index = + imgui.combo("My Damage Bar Location", customization_menu.damage_meter_UI_my_damage_bar_location_index, + customization_menu.damage_meter_UI_my_damage_bar_location_types); config_changed = config_changed or changed; if changed then config.current_config.damage_meter_UI.settings.my_damage_bar_location = - customization_menu.damage_meter_UI_my_damage_bar_location_types[customization_menu.damage_meter_UI_my_damage_bar_location_index]; + customization_menu.damage_meter_UI_my_damage_bar_location_types[customization_menu.damage_meter_UI_my_damage_bar_location_index]; end imgui.tree_pop(); @@ -1801,13 +3732,13 @@ function customization_menu.draw() if imgui.tree_node("Tracked Monster Types") then local tracked_monster_types_changed = false; - changed, config.current_config.damage_meter_UI.tracked_monster_types.small_monsters = - imgui.checkbox("Small Monsters", config.current_config.damage_meter_UI.tracked_monster_types.small_monsters); + changed, config.current_config.damage_meter_UI.tracked_monster_types.small_monsters = imgui.checkbox( + "Small Monsters", config.current_config.damage_meter_UI.tracked_monster_types.small_monsters); config_changed = config_changed or changed; tracked_monster_types_changed = tracked_monster_types_changed or changed; - changed, config.current_config.damage_meter_UI.tracked_monster_types.large_monsters = - imgui.checkbox("Large Monsters", config.current_config.damage_meter_UI.tracked_monster_types.large_monsters); + changed, config.current_config.damage_meter_UI.tracked_monster_types.large_monsters = imgui.checkbox( + "Large Monsters", config.current_config.damage_meter_UI.tracked_monster_types.large_monsters); config_changed = config_changed or changed; tracked_monster_types_changed = tracked_monster_types_changed or changed; @@ -1838,8 +3769,8 @@ function customization_menu.draw() config_changed = config_changed or changed; tracked_damage_types_changed = tracked_damage_types_changed or changed; - changed, config.current_config.damage_meter_UI.tracked_damage_types.installation_damage = - imgui.checkbox("Installation Damage", config.current_config.damage_meter_UI.tracked_damage_types.installation_damage); + changed, config.current_config.damage_meter_UI.tracked_damage_types.installation_damage = imgui.checkbox( + "Installation Damage", config.current_config.damage_meter_UI.tracked_damage_types.installation_damage); config_changed = config_changed or changed; tracked_damage_types_changed = tracked_damage_types_changed or changed; @@ -1864,85 +3795,86 @@ function customization_menu.draw() end if imgui.tree_node("Spacing") then - changed, config.current_config.damage_meter_UI.spacing.x = imgui.drag_float("X", - config.current_config.damage_meter_UI.spacing.x, 0.1, 0, screen.width, "%.1f"); + changed, config.current_config.damage_meter_UI.spacing.x = + imgui.drag_float("X", config.current_config.damage_meter_UI.spacing.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.spacing.y = imgui.drag_float("Y", - config.current_config.damage_meter_UI.spacing.y, 0.1, 0, screen.width, "%.1f"); + changed, config.current_config.damage_meter_UI.spacing.y = + imgui.drag_float("Y", config.current_config.damage_meter_UI.spacing.y, 0.1, -screen.height, screen.height, "%.1f"); config_changed = config_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Position") then - changed, config.current_config.damage_meter_UI.position.x = imgui.drag_float("X", config.current_config.damage_meter_UI.position.x, 0.1, 0, - screen.width, "%.1f"); + changed, config.current_config.damage_meter_UI.position.x = + imgui.drag_float("X", config.current_config.damage_meter_UI.position.x, 0.1, 0, screen.width, "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.position.y = imgui.drag_float("Y", config.current_config.damage_meter_UI.position.y, 0.1, 0, - screen.height, "%.1f"); + changed, config.current_config.damage_meter_UI.position.y = + imgui.drag_float("Y", config.current_config.damage_meter_UI.position.y, 0.1, 0, screen.height, "%.1f"); config_changed = config_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Sorting") then - changed, customization_menu.damage_meter_UI_sort_type_index = imgui.combo("Type", customization_menu.damage_meter_UI_sort_type_index, - customization_menu.damage_meter_UI_sorting_types); + changed, customization_menu.damage_meter_UI_sort_type_index = imgui.combo("Type", + customization_menu.damage_meter_UI_sort_type_index, customization_menu.damage_meter_UI_sorting_types); config_changed = config_changed or changed; if changed then - config.current_config.damage_meter_UI.sorting.type = customization_menu.damage_meter_UI_sorting_types[customization_menu.damage_meter_UI_sort_type_index]; + config.current_config.damage_meter_UI.sorting.type = + customization_menu.damage_meter_UI_sorting_types[customization_menu.damage_meter_UI_sort_type_index]; end - changed, config.current_config.damage_meter_UI.sorting.reversed_order = imgui.checkbox("Reversed Order", - config.current_config.damage_meter_UI.sorting.reversed_order); + changed, config.current_config.damage_meter_UI.sorting.reversed_order = + imgui.checkbox("Reversed Order", config.current_config.damage_meter_UI.sorting.reversed_order); config_changed = config_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Player Name Label") then - changed, config.current_config.damage_meter_UI.player_name_label.visibility = - imgui.checkbox("Visible", config.current_config.damage_meter_UI.player_name_label.visibility); + changed, config.current_config.damage_meter_UI.player_name_label.visibility = imgui.checkbox("Visible", + config.current_config.damage_meter_UI.player_name_label.visibility); config_changed = config_changed or changed; if imgui.tree_node("Include") then if imgui.tree_node("Me") then - changed, config.current_config.damage_meter_UI.player_name_label.include.myself.hunter_rank = imgui.checkbox("Hunter Rank", - config.current_config.damage_meter_UI.player_name_label.include.myself.hunter_rank); + changed, config.current_config.damage_meter_UI.player_name_label.include.myself.hunter_rank = imgui.checkbox( + "Hunter Rank", config.current_config.damage_meter_UI.player_name_label.include.myself.hunter_rank); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.player_name_label.include.myself.word_player = - imgui.checkbox("Word \"Player\"", config.current_config.damage_meter_UI.player_name_label.include.myself.word_player); + changed, config.current_config.damage_meter_UI.player_name_label.include.myself.word_player = imgui.checkbox( + "Word \"Player\"", config.current_config.damage_meter_UI.player_name_label.include.myself.word_player); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.player_name_label.include.myself.player_id = imgui.checkbox("Player ID", - config.current_config.damage_meter_UI.player_name_label.include.myself.player_id); + changed, config.current_config.damage_meter_UI.player_name_label.include.myself.player_id = imgui.checkbox( + "Player ID", config.current_config.damage_meter_UI.player_name_label.include.myself.player_id); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.player_name_label.include.myself.player_name = imgui.checkbox("Player Name", - config.current_config.damage_meter_UI.player_name_label.include.myself.player_name); + changed, config.current_config.damage_meter_UI.player_name_label.include.myself.player_name = imgui.checkbox( + "Player Name", config.current_config.damage_meter_UI.player_name_label.include.myself.player_name); config_changed = config_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Other Players") then - changed, config.current_config.damage_meter_UI.player_name_label.include.others.hunter_rank = imgui.checkbox("Hunter Rank", - config.current_config.damage_meter_UI.player_name_label.include.others.hunter_rank); + changed, config.current_config.damage_meter_UI.player_name_label.include.others.hunter_rank = imgui.checkbox( + "Hunter Rank", config.current_config.damage_meter_UI.player_name_label.include.others.hunter_rank); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.player_name_label.include.others.word_player = - imgui.checkbox("Word \"Player\"", config.current_config.damage_meter_UI.player_name_label.include.others.word_player); + changed, config.current_config.damage_meter_UI.player_name_label.include.others.word_player = imgui.checkbox( + "Word \"Player\"", config.current_config.damage_meter_UI.player_name_label.include.others.word_player); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.player_name_label.include.others.player_id = imgui.checkbox("Player ID", - config.current_config.damage_meter_UI.player_name_label.include.others.player_id); + changed, config.current_config.damage_meter_UI.player_name_label.include.others.player_id = imgui.checkbox( + "Player ID", config.current_config.damage_meter_UI.player_name_label.include.others.player_id); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.player_name_label.include.others.player_name = imgui.checkbox("Player Name", - config.current_config.damage_meter_UI.player_name_label.include.others.player_name); + changed, config.current_config.damage_meter_UI.player_name_label.include.others.player_name = imgui.checkbox( + "Player Name", config.current_config.damage_meter_UI.player_name_label.include.others.player_name); config_changed = config_changed or changed; imgui.tree_pop(); @@ -1952,23 +3884,21 @@ function customization_menu.draw() end if imgui.tree_node("Offset") then - changed, config.current_config.damage_meter_UI.player_name_label.offset.x = - imgui.drag_float("X", config.current_config.damage_meter_UI.player_name_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.damage_meter_UI.player_name_label.offset.x = imgui.drag_float("X", + config.current_config.damage_meter_UI.player_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.player_name_label.offset.y = - imgui.drag_float("Y", config.current_config.damage_meter_UI.player_name_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); + changed, config.current_config.damage_meter_UI.player_name_label.offset.y = imgui.drag_float("Y", + config.current_config.damage_meter_UI.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("Color") then - --changed, config.current_config.damage_meter_UI.player_name_label.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.player_name_label.color, color_picker_flags); + -- changed, config.current_config.damage_meter_UI.player_name_label.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.player_name_label.color, color_picker_flags); config_changed = config_changed or changed; - + imgui.tree_pop(); end @@ -1978,23 +3908,22 @@ function customization_menu.draw() config_changed = config_changed or changed; if imgui.tree_node("Offset") then - changed, config.current_config.damage_meter_UI.player_name_label.shadow.offset.x = - imgui.drag_float("X", config.current_config.damage_meter_UI.player_name_label.shadow.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.damage_meter_UI.player_name_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.damage_meter_UI.player_name_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.player_name_label.shadow.offset.y = - imgui.drag_float("Y", config.current_config.damage_meter_UI.player_name_label.shadow.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); + changed, config.current_config.damage_meter_UI.player_name_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.damage_meter_UI.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("Color") then - --changed, config.current_config.damage_meter_UI.player_name_label.shadow.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.player_name_label.shadow.color, color_picker_flags); + -- changed, config.current_config.damage_meter_UI.player_name_label.shadow.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.player_name_label.shadow.color, color_picker_flags); config_changed = config_changed or changed; - + imgui.tree_pop(); end @@ -2005,30 +3934,28 @@ function customization_menu.draw() end if imgui.tree_node("Damage Value Label") then - changed, config.current_config.damage_meter_UI.damage_value_label.visibility = - imgui.checkbox("Visible", config.current_config.damage_meter_UI.damage_value_label.visibility); + changed, config.current_config.damage_meter_UI.damage_value_label.visibility = imgui.checkbox("Visible", + config.current_config.damage_meter_UI.damage_value_label.visibility); config_changed = config_changed or changed; -- add text format if imgui.tree_node("Offset") then - changed, config.current_config.damage_meter_UI.damage_value_label.offset.x = - imgui.drag_float("X", config.current_config.damage_meter_UI.damage_value_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.damage_meter_UI.damage_value_label.offset.x = imgui.drag_float("X", + config.current_config.damage_meter_UI.damage_value_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.damage_value_label.offset.y = - imgui.drag_float("Y", config.current_config.damage_meter_UI.damage_value_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); + changed, config.current_config.damage_meter_UI.damage_value_label.offset.y = imgui.drag_float("Y", + config.current_config.damage_meter_UI.damage_value_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); config_changed = config_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Color") then - --changed, config.current_config.damage_meter_UI.damage_value_label.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.damage_value_label.color, color_picker_flags); + -- changed, config.current_config.damage_meter_UI.damage_value_label.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.damage_value_label.color, color_picker_flags); config_changed = config_changed or changed; - + imgui.tree_pop(); end @@ -2038,23 +3965,22 @@ function customization_menu.draw() config_changed = config_changed or changed; if imgui.tree_node("Offset") then - changed, config.current_config.damage_meter_UI.damage_value_label.shadow.offset.x = - imgui.drag_float("X", config.current_config.damage_meter_UI.damage_value_label.shadow.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.damage_meter_UI.damage_value_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.damage_meter_UI.damage_value_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.damage_value_label.shadow.offset.y = - imgui.drag_float("Y", config.current_config.damage_meter_UI.damage_value_label.shadow.offset.y, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.damage_meter_UI.damage_value_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.damage_meter_UI.damage_value_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("Color") then - --changed, config.current_config.damage_meter_UI.damage_value_label.shadow.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.damage_value_label.shadow.color, color_picker_flags); + -- changed, config.current_config.damage_meter_UI.damage_value_label.shadow.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.damage_value_label.shadow.color, color_picker_flags); config_changed = config_changed or changed; - + imgui.tree_pop(); end @@ -2065,30 +3991,28 @@ function customization_menu.draw() end if imgui.tree_node("Damage Percentage Label") then - changed, config.current_config.damage_meter_UI.damage_percentage_label.visibility = - imgui.checkbox("Visible", config.current_config.damage_meter_UI.damage_percentage_label.visibility); + changed, config.current_config.damage_meter_UI.damage_percentage_label.visibility = imgui.checkbox("Visible", + config.current_config.damage_meter_UI.damage_percentage_label.visibility); config_changed = config_changed or changed; -- add text format if imgui.tree_node("Offset") then - changed, config.current_config.damage_meter_UI.damage_percentage_label.offset.x = - imgui.drag_float("X", config.current_config.damage_meter_UI.damage_percentage_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.damage_meter_UI.damage_percentage_label.offset.x = imgui.drag_float("X", + config.current_config.damage_meter_UI.damage_percentage_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.damage_percentage_label.offset.y = - imgui.drag_float("Y", config.current_config.damage_meter_UI.damage_percentage_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); + changed, config.current_config.damage_meter_UI.damage_percentage_label.offset.y = imgui.drag_float("Y", + config.current_config.damage_meter_UI.damage_percentage_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); config_changed = config_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Color") then - --changed, config.current_config.damage_meter_UI.damage_percentage_label.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.damage_percentage_label.color, color_picker_flags); + -- changed, config.current_config.damage_meter_UI.damage_percentage_label.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.damage_percentage_label.color, color_picker_flags); config_changed = config_changed or changed; - + imgui.tree_pop(); end @@ -2099,7 +4023,8 @@ function customization_menu.draw() if imgui.tree_node("Offset") then changed, config.current_config.damage_meter_UI.damage_percentage_label.shadow.offset.x = imgui.drag_float("X", - config.current_config.damage_meter_UI.damage_percentage_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + config.current_config.damage_meter_UI.damage_percentage_label.shadow.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); config_changed = config_changed or changed; changed, config.current_config.damage_meter_UI.damage_percentage_label.shadow.offset.y = imgui.drag_float("Y", @@ -2111,9 +4036,9 @@ function customization_menu.draw() end if imgui.tree_node("Color") then - --changed, config.current_config.damage_meter_UI.damage_percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.damage_percentage_label.shadow.color, color_picker_flags); + -- changed, config.current_config.damage_meter_UI.damage_percentage_label.shadow.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.damage_percentage_label.shadow.color, color_picker_flags); config_changed = config_changed or changed; - + imgui.tree_pop(); end @@ -2124,30 +4049,28 @@ function customization_menu.draw() end if imgui.tree_node("Total Damage Label") then - changed, config.current_config.damage_meter_UI.total_damage_label.visibility = - imgui.checkbox("Visible", config.current_config.damage_meter_UI.total_damage_label.visibility); + changed, config.current_config.damage_meter_UI.total_damage_label.visibility = imgui.checkbox("Visible", + config.current_config.damage_meter_UI.total_damage_label.visibility); config_changed = config_changed or changed; -- add text format if imgui.tree_node("Offset") then - changed, config.current_config.damage_meter_UI.total_damage_label.offset.x = - imgui.drag_float("X", config.current_config.damage_meter_UI.total_damage_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.damage_meter_UI.total_damage_label.offset.x = imgui.drag_float("X", + config.current_config.damage_meter_UI.total_damage_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.total_damage_label.offset.y = - imgui.drag_float("Y", config.current_config.damage_meter_UI.total_damage_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); + changed, config.current_config.damage_meter_UI.total_damage_label.offset.y = imgui.drag_float("Y", + config.current_config.damage_meter_UI.total_damage_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); config_changed = config_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Color") then - --changed, config.current_config.damage_meter_UI.total_damage_label.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.total_damage_label.color, color_picker_flags); + -- changed, config.current_config.damage_meter_UI.total_damage_label.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.total_damage_label.color, color_picker_flags); config_changed = config_changed or changed; - + imgui.tree_pop(); end @@ -2157,23 +4080,22 @@ function customization_menu.draw() config_changed = config_changed or changed; if imgui.tree_node("Offset") then - changed, config.current_config.damage_meter_UI.total_damage_label.shadow.offset.x = - imgui.drag_float("X", config.current_config.damage_meter_UI.total_damage_label.shadow.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.damage_meter_UI.total_damage_label.shadow.offset.x = imgui.drag_float("X", + config.current_config.damage_meter_UI.total_damage_label.shadow.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.total_damage_label.shadow.offset.y = - imgui.drag_float("Y", config.current_config.damage_meter_UI.total_damage_label.shadow.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); + changed, config.current_config.damage_meter_UI.total_damage_label.shadow.offset.y = imgui.drag_float("Y", + config.current_config.damage_meter_UI.total_damage_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("Color") then - --changed, config.current_config.damage_meter_UI.total_damage_label.shadow.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.total_damage_label.shadow.color, color_picker_flags); + -- changed, config.current_config.damage_meter_UI.total_damage_label.shadow.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.total_damage_label.shadow.color, color_picker_flags); config_changed = config_changed or changed; - + imgui.tree_pop(); end @@ -2191,23 +4113,21 @@ function customization_menu.draw() -- add text format if imgui.tree_node("Offset") then - changed, config.current_config.damage_meter_UI.total_damage_value_label.offset.x = - imgui.drag_float("X", config.current_config.damage_meter_UI.total_damage_value_label.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.damage_meter_UI.total_damage_value_label.offset.x = imgui.drag_float("X", + config.current_config.damage_meter_UI.total_damage_value_label.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.total_damage_value_label.offset.y = - imgui.drag_float("Y", config.current_config.damage_meter_UI.total_damage_value_label.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); + changed, config.current_config.damage_meter_UI.total_damage_value_label.offset.y = imgui.drag_float("Y", + config.current_config.damage_meter_UI.total_damage_value_label.offset.y, 0.1, -screen.height, screen.height, "%.1f"); config_changed = config_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Color") then - --changed, config.current_config.damage_meter_UI.total_damage_value_label.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.total_damage_value_label.color, color_picker_flags); + -- changed, config.current_config.damage_meter_UI.total_damage_value_label.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.total_damage_value_label.color, color_picker_flags); config_changed = config_changed or changed; - + imgui.tree_pop(); end @@ -2223,17 +4143,17 @@ function customization_menu.draw() config_changed = config_changed or changed; changed, config.current_config.damage_meter_UI.total_damage_value_label.shadow.offset.y = imgui.drag_float("Y", - config.current_config.damage_meter_UI.total_damage_value_label.shadow.offset.y, 0.1, -screen.height, screen.height, - "%.1f"); + config.current_config.damage_meter_UI.total_damage_value_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("Color") then - --changed, config.current_config.damage_meter_UI.total_damage_value_label.shadow.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.total_damage_value_label.shadow.color, color_picker_flags); + -- changed, config.current_config.damage_meter_UI.total_damage_value_label.shadow.color = imgui.color_picker_argb("", config.current_config.damage_meter_UI.total_damage_value_label.shadow.color, color_picker_flags); config_changed = config_changed or changed; - + imgui.tree_pop(); end @@ -2249,25 +4169,26 @@ function customization_menu.draw() config_changed = config_changed or changed; if imgui.tree_node("Offset") then - changed, config.current_config.damage_meter_UI.damage_bar.offset.x = imgui.drag_float("X", - config.current_config.damage_meter_UI.damage_bar.offset.x, 0.1, -screen.width, screen.width, "%.1f"); + changed, config.current_config.damage_meter_UI.damage_bar.offset.x = + imgui.drag_float("X", config.current_config.damage_meter_UI.damage_bar.offset.x, 0.1, -screen.width, screen.width, + "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.damage_bar.offset.y = imgui.drag_float("Y", - config.current_config.damage_meter_UI.damage_bar.offset.y, 0.1, -screen.height, screen.height, "%.1f"); + changed, config.current_config.damage_meter_UI.damage_bar.offset.y = + imgui.drag_float("Y", config.current_config.damage_meter_UI.damage_bar.offset.y, 0.1, -screen.height, + screen.height, "%.1f"); config_changed = config_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Size") then - changed, config.current_config.damage_meter_UI.damage_bar.size.width = imgui.drag_float("Width", config.current_config.damage_meter_UI.damage_bar - .size.width, 0.1, -screen.width, screen.width, "%.1f"); + changed, config.current_config.damage_meter_UI.damage_bar.size.width = imgui.drag_float("Width", + config.current_config.damage_meter_UI.damage_bar.size.width, 0.1, 0, screen.width, "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.damage_bar.size.height = - imgui.drag_float("Height", config.current_config.damage_meter_UI.damage_bar.size.height, 0.1, -screen.height, - screen.height, "%.1f"); + changed, config.current_config.damage_meter_UI.damage_bar.size.height = imgui.drag_float("Height", + config.current_config.damage_meter_UI.damage_bar.size.height, 0.1, 0, screen.height, "%.1f"); config_changed = config_changed or changed; imgui.tree_pop(); @@ -2275,16 +4196,16 @@ function customization_menu.draw() if imgui.tree_node("Colors") then if imgui.tree_node("Foreground") then - --changed, config.current_config.damage_meter_UI.damage_bar.colors.foreground = imgui.color_picker_argb("", config.current_config.damage_meter_UI.damage_bar.colors.foreground, color_picker_flags); + -- changed, config.current_config.damage_meter_UI.damage_bar.colors.foreground = imgui.color_picker_argb("", config.current_config.damage_meter_UI.damage_bar.colors.foreground, color_picker_flags); config_changed = config_changed or changed; - + imgui.tree_pop(); end if imgui.tree_node("Background") then - --changed, config.current_config.damage_meter_UI.damage_bar.colors.background = imgui.color_picker_argb("", config.current_config.damage_meter_UI.damage_bar.colors.background, color_picker_flags); + -- changed, config.current_config.damage_meter_UI.damage_bar.colors.background = imgui.color_picker_argb("", config.current_config.damage_meter_UI.damage_bar.colors.background, color_picker_flags); config_changed = config_changed or changed; - + imgui.tree_pop(); end @@ -2295,32 +4216,29 @@ function customization_menu.draw() end if imgui.tree_node("Highlighted Damage Bar") then - changed, config.current_config.damage_meter_UI.highlighted_damage_bar.visibility = - imgui.checkbox("Visible", config.current_config.damage_meter_UI.highlighted_damage_bar.visibility); + changed, config.current_config.damage_meter_UI.highlighted_damage_bar.visibility = imgui.checkbox("Visible", + config.current_config.damage_meter_UI.highlighted_damage_bar.visibility); config_changed = config_changed or changed; if imgui.tree_node("Offset") then - changed, config.current_config.damage_meter_UI.highlighted_damage_bar.offset.x = - imgui.drag_float("X", config.current_config.damage_meter_UI.highlighted_damage_bar.offset.x, 0.1, -screen.width, - screen.width, "%.1f"); + changed, config.current_config.damage_meter_UI.highlighted_damage_bar.offset.x = imgui.drag_float("X", + config.current_config.damage_meter_UI.highlighted_damage_bar.offset.x, 0.1, -screen.width, screen.width, "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.highlighted_damage_bar.offset.y = - imgui.drag_float("Y", config.current_config.damage_meter_UI.highlighted_damage_bar.offset.y, 0.1, -screen.height, - screen.height, "%.1f"); + changed, config.current_config.damage_meter_UI.highlighted_damage_bar.offset.y = imgui.drag_float("Y", + config.current_config.damage_meter_UI.highlighted_damage_bar.offset.y, 0.1, -screen.height, screen.height, "%.1f"); config_changed = config_changed or changed; imgui.tree_pop(); end if imgui.tree_node("Size") then - changed, config.current_config.damage_meter_UI.highlighted_damage_bar.size.width = imgui.drag_float("Width", config.current_config.damage_meter_UI.highlighted_damage_bar - .size.width, 0.1, -screen.width, screen.width, "%.1f"); + changed, config.current_config.damage_meter_UI.highlighted_damage_bar.size.width = imgui.drag_float("Width", + config.current_config.damage_meter_UI.highlighted_damage_bar.size.width, 0.1, 0, screen.width, "%.1f"); config_changed = config_changed or changed; - changed, config.current_config.damage_meter_UI.highlighted_damage_bar.size.height = - imgui.drag_float("Height", config.current_config.damage_meter_UI.highlighted_damage_bar.size.height, 0.1, -screen.height, - screen.height, "%.1f"); + changed, config.current_config.damage_meter_UI.highlighted_damage_bar.size.height = imgui.drag_float("Height", + config.current_config.damage_meter_UI.highlighted_damage_bar.size.height, 0.1, 0, screen.height, "%.1f"); config_changed = config_changed or changed; imgui.tree_pop(); @@ -2328,16 +4246,16 @@ function customization_menu.draw() if imgui.tree_node("Colors") then if imgui.tree_node("Foreground") then - --changed, config.current_config.damage_meter_UI.highlighted_damage_bar.colors.foreground = imgui.color_picker_argb("", config.current_config.damage_meter_UI.highlighted_damage_bar.colors.foreground, color_picker_flags); + -- changed, config.current_config.damage_meter_UI.highlighted_damage_bar.colors.foreground = imgui.color_picker_argb("", config.current_config.damage_meter_UI.highlighted_damage_bar.colors.foreground, color_picker_flags); config_changed = config_changed or changed; - + imgui.tree_pop(); end if imgui.tree_node("Background") then - --changed, config.current_config.damage_meter_UI.highlighted_damage_bar.colors.background = imgui.color_picker_argb("", config.current_config.damage_meter_UI.highlighted_damage_bar.colors.background, color_picker_flags); + -- changed, config.current_config.damage_meter_UI.highlighted_damage_bar.colors.background = imgui.color_picker_argb("", config.current_config.damage_meter_UI.highlighted_damage_bar.colors.background, color_picker_flags); config_changed = config_changed or changed; - + imgui.tree_pop(); end @@ -2362,6 +4280,8 @@ function customization_menu.init_module() config = require("MHR_Overlay.Misc.config"); screen = require("MHR_Overlay.Game_Handler.screen"); player = require("MHR_Overlay.Damage_Meter.player"); + small_monster = require("MHR_Overlay.Monsters.small_monster"); + large_monster = require("MHR_Overlay.Monsters.large_monster"); customization_menu.init(); end diff --git a/MHR_Overlay/UI/drawing.lua b/MHR_Overlay/UI/drawing.lua index 34ebd8c..4d17e40 100644 --- a/MHR_Overlay/UI/drawing.lua +++ b/MHR_Overlay/UI/drawing.lua @@ -55,20 +55,33 @@ function drawing.scale_label_opacity(label, scale) label.shadow.color = drawing.scale_color_opacity(label.shadow.color, scale); end -function drawing.draw_label(label, position, ...) +function drawing.draw_label(label, position, opacity_scale, ...) if label == nil or not label.visibility then return; end local text = string.format(label.text, table.unpack({...})); + local position_x = position.x + label.offset.x; + local position_y = position.y + label.offset.y; + if label.shadow.visibility then - d2d.text(drawing.font, text, position.x + label.offset.x + label.shadow.offset.x, - position.y + label.offset.y + label.shadow.offset.y, label.shadow.color); + local new_shadow_color = label.shadow.color; + + if opacity_scale < 1 then + new_shadow_color = drawing.scale_color_opacity(new_shadow_color, opacity_scale); + end + + d2d.text(drawing.font, text, position_x + label.shadow.offset.x, position_y + label.shadow.offset.y, new_shadow_color); end - d2d.text(drawing.font, text, position.x + label.offset.x, position.y + label.offset.y, label.color); + + local new_color = label.color; + if opacity_scale < 1 then + new_color = drawing.scale_color_opacity(new_color, opacity_scale); + end + d2d.text(drawing.font, text, position_x, position_y, new_color); end -function drawing.draw_bar(bar, position, percentage) +function drawing.draw_bar(bar, position, opacity_scale, percentage) if bar == nil then return; end @@ -77,20 +90,27 @@ function drawing.draw_bar(bar, position, percentage) return; end - if percentage > 1 then + if percentage > 1 then percentage = 1; end + local position_x = position.x + bar.offset.x; + local position_y = position.y + bar.offset.y; local foreground_width = bar.size.width * percentage; local background_width = bar.size.width - foreground_width; - -- foreground - d2d.fill_rect(position.x + bar.offset.x, position.y + bar.offset.y, foreground_width, bar.size.height, - bar.colors.foreground); + local new_foreground_color = bar.colors.foreground; + local new_background_color = bar.colors.background; + if opacity_scale < 1 then + new_foreground_color = drawing.scale_color_opacity(new_foreground_color, opacity_scale); + new_background_color = drawing.scale_color_opacity(new_background_color, opacity_scale); + end + + -- foreground + d2d.fill_rect(position_x, position_y, foreground_width, bar.size.height, new_foreground_color); -- background - d2d.fill_rect(position.x + foreground_width + bar.offset.x, position.y + bar.offset.y, background_width, - bar.size.height, bar.colors.background); + d2d.fill_rect(position_x + foreground_width, position_y, background_width, bar.size.height, new_background_color); end function drawing.init_module()