mirror of
https://github.com/GreenComfyTea/MHR-Overlay.git
synced 2026-01-24 04:18:11 -08:00
Add Stats UI
This commit is contained in:
@@ -42,6 +42,8 @@ local language = require("MHR_Overlay.Misc.language");
|
||||
local part_names = require("MHR_Overlay.Misc.part_names");
|
||||
local utils = require("MHR_Overlay.Misc.utils");
|
||||
|
||||
local player_info = require("MHR_Overlay.Misc.player_info");
|
||||
|
||||
local buffs = require("MHR_Overlay.Buffs.buffs");
|
||||
local consumables = require("MHR_Overlay.Buffs.consumables");
|
||||
local melody_effects = require("MHR_Overlay.Buffs.melody_effects");
|
||||
@@ -71,6 +73,7 @@ local small_monster_UI = require("MHR_Overlay.UI.Modules.small_monster_UI");
|
||||
local time_UI = require("MHR_Overlay.UI.Modules.time_UI");
|
||||
local env_creature_UI = require("MHR_Overlay.UI.Modules.env_creature_UI");
|
||||
local buff_UI = require("MHR_Overlay.UI.Modules.buff_UI");
|
||||
local stats_UI = require("MHR_Overlay.UI.Modules.stats_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");
|
||||
@@ -119,6 +122,8 @@ ailment_buildup_UI_entity.init_dependencies();
|
||||
body_part_UI_entity.init_dependencies();
|
||||
buff_UI_entity.init_dependencies();
|
||||
|
||||
player_info.init_dependencies();
|
||||
|
||||
buffs.init_dependencies();
|
||||
consumables.init_dependencies();
|
||||
melody_effects.init_dependencies();
|
||||
@@ -167,6 +172,7 @@ small_monster_UI.init_dependencies();
|
||||
time_UI.init_dependencies();
|
||||
env_creature_UI.init_dependencies();
|
||||
buff_UI.init_dependencies();
|
||||
stats_UI.init_dependencies();
|
||||
|
||||
keyboard.init_dependencies();
|
||||
|
||||
@@ -191,6 +197,8 @@ ailment_buildup_UI_entity.init_module();
|
||||
body_part_UI_entity.init_module();
|
||||
buff_UI_entity.init_module();
|
||||
|
||||
player_info.init_module();
|
||||
|
||||
buffs.init_module();
|
||||
consumables.init_module();
|
||||
melody_effects.init_module();
|
||||
@@ -239,6 +247,7 @@ small_monster_UI.init_module();
|
||||
time_UI.init_module();
|
||||
env_creature_UI.init_module();
|
||||
buff_UI.init_module();
|
||||
stats_UI.init_module();
|
||||
|
||||
keyboard.init_module();
|
||||
|
||||
@@ -333,6 +342,13 @@ local function draw_modules(module_visibility_config, flow_state_name)
|
||||
error_handler.report("MHR_Overlay.draw_modules", string.format("[%s] Buff UI Draw Function threw an Exception", flow_state_name));
|
||||
end
|
||||
end
|
||||
|
||||
if config.current_config.stats_UI.enabled and module_visibility_config.stats_UI then
|
||||
local success = pcall(stats_UI.draw);
|
||||
if not success then
|
||||
error_handler.report("MHR_Overlay.draw_modules", string.format("[%s] Stats UI Draw Function threw an Exception", flow_state_name));
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function update_UI()
|
||||
@@ -390,7 +406,17 @@ local function update_UI()
|
||||
end
|
||||
|
||||
local function draw_loop()
|
||||
if quest_status.flow_state == quest_status.flow_states.IN_TRAINING_AREA then
|
||||
if quest_status.flow_state == quest_status.flow_states.IN_LOBBY then
|
||||
local module_visibility_config = config.current_config.global_settings.module_visibility.in_lobby;
|
||||
|
||||
if config.current_config.stats_UI.enabled and module_visibility_config.stats_UI then
|
||||
local success = pcall(stats_UI.draw);
|
||||
if not success then
|
||||
error_handler.report("MHR_Overlay.main_loop", "[In Training Area] Stats UI Draw Function threw an Exception");
|
||||
end
|
||||
end
|
||||
|
||||
elseif quest_status.flow_state == quest_status.flow_states.IN_TRAINING_AREA then
|
||||
|
||||
local large_monster_UI_config = config.current_config.large_monster_UI;
|
||||
local module_visibility_config = config.current_config.global_settings.module_visibility.in_training_area;
|
||||
@@ -427,6 +453,13 @@ local function draw_loop()
|
||||
end
|
||||
end
|
||||
|
||||
if config.current_config.stats_UI.enabled and module_visibility_config.stats_UI then
|
||||
local success = pcall(stats_UI.draw);
|
||||
if not success then
|
||||
error_handler.report("MHR_Overlay.main_loop", "[In Training Area] Stats UI Draw Function threw an Exception");
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
elseif quest_status.flow_state == quest_status.flow_states.CUTSCENE then
|
||||
draw_modules(config.current_config.global_settings.module_visibility.cutscene, "Cutscene");
|
||||
|
||||
@@ -84,13 +84,18 @@ function this.init_default()
|
||||
},
|
||||
|
||||
module_visibility = {
|
||||
in_lobby = {
|
||||
stats_UI = true
|
||||
},
|
||||
|
||||
in_training_area = {
|
||||
large_monster_dynamic_UI = true,
|
||||
large_monster_static_UI = true,
|
||||
large_monster_highlighted_UI = true,
|
||||
damage_meter_UI = true,
|
||||
endemic_life_UI = true,
|
||||
buff_UI = true
|
||||
buff_UI = true,
|
||||
stats_UI = true
|
||||
},
|
||||
|
||||
cutscene = {
|
||||
@@ -101,7 +106,8 @@ function this.init_default()
|
||||
time_UI = false,
|
||||
damage_meter_UI = false,
|
||||
endemic_life_UI = false,
|
||||
buff_UI = false
|
||||
buff_UI = false,
|
||||
stats_UI = false
|
||||
},
|
||||
|
||||
loading_quest = {
|
||||
@@ -112,7 +118,8 @@ function this.init_default()
|
||||
time_UI = false,
|
||||
damage_meter_UI = false,
|
||||
endemic_life_UI = false,
|
||||
buff_UI = false
|
||||
buff_UI = false,
|
||||
stats_UI = false
|
||||
},
|
||||
|
||||
quest_start_animation = {
|
||||
@@ -123,7 +130,8 @@ function this.init_default()
|
||||
time_UI = true,
|
||||
damage_meter_UI = true,
|
||||
endemic_life_UI = true,
|
||||
buff_UI = true
|
||||
buff_UI = true,
|
||||
stats_UI = true
|
||||
},
|
||||
|
||||
playing_quest = {
|
||||
@@ -134,7 +142,8 @@ function this.init_default()
|
||||
time_UI = true,
|
||||
damage_meter_UI = true,
|
||||
endemic_life_UI = true,
|
||||
buff_UI = true
|
||||
buff_UI = true,
|
||||
stats_UI = true
|
||||
},
|
||||
|
||||
killcam = {
|
||||
@@ -145,7 +154,8 @@ function this.init_default()
|
||||
time_UI = true,
|
||||
damage_meter_UI = true,
|
||||
endemic_life_UI = true,
|
||||
buff_UI = true
|
||||
buff_UI = true,
|
||||
stats_UI = true
|
||||
},
|
||||
|
||||
quest_end_timer = {
|
||||
@@ -156,7 +166,8 @@ function this.init_default()
|
||||
time_UI = true,
|
||||
damage_meter_UI = true,
|
||||
endemic_life_UI = true,
|
||||
buff_UI = true
|
||||
buff_UI = true,
|
||||
stats_UI = true
|
||||
},
|
||||
|
||||
quest_end_animation = {
|
||||
@@ -167,7 +178,8 @@ function this.init_default()
|
||||
time_UI = false,
|
||||
damage_meter_UI = false,
|
||||
endemic_life_UI = false,
|
||||
buff_UI = false
|
||||
buff_UI = false,
|
||||
stats_UI = false
|
||||
},
|
||||
|
||||
quest_end_screen = {
|
||||
@@ -178,7 +190,9 @@ function this.init_default()
|
||||
time_UI = false,
|
||||
damage_meter_UI = false,
|
||||
endemic_life_UI = false,
|
||||
buff_UI = false
|
||||
buff_UI = false,
|
||||
stats_UI = false
|
||||
|
||||
},
|
||||
|
||||
reward_screen = {
|
||||
@@ -189,7 +203,8 @@ function this.init_default()
|
||||
time_UI = true,
|
||||
damage_meter_UI = true,
|
||||
endemic_life_UI = false,
|
||||
buff_UI = false
|
||||
buff_UI = false,
|
||||
stats_UI = false
|
||||
},
|
||||
|
||||
summary_screen = {
|
||||
@@ -200,7 +215,8 @@ function this.init_default()
|
||||
time_UI = true,
|
||||
damage_meter_UI = true,
|
||||
endemic_life_UI = false,
|
||||
buff_UI = false
|
||||
buff_UI = false,
|
||||
stats_UI = false
|
||||
},
|
||||
},
|
||||
|
||||
@@ -6124,6 +6140,7 @@ function this.init_default()
|
||||
x = 205,
|
||||
y = 0
|
||||
},
|
||||
|
||||
color = 0xFFF59FC4,
|
||||
|
||||
shadow = {
|
||||
@@ -7576,6 +7593,381 @@ function this.init_default()
|
||||
}
|
||||
},
|
||||
|
||||
stats_UI = {
|
||||
enabled = false,
|
||||
|
||||
position = {
|
||||
x = 0,
|
||||
y = 0,
|
||||
-- Possible values: "Top-Left", "Top-Right", "Bottom-Left", "Bottom-Right"
|
||||
anchor = "Bottom-Right"
|
||||
},
|
||||
|
||||
attack_label = {
|
||||
visibility = true,
|
||||
|
||||
settings = {
|
||||
right_alignment_shift = 11
|
||||
},
|
||||
|
||||
text_formatting = "%s",
|
||||
|
||||
include = {
|
||||
name = true,
|
||||
value = true
|
||||
},
|
||||
|
||||
offset = {
|
||||
x = -353,
|
||||
y = -17
|
||||
},
|
||||
|
||||
color = 0xFFF27979,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
affinity_label = {
|
||||
visibility = true,
|
||||
|
||||
settings = {
|
||||
right_alignment_shift = 14
|
||||
},
|
||||
|
||||
text_formatting = "%s",
|
||||
|
||||
include = {
|
||||
name = true,
|
||||
value = true
|
||||
},
|
||||
|
||||
offset = {
|
||||
x = -242,
|
||||
y = -17
|
||||
},
|
||||
|
||||
color = 0xFFF27979,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
defense_label = {
|
||||
visibility = true,
|
||||
|
||||
settings = {
|
||||
right_alignment_shift = 13
|
||||
},
|
||||
|
||||
text_formatting = "%s",
|
||||
|
||||
include = {
|
||||
name = true,
|
||||
value = true
|
||||
},
|
||||
|
||||
offset = {
|
||||
x = -103,
|
||||
y = -17
|
||||
},
|
||||
|
||||
color = 0xFFBFF7FF,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
fire_resistance_label = {
|
||||
visibility = false,
|
||||
|
||||
settings = {
|
||||
right_alignment_shift = 13
|
||||
},
|
||||
|
||||
text_formatting = "%s",
|
||||
|
||||
include = {
|
||||
name = true,
|
||||
value = true
|
||||
},
|
||||
|
||||
offset = {
|
||||
x = -625,
|
||||
y = -53
|
||||
},
|
||||
|
||||
color = 0xFFF27979,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
water_resistance_label = {
|
||||
visibility = false,
|
||||
|
||||
settings = {
|
||||
right_alignment_shift = 14
|
||||
},
|
||||
|
||||
text_formatting = "%s",
|
||||
|
||||
include = {
|
||||
name = true,
|
||||
value = true
|
||||
},
|
||||
|
||||
offset = {
|
||||
x = -507,
|
||||
y = -53
|
||||
},
|
||||
|
||||
color = 0xFF7AB8F8,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
thunder_resistance_label = {
|
||||
visibility = false,
|
||||
|
||||
settings = {
|
||||
right_alignment_shift = 16
|
||||
},
|
||||
|
||||
text_formatting = "%s",
|
||||
|
||||
include = {
|
||||
name = true,
|
||||
value = true
|
||||
},
|
||||
|
||||
offset = {
|
||||
x = -382,
|
||||
y = -53
|
||||
},
|
||||
|
||||
color = 0xFFFEFF88,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
ice_resistance_label = {
|
||||
visibility = false,
|
||||
|
||||
settings = {
|
||||
right_alignment_shift = 12
|
||||
},
|
||||
|
||||
text_formatting = "%s",
|
||||
|
||||
include = {
|
||||
name = true,
|
||||
value = true
|
||||
},
|
||||
|
||||
offset = {
|
||||
x = -228,
|
||||
y = -53
|
||||
},
|
||||
|
||||
color = 0xFFBFF7FF,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
dragon_resistance_label = {
|
||||
visibility = false,
|
||||
|
||||
settings = {
|
||||
right_alignment_shift = 15
|
||||
},
|
||||
|
||||
text_formatting = "%s",
|
||||
|
||||
include = {
|
||||
name = true,
|
||||
value = true
|
||||
},
|
||||
|
||||
offset = {
|
||||
x = -117,
|
||||
y = -53
|
||||
},
|
||||
|
||||
color = 0xFFB999FF,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
stamina_label = {
|
||||
visibility = false,
|
||||
|
||||
settings = {
|
||||
right_alignment_shift = 16
|
||||
},
|
||||
|
||||
text_formatting = "%s",
|
||||
|
||||
include = {
|
||||
name = true,
|
||||
value = true,
|
||||
max_value = true
|
||||
},
|
||||
|
||||
offset = {
|
||||
x = -382,
|
||||
y = -35
|
||||
},
|
||||
|
||||
color = 0xFFFEFF88,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
element_label = {
|
||||
visibility = false,
|
||||
|
||||
settings = {
|
||||
right_alignment_shift = 14
|
||||
},
|
||||
|
||||
text_formatting = "%s",
|
||||
|
||||
include = {
|
||||
name = true,
|
||||
value = true
|
||||
},
|
||||
|
||||
offset = {
|
||||
x = -110,
|
||||
y = -35
|
||||
},
|
||||
|
||||
color = 0xFFF59FC4,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
element_2_label = {
|
||||
visibility = false,
|
||||
|
||||
settings = {
|
||||
right_alignment_shift = 14
|
||||
},
|
||||
|
||||
text_formatting = "%s",
|
||||
|
||||
include = {
|
||||
name = true,
|
||||
value = true
|
||||
},
|
||||
|
||||
offset = {
|
||||
x = -242,
|
||||
y = -35
|
||||
},
|
||||
|
||||
color = 0xFFF59FC4,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
debug = {
|
||||
history_size = 64
|
||||
},
|
||||
|
||||
@@ -665,7 +665,42 @@ this.default_language = {
|
||||
current_time = "Current Time",
|
||||
everything_seems_to_be_ok = "Everything seems to be OK!",
|
||||
history = "History",
|
||||
history_size = "History Size"
|
||||
history_size = "History Size",
|
||||
|
||||
value = "Value",
|
||||
|
||||
stats_UI = "Stats UI",
|
||||
attack_label = "Attack Label",
|
||||
defense_label = "Defense Label",
|
||||
affinity_label = "Affinity Label",
|
||||
fire_resistance_label = "Fire Resistance Label",
|
||||
water_resistance_label = "Water Resistance Label",
|
||||
thunder_resistance_label = "Thunder Resistance Label",
|
||||
ice_resistance_label = "Ice Resistance Label",
|
||||
dragon_resistance_label = "Dragon Resistance Label",
|
||||
stamina_label = "Stamina Label",
|
||||
element_label = "Element Label",
|
||||
element_2_label = "Element 2 Label"
|
||||
},
|
||||
|
||||
stats = {
|
||||
attack = "Attack",
|
||||
defense = "Defense",
|
||||
affinity = "Affinity",
|
||||
|
||||
fire_resistance = "Fire Res";
|
||||
water_resistance = "Water Res";
|
||||
thunder_resistance = "Thunder Res";
|
||||
ice_resistance = "Ice Res";
|
||||
dragon_resistance = "Dragon Res";
|
||||
|
||||
stamina = "Stamina",
|
||||
|
||||
fire = "Fire",
|
||||
water = "Water",
|
||||
thunder = "Thunder",
|
||||
ice = "Ice",
|
||||
dragon = "Dragon",
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
251
reframework/autorun/MHR_Overlay/Misc/player_info.lua
Normal file
251
reframework/autorun/MHR_Overlay/Misc/player_info.lua
Normal file
@@ -0,0 +1,251 @@
|
||||
local this = {};
|
||||
|
||||
local drawing;
|
||||
local customization_menu;
|
||||
local singletons;
|
||||
local config;
|
||||
local utils;
|
||||
local error_handler;
|
||||
local quest_status;
|
||||
local time;
|
||||
|
||||
local sdk = sdk;
|
||||
local tostring = tostring;
|
||||
local pairs = pairs;
|
||||
local ipairs = ipairs;
|
||||
local tonumber = tonumber;
|
||||
local require = require;
|
||||
local pcall = pcall;
|
||||
local table = table;
|
||||
local string = string;
|
||||
local Vector3f = Vector3f;
|
||||
local d2d = d2d;
|
||||
local math = math;
|
||||
local json = json;
|
||||
local log = log;
|
||||
local fs = fs;
|
||||
local next = next;
|
||||
local type = type;
|
||||
local setmetatable = setmetatable;
|
||||
local getmetatable = getmetatable;
|
||||
local assert = assert;
|
||||
local select = select;
|
||||
local coroutine = coroutine;
|
||||
local utf8 = utf8;
|
||||
local re = re;
|
||||
local imgui = imgui;
|
||||
local draw = draw;
|
||||
local Vector2f = Vector2f;
|
||||
local reframework = reframework;
|
||||
local os = os;
|
||||
local ValueType = ValueType;
|
||||
local package = package;
|
||||
|
||||
this.list = {
|
||||
attack = 0;
|
||||
defense = 0;
|
||||
affinity = 0;
|
||||
|
||||
stamina = 0;
|
||||
max_stamina = 0;
|
||||
|
||||
element_type = 0;
|
||||
element_attack = 0;
|
||||
|
||||
element_type_2 = 0;
|
||||
element_attack_2 = 0;
|
||||
|
||||
fire_resistance = 0;
|
||||
water_resistance = 0;
|
||||
thunder_resistance = 0;
|
||||
ice_resistance = 0;
|
||||
dragon_resistance = 0;
|
||||
};
|
||||
|
||||
local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager");
|
||||
local get_player_method = player_manager_type_def:get_method("getPlayer");
|
||||
local find_master_player_method = player_manager_type_def:get_method("findMasterPlayer");
|
||||
|
||||
local player_base_type_def = find_master_player_method:get_return_type();
|
||||
local get_player_data_method = player_base_type_def:get_method("get_PlayerData");
|
||||
|
||||
local player_data_type_def = get_player_data_method:get_return_type();
|
||||
|
||||
local attack_field = player_data_type_def:get_field("_Attack");
|
||||
local defence_field = player_data_type_def:get_field("_Defence");
|
||||
local critical_rate_field = player_data_type_def:get_field("_CriticalRate");
|
||||
|
||||
|
||||
local stamina_field = player_data_type_def:get_field("_stamina");
|
||||
local stamina_max_field = player_data_type_def:get_field("_staminaMax");
|
||||
|
||||
local element_type_field = player_data_type_def:get_field("_ElementType");
|
||||
local element_attack_field = player_data_type_def:get_field("_ElementAttack");
|
||||
|
||||
local element_type_2nd_field = player_data_type_def:get_field("_ElementType2nd");
|
||||
local element_attack_2nd_field = player_data_type_def:get_field("_ElementAttack2nd");
|
||||
|
||||
local resistance_element_field = player_data_type_def:get_field("_ResistanceElement");
|
||||
|
||||
local system_array_type_def = sdk.find_type_definition("System.Array");
|
||||
local length_method = system_array_type_def:get_method("get_Length");
|
||||
local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)");
|
||||
|
||||
function this.update()
|
||||
if not config.current_config.stats_UI.enabled then
|
||||
return;
|
||||
end
|
||||
|
||||
if quest_status.flow_state == quest_status.flow_states.NONE then
|
||||
return;
|
||||
end
|
||||
|
||||
if singletons.player_manager == nil then
|
||||
error_handler.report("player_info.update", "Failed to access Data: player_manager");
|
||||
return;
|
||||
end
|
||||
|
||||
local master_player = find_master_player_method:call(singletons.player_manager);
|
||||
if master_player == nil then
|
||||
error_handler.report("player_info.update", "Failed to access Data: master_player");
|
||||
return;
|
||||
end
|
||||
|
||||
local master_player_data = get_player_data_method:call(master_player);
|
||||
if master_player_data == nil then
|
||||
error_handler.report("player_info.update", "Failed to access Data: master_player_data");
|
||||
end
|
||||
|
||||
this.update_generic("attack", master_player_data, attack_field);
|
||||
this.update_generic("affinity", master_player_data, critical_rate_field);
|
||||
this.update_generic("defense", master_player_data, defence_field);
|
||||
|
||||
this.update_generic("stamina", master_player_data, stamina_field);
|
||||
this.list.stamina = math.floor(this.list.stamina / 30);
|
||||
|
||||
this.update_generic("max_stamina", master_player_data, stamina_max_field);
|
||||
this.list.max_stamina = math.floor(this.list.max_stamina / 30);
|
||||
|
||||
this.update_generic("element_type", master_player_data, element_type_field);
|
||||
this.update_generic("element_attack", master_player_data, element_attack_field);
|
||||
|
||||
this.update_generic("element_type_2", master_player_data, element_type_2nd_field);
|
||||
this.update_generic("element_attack_2", master_player_data, element_attack_2nd_field);
|
||||
|
||||
this.update_resistances(master_player_data);
|
||||
end
|
||||
|
||||
function this.update_generic(key, player_data, field)
|
||||
local value = field:get_data(player_data);
|
||||
if value == nil then
|
||||
error_handler.report("player_info.update_generic", string.format("Failed to access Data: %s_value", key));
|
||||
return;
|
||||
end
|
||||
|
||||
this.list[key] = math.floor(value);
|
||||
end
|
||||
|
||||
function this.update_resistances(player_data)
|
||||
local resistance_element_array = resistance_element_field:get_data(player_data);
|
||||
if resistance_element_array == nil then
|
||||
error_handler.report("player_info.update_resistances", "Failed to access Data: resistance_element_array");
|
||||
return;
|
||||
end
|
||||
|
||||
-- Fire Resistance
|
||||
local fire_resistance_valtype = get_value_method:call(resistance_element_array, 0);
|
||||
if fire_resistance_valtype == nil then
|
||||
error_handler.report("player_info.update_resistances", "Failed to access Data: fire_resistance_valtype");
|
||||
return;
|
||||
end
|
||||
|
||||
local fire_resistance = fire_resistance_valtype:get_field("mValue");
|
||||
if fire_resistance ~= nil then
|
||||
this.list.fire_resistance = math.floor(fire_resistance);
|
||||
else
|
||||
error_handler.report("player_info.update_resistances", "Failed to access Data: fire_resistance");
|
||||
return;
|
||||
end
|
||||
|
||||
-- Water Resistance
|
||||
local water_resistance_valtype = get_value_method:call(resistance_element_array, 1);
|
||||
if water_resistance_valtype == nil then
|
||||
error_handler.report("player_info.update_resistances", "Failed to access Data: water_resistance_valtype");
|
||||
return;
|
||||
end
|
||||
|
||||
local water_resistance = water_resistance_valtype:get_field("mValue");
|
||||
if water_resistance ~= nil then
|
||||
this.list.water_resistance = math.floor(water_resistance);
|
||||
else
|
||||
error_handler.report("player_info.update_resistances", "Failed to access Data: water_resistance");
|
||||
return;
|
||||
end
|
||||
|
||||
-- Thunder Resistance
|
||||
local thunder_resistance_valtype = get_value_method:call(resistance_element_array, 2);
|
||||
if thunder_resistance_valtype == nil then
|
||||
error_handler.report("player_info.update_resistances", "Failed to access Data: thunder_resistance_valtype");
|
||||
return;
|
||||
end
|
||||
|
||||
local thunder_resistance = thunder_resistance_valtype:get_field("mValue");
|
||||
if thunder_resistance ~= nil then
|
||||
this.list.thunder_resistance = math.floor(thunder_resistance);
|
||||
else
|
||||
error_handler.report("player_info.update_resistances", "Failed to access Data: thunder_resistance");
|
||||
return;
|
||||
end
|
||||
|
||||
-- Ice Resistance
|
||||
local ice_resistance_valtype = get_value_method:call(resistance_element_array, 3);
|
||||
if ice_resistance_valtype == nil then
|
||||
error_handler.report("player_info.update_resistances", "Failed to access Data: ice_resistance_valtype");
|
||||
return;
|
||||
end
|
||||
|
||||
local ice_resistance = ice_resistance_valtype:get_field("mValue");
|
||||
if ice_resistance ~= nil then
|
||||
this.list.ice_resistance = math.floor(ice_resistance);
|
||||
else
|
||||
error_handler.report("player_info.update_resistances", "Failed to access Data: ice_resistance");
|
||||
return;
|
||||
end
|
||||
|
||||
-- Dragon Resistance
|
||||
local dragon_resistance_valtype = get_value_method:call(resistance_element_array, 4);
|
||||
if dragon_resistance_valtype == nil then
|
||||
error_handler.report("player_info.update_resistances", "Failed to access Data: dragon_resistance_valtype");
|
||||
return;
|
||||
end
|
||||
|
||||
local dragon_resistance = dragon_resistance_valtype:get_field("mValue");
|
||||
if dragon_resistance ~= nil then
|
||||
this.list.dragon_resistance = math.floor(dragon_resistance);
|
||||
else
|
||||
error_handler.report("player_info.update_resistances", "Failed to access Data: dragon_resistance");
|
||||
return;
|
||||
end
|
||||
end
|
||||
|
||||
function this.init_dependencies()
|
||||
singletons = require("MHR_Overlay.Game_Handler.singletons");
|
||||
customization_menu = require("MHR_Overlay.UI.customization_menu");
|
||||
config = require("MHR_Overlay.Misc.config");
|
||||
utils = require("MHR_Overlay.Misc.utils");
|
||||
--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");
|
||||
--ailments = require("MHR_Overlay.Monsters.ailments");
|
||||
--ailment_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_UI_entity");
|
||||
error_handler = require("MHR_Overlay.Misc.error_handler");
|
||||
quest_status = require("MHR_Overlay.Game_Handler.quest_status");
|
||||
time = require("MHR_Overlay.Game_Handler.time");
|
||||
end
|
||||
|
||||
function this.init_module()
|
||||
time.new_timer(this.update, 0.5);
|
||||
end
|
||||
|
||||
return this;
|
||||
@@ -97,6 +97,10 @@ function this.draw(cached_config)
|
||||
language.current_language.customization_menu.buff_UI,
|
||||
cached_config.buff_UI);
|
||||
|
||||
changed, cached_config.stats_UI = imgui.checkbox(
|
||||
language.current_language.customization_menu.stats_UI,
|
||||
cached_config.stats_UI);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
return config_changed;
|
||||
|
||||
266
reframework/autorun/MHR_Overlay/UI/Modules/stats_UI.lua
Normal file
266
reframework/autorun/MHR_Overlay/UI/Modules/stats_UI.lua
Normal file
@@ -0,0 +1,266 @@
|
||||
local this = {};
|
||||
|
||||
local buff_UI_entity;
|
||||
local config;
|
||||
local buffs;
|
||||
local consumables;
|
||||
local melody_effects;
|
||||
local endemic_life_buff;
|
||||
local screen;
|
||||
local utils;
|
||||
local error_handler;
|
||||
local skills;
|
||||
local dangos;
|
||||
local abnormal_statuses;
|
||||
local drawing;
|
||||
local player_info;
|
||||
local language;
|
||||
|
||||
local sdk = sdk;
|
||||
local tostring = tostring;
|
||||
local pairs = pairs;
|
||||
local ipairs = ipairs;
|
||||
local tonumber = tonumber;
|
||||
local require = require;
|
||||
local pcall = pcall;
|
||||
local table = table;
|
||||
local string = string;
|
||||
local Vector3f = Vector3f;
|
||||
local d2d = d2d;
|
||||
local math = math;
|
||||
local json = json;
|
||||
local log = log;
|
||||
local fs = fs;
|
||||
local next = next;
|
||||
local type = type;
|
||||
local setmetatable = setmetatable;
|
||||
local getmetatable = getmetatable;
|
||||
local assert = assert;
|
||||
local select = select;
|
||||
local coroutine = coroutine;
|
||||
local utf8 = utf8;
|
||||
local re = re;
|
||||
local imgui = imgui;
|
||||
local draw = draw;
|
||||
local Vector2f = Vector2f;
|
||||
local reframework = reframework;
|
||||
local os = os;
|
||||
local ValueType = ValueType;
|
||||
local package = package;
|
||||
|
||||
this.label_list = {
|
||||
attack = nil,
|
||||
|
||||
defense = nil,
|
||||
fire_resistance = nil,
|
||||
water_resistance = nil,
|
||||
thunder_resistance = nil,
|
||||
ice_resistance = nil,
|
||||
dragon_resistance = nil
|
||||
};
|
||||
|
||||
this.affinity_label = nil;
|
||||
this.stamina_label = nil;
|
||||
this.element_label = nil;
|
||||
this.element_2_label = nil;
|
||||
|
||||
function this.draw()
|
||||
local cached_config = config.current_config.stats_UI;
|
||||
|
||||
if not cached_config.enabled then
|
||||
return;
|
||||
end
|
||||
|
||||
local cached_names = language.current_language.stats;
|
||||
|
||||
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
|
||||
local position_on_screen = screen.calculate_absolute_coordinates(cached_config.position);
|
||||
|
||||
-- draw
|
||||
for label_key, label in pairs(this.label_list) do
|
||||
local name_text = "";
|
||||
if label.include.name then
|
||||
name_text = string.format("%s: ", cached_names[label_key]);
|
||||
end
|
||||
|
||||
if label.include.value then
|
||||
name_text = string.format("%s%s", name_text, tostring(player_info.list[label_key]));
|
||||
end
|
||||
|
||||
drawing.draw_label(label, position_on_screen, 1, name_text);
|
||||
|
||||
::continue::
|
||||
end
|
||||
|
||||
-- Affinity Label
|
||||
local affinity_name_text = "";
|
||||
if this.affinity_label.include.name then
|
||||
affinity_name_text = string.format("%s: ", cached_names.affinity);
|
||||
end
|
||||
|
||||
if this.affinity_label.include.value then
|
||||
affinity_name_text = string.format("%s%s%%", affinity_name_text, tostring(player_info.list.affinity));
|
||||
end
|
||||
|
||||
drawing.draw_label(this.affinity_label, position_on_screen, 1, affinity_name_text);
|
||||
|
||||
-- Stamina Label
|
||||
local stamina_name_text = "";
|
||||
if this.stamina_label.include.name then
|
||||
stamina_name_text = string.format("%s: ", cached_names.stamina);
|
||||
end
|
||||
|
||||
if this.stamina_label.include.value and not this.stamina_label.include.max_value then
|
||||
stamina_name_text = string.format("%s%s", stamina_name_text, tostring(player_info.list.stamina));
|
||||
|
||||
elseif not this.stamina_label.include.value and this.stamina_label.include.max_value then
|
||||
stamina_name_text = string.format("%s%s", stamina_name_text, tostring(player_info.list.max_stamina));
|
||||
|
||||
elseif this.stamina_label.include.value and this.stamina_label.include.max_value then
|
||||
stamina_name_text = string.format("%s%s/%s", stamina_name_text, tostring(player_info.list.stamina), tostring(player_info.list.max_stamina));
|
||||
end
|
||||
|
||||
drawing.draw_label(this.stamina_label, position_on_screen, 1, stamina_name_text);
|
||||
|
||||
-- Element Label
|
||||
if player_info.list.element_type ~= 0 then
|
||||
|
||||
local element_name_text = "";
|
||||
if this.element_label.include.name then
|
||||
|
||||
local ailment_names = language.current_language.ailments;
|
||||
|
||||
if player_info.list.element_type == 1 then
|
||||
element_name_text = string.format("%s: ", cached_names.fire);
|
||||
elseif player_info.list.element_type == 2 then
|
||||
element_name_text = string.format("%s: ", cached_names.water);
|
||||
elseif player_info.list.element_type == 3 then
|
||||
element_name_text = string.format("%s: ", cached_names.thunder);
|
||||
elseif player_info.list.element_type == 4 then
|
||||
element_name_text = string.format("%s: ", cached_names.ice);
|
||||
elseif player_info.list.element_type == 5 then
|
||||
element_name_text = string.format("%s: ", cached_names.dragon);
|
||||
elseif player_info.list.element_type == 6 then
|
||||
element_name_text = string.format("%s: ", ailment_names.poison);
|
||||
elseif player_info.list.element_type == 7 then
|
||||
element_name_text = string.format("%s: ", ailment_names.sleep);
|
||||
elseif player_info.list.element_type == 8 then
|
||||
element_name_text = string.format("%s: ", ailment_names.paralysis);
|
||||
elseif player_info.list.element_type == 9 then
|
||||
element_name_text = string.format("%s: ", ailment_names.blast);
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if this.element_label.include.value then
|
||||
element_name_text = string.format("%s%s", element_name_text, tostring(player_info.list.element_attack));
|
||||
end
|
||||
|
||||
drawing.draw_label(this.element_label, position_on_screen, 1, element_name_text);
|
||||
end
|
||||
|
||||
|
||||
-- Element 2 Label
|
||||
if player_info.list.element_type_2 ~= 0 then
|
||||
|
||||
local element_2_name_text = "";
|
||||
if this.element_2_label.include.name then
|
||||
|
||||
local ailment_names = language.current_language.ailments;
|
||||
|
||||
if player_info.list.element_type_2 == 1 then
|
||||
element_2_name_text = string.format("%s: ", cached_names.fire);
|
||||
elseif player_info.list.element_type_2 == 2 then
|
||||
element_2_name_text = string.format("%s: ", cached_names.water);
|
||||
elseif player_info.list.element_type_2 == 3 then
|
||||
element_2_name_text = string.format("%s: ", cached_names.thunder);
|
||||
elseif player_info.list.element_type_2 == 4 then
|
||||
element_2_name_text = string.format("%s: ", cached_names.ice);
|
||||
elseif player_info.list.element_type_2 == 5 then
|
||||
element_2_name_text = string.format("%s: ", cached_names.dragon);
|
||||
elseif player_info.list.element_type_2 == 6 then
|
||||
element_2_name_text = string.format("%s: ", ailment_names.poison);
|
||||
elseif player_info.list.element_type_2 == 7 then
|
||||
element_2_name_text = string.format("%s: ", ailment_names.sleep);
|
||||
elseif player_info.list.element_type_2 == 8 then
|
||||
element_2_name_text = string.format("%s: ", ailment_names.paralysis);
|
||||
elseif player_info.list.element_type_2 == 9 then
|
||||
element_2_name_text = string.format("%s: ", ailment_names.blast);
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if this.element_2_label.include.value then
|
||||
element_2_name_text = string.format("%s%s", element_2_name_text, tostring(player_info.list.element_attack_2));
|
||||
end
|
||||
|
||||
drawing.draw_label(this.element_2_label, position_on_screen, 1, element_2_name_text);
|
||||
end
|
||||
end
|
||||
|
||||
function this.init_UI()
|
||||
this.label_list.attack = utils.table.deep_copy(config.current_config.stats_UI.attack_label);
|
||||
this.label_list.defense = utils.table.deep_copy(config.current_config.stats_UI.defense_label);
|
||||
|
||||
this.label_list.fire_resistance = utils.table.deep_copy(config.current_config.stats_UI.fire_resistance_label);
|
||||
this.label_list.water_resistance = utils.table.deep_copy(config.current_config.stats_UI.water_resistance_label);
|
||||
this.label_list.thunder_resistance = utils.table.deep_copy(config.current_config.stats_UI.thunder_resistance_label);
|
||||
this.label_list.ice_resistance = utils.table.deep_copy(config.current_config.stats_UI.ice_resistance_label);
|
||||
this.label_list.dragon_resistance = utils.table.deep_copy(config.current_config.stats_UI.dragon_resistance_label);
|
||||
|
||||
this.affinity_label = utils.table.deep_copy(config.current_config.stats_UI.affinity_label);
|
||||
this.stamina_label = utils.table.deep_copy(config.current_config.stats_UI.stamina_label);
|
||||
this.element_label = utils.table.deep_copy(config.current_config.stats_UI.element_label);
|
||||
this.element_2_label = utils.table.deep_copy(config.current_config.stats_UI.element_2_label);
|
||||
|
||||
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
|
||||
for label_key, label in pairs(this.label_list) do
|
||||
label.offset.x = label.offset.x * global_scale_modifier;
|
||||
label.offset.y = label.offset.y * global_scale_modifier;
|
||||
end
|
||||
|
||||
this.affinity_label.offset.x = this.affinity_label.offset.x * global_scale_modifier;
|
||||
this.affinity_label.offset.y = this.affinity_label.offset.y * global_scale_modifier;
|
||||
|
||||
this.stamina_label.offset.x = this.stamina_label.offset.x * global_scale_modifier;
|
||||
this.stamina_label.offset.y = this.stamina_label.offset.y * global_scale_modifier;
|
||||
|
||||
this.element_label.offset.x = this.element_label.offset.x * global_scale_modifier;
|
||||
this.element_label.offset.y = this.element_label.offset.y * global_scale_modifier;
|
||||
|
||||
this.element_2_label.offset.x = this.element_2_label.offset.x * global_scale_modifier;
|
||||
this.element_2_label.offset.y = this.element_2_label.offset.y * global_scale_modifier;
|
||||
end
|
||||
|
||||
function this.init_dependencies()
|
||||
config = require("MHR_Overlay.Misc.config");
|
||||
buff_UI_entity = require("MHR_Overlay.UI.UI_Entities.buff_UI_entity");
|
||||
consumables = require("MHR_Overlay.Buffs.consumables");
|
||||
melody_effects = require("MHR_Overlay.Buffs.melody_effects");
|
||||
buffs = require("MHR_Overlay.Buffs.buffs");
|
||||
--singletons = require("MHR_Overlay.Game_Handler.singletons");
|
||||
config = require("MHR_Overlay.Misc.config");
|
||||
--customization_menu = require("MHR_Overlay.UI.customization_menu");
|
||||
--players = require("MHR_Overlay.Damage_Meter.players");
|
||||
--non_players = require("MHR_Overlay.Damage_Meter.non_players");
|
||||
--quest_status = require("MHR_Overlay.Game_Handler.quest_status");
|
||||
screen = require("MHR_Overlay.Game_Handler.screen");
|
||||
--drawing = require("MHR_Overlay.UI.drawing");
|
||||
utils = require("MHR_Overlay.Misc.utils");
|
||||
error_handler = require("MHR_Overlay.Misc.error_handler");
|
||||
endemic_life_buff = require("MHR_Overlay.Buffs.endemic_life_buffs");
|
||||
skills = require("MHR_Overlay.Buffs.skills");
|
||||
dangos = require("MHR_Overlay.Buffs.dangos");
|
||||
abnormal_statuses = require("MHR_Overlay.Buffs.abnormal_statuses");
|
||||
drawing = require("MHR_Overlay.UI.drawing");
|
||||
player_info = require("MHR_Overlay.Misc.player_info");
|
||||
language = require("MHR_Overlay.Misc.language");
|
||||
end
|
||||
|
||||
function this.init_module()
|
||||
this.init_UI();
|
||||
end
|
||||
|
||||
return this;
|
||||
@@ -16,6 +16,7 @@ local quest_status;
|
||||
local buffs;
|
||||
local error_handler;
|
||||
local time;
|
||||
local stats_UI;
|
||||
|
||||
local label_customization;
|
||||
local bar_customization;
|
||||
@@ -365,6 +366,7 @@ function this.draw()
|
||||
local damage_meter_UI_changed = false;
|
||||
local endemic_life_UI_changed = false;
|
||||
local buff_UI_changed = false;
|
||||
local stats_UI_changed = false;
|
||||
local debug_changed = false;
|
||||
local apply_font_requested = false;
|
||||
|
||||
@@ -404,6 +406,7 @@ function this.draw()
|
||||
damage_meter_UI_changed = this.draw_damage_meter_UI();
|
||||
endemic_life_UI_changed = this.draw_endemic_life_UI()
|
||||
buff_UI_changed = this.draw_buff_UI();
|
||||
stats_UI_changed = this.draw_stats_UI()
|
||||
|
||||
imgui.new_line();
|
||||
debug_changed = this.draw_debug();
|
||||
@@ -471,6 +474,11 @@ function this.draw()
|
||||
end
|
||||
end
|
||||
|
||||
if stats_UI_changed or modifiers_changed or config_changed then
|
||||
stats_UI.init_UI();
|
||||
end
|
||||
|
||||
|
||||
if this.menu_font_changed and (apply_font_requested or config_changed) then
|
||||
this.menu_font_changed = false;
|
||||
this.reload_font();
|
||||
@@ -478,7 +486,7 @@ function this.draw()
|
||||
|
||||
if window_changed or modules_changed or global_settings_changed or small_monster_UI_changed or large_monster_dynamic_UI_changed or
|
||||
large_monster_static_UI_changed or large_monster_highlighted_UI_changed or time_UI_changed or damage_meter_UI_changed or
|
||||
endemic_life_UI_changed or buff_UI_changed or modifiers_changed or config_changed or debug_changed then
|
||||
endemic_life_UI_changed or buff_UI_changed or stats_UI_changed or modifiers_changed or config_changed or debug_changed then
|
||||
config.save_current();
|
||||
end
|
||||
|
||||
@@ -1002,6 +1010,17 @@ function this.draw_global_settings(apply_font_requested, language_changed)
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.module_visibility_based_on_game_state) then
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.in_lobby) then
|
||||
|
||||
changed, cached_config.module_visibility.in_lobby.stats_UI = imgui.checkbox(
|
||||
language.current_language.customization_menu.stats_UI,
|
||||
cached_config.module_visibility.in_lobby.stats_UI);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.in_training_area) then
|
||||
|
||||
changed, cached_config.module_visibility.in_training_area.large_monster_dynamic_UI = imgui.checkbox(
|
||||
@@ -1040,6 +1059,12 @@ function this.draw_global_settings(apply_font_requested, language_changed)
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.module_visibility.in_training_area.stats_UI = imgui.checkbox(
|
||||
language.current_language.customization_menu.stats_UI,
|
||||
cached_config.module_visibility.in_training_area.stats_UI);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
@@ -2296,6 +2321,83 @@ function this.draw_buff_UI()
|
||||
return config_changed;
|
||||
end
|
||||
|
||||
function this.draw_stats_UI()
|
||||
local changed = false;
|
||||
local config_changed = false;
|
||||
local index = 0;
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.stats_UI) then
|
||||
local cached_config = config.current_config.stats_UI;
|
||||
|
||||
changed, cached_config.enabled = imgui.checkbox(
|
||||
language.current_language.customization_menu.enabled, cached_config.enabled);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.position) then
|
||||
changed, cached_config.position.x = imgui.drag_float(
|
||||
language.current_language.customization_menu.x, cached_config.position.x, 0.1, 0, screen.width, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.position.y = imgui.drag_float(
|
||||
language.current_language.customization_menu.y, cached_config.position.y, 0.1, 0, screen.height, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, index = imgui.combo(
|
||||
language.current_language.customization_menu.anchor,
|
||||
utils.table.find_index(this.anchor_types, cached_config.position.anchor),
|
||||
this.displayed_anchor_types);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
if changed then
|
||||
cached_config.position.anchor = this.anchor_types[index];
|
||||
end
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.attack_label, cached_config.attack_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.affinity_label, cached_config.affinity_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.defense_label, cached_config.defense_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.fire_resistance_label, cached_config.fire_resistance_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.water_resistance_label, cached_config.water_resistance_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.thunder_resistance_label, cached_config.thunder_resistance_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.ice_resistance_label, cached_config.ice_resistance_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.dragon_resistance_label, cached_config.dragon_resistance_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.stamina_label, cached_config.stamina_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.element_label, cached_config.element_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.element_2_label, cached_config.element_2_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
return config_changed;
|
||||
end
|
||||
|
||||
function this.draw_debug()
|
||||
local cached_config = config.current_config.debug;
|
||||
|
||||
@@ -2369,6 +2471,7 @@ function this.init_dependencies()
|
||||
buffs = require("MHR_Overlay.Buffs.buffs");
|
||||
error_handler = require("MHR_Overlay.Misc.error_handler");
|
||||
time = require("MHR_Overlay.Game_Handler.time");
|
||||
stats_UI = require("MHR_Overlay.UI.Modules.stats_UI");
|
||||
|
||||
label_customization = require("MHR_Overlay.UI.Customizations.label_customization");
|
||||
bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization");
|
||||
|
||||
Reference in New Issue
Block a user