mirror of
https://github.com/GreenComfyTea/MHR-Overlay.git
synced 2026-01-25 04:48:22 -08:00
Merge table_helpers and unicode_helpers into utils
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
local ailment_buildups_customization = {};
|
||||
|
||||
local table_helpers;
|
||||
local utils;
|
||||
local config;
|
||||
local screen;
|
||||
local players;
|
||||
@@ -43,6 +43,9 @@ local imgui = imgui;
|
||||
local draw = draw;
|
||||
local Vector2f = Vector2f;
|
||||
local reframework = reframework;
|
||||
local os = os;
|
||||
local ValueType = ValueType;
|
||||
local package = package;
|
||||
|
||||
function ailment_buildups_customization.draw(cached_config)
|
||||
local changed = false;
|
||||
@@ -100,7 +103,7 @@ function ailment_buildups_customization.draw(cached_config)
|
||||
if imgui.tree_node(language.current_language.customization_menu.settings) then
|
||||
changed, index = imgui.combo(
|
||||
language.current_language.customization_menu.highlighted_bar,
|
||||
table_helpers.find_index(customization_menu.highlighted_buildup_bar_types, cached_config.settings.highlighted_bar),
|
||||
utils.table.find_index(customization_menu.highlighted_buildup_bar_types, cached_config.settings.highlighted_bar),
|
||||
customization_menu.displayed_highlighted_buildup_bar_types);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
@@ -111,7 +114,7 @@ function ailment_buildups_customization.draw(cached_config)
|
||||
|
||||
changed, index = imgui.combo(
|
||||
language.current_language.customization_menu.buildup_bars_are_relative_to,
|
||||
table_helpers.find_index(customization_menu.displayed_buildup_bar_relative_types, cached_config.settings.buildup_bar_relative_to),
|
||||
utils.table.find_index(customization_menu.displayed_buildup_bar_relative_types, cached_config.settings.buildup_bar_relative_to),
|
||||
customization_menu.displayed_buildup_bar_relative_types);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
@@ -131,7 +134,7 @@ function ailment_buildups_customization.draw(cached_config)
|
||||
if imgui.tree_node(language.current_language.customization_menu.sorting) then
|
||||
changed, index = imgui.combo(
|
||||
language.current_language.customization_menu.type,
|
||||
table_helpers.find_index(customization_menu.ailment_buildups_sorting_types, cached_config.sorting.type),
|
||||
utils.table.find_index(customization_menu.ailment_buildups_sorting_types, cached_config.sorting.type),
|
||||
customization_menu.displayed_ailment_buildups_sorting_types);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
@@ -198,7 +201,7 @@ function ailment_buildups_customization.draw(cached_config)
|
||||
end
|
||||
|
||||
function ailment_buildups_customization.init_module()
|
||||
table_helpers = require("MHR_Overlay.Misc.table_helpers");
|
||||
utils = require("MHR_Overlay.Misc.utils");
|
||||
language = require("MHR_Overlay.Misc.language");
|
||||
config = require("MHR_Overlay.Misc.config");
|
||||
screen = require("MHR_Overlay.Game_Handler.screen");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
local ailments_customization = {};
|
||||
|
||||
local table_helpers;
|
||||
local utils;
|
||||
local config;
|
||||
local screen;
|
||||
local players;
|
||||
@@ -43,6 +43,9 @@ local imgui = imgui;
|
||||
local draw = draw;
|
||||
local Vector2f = Vector2f;
|
||||
local reframework = reframework;
|
||||
local os = os;
|
||||
local ValueType = ValueType;
|
||||
local package = package;
|
||||
|
||||
function ailments_customization.draw(cached_config)
|
||||
local changed = false;
|
||||
@@ -140,7 +143,7 @@ function ailments_customization.draw(cached_config)
|
||||
if imgui.tree_node(language.current_language.customization_menu.sorting) then
|
||||
changed, index = imgui.combo(
|
||||
language.current_language.customization_menu.type,
|
||||
table_helpers.find_index(customization_menu.ailments_sorting_types, cached_config.sorting.type),
|
||||
utils.table.find_index(customization_menu.ailments_sorting_types, cached_config.sorting.type),
|
||||
customization_menu.displayed_ailments_sorting_types);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
@@ -363,7 +366,7 @@ function ailments_customization.draw(cached_config)
|
||||
end
|
||||
|
||||
function ailments_customization.init_module()
|
||||
table_helpers = require("MHR_Overlay.Misc.table_helpers");
|
||||
utils = require("MHR_Overlay.Misc.utils");
|
||||
language = require("MHR_Overlay.Misc.language");
|
||||
config = require("MHR_Overlay.Misc.config");
|
||||
screen = require("MHR_Overlay.Game_Handler.screen");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
local bar_customization = {};
|
||||
|
||||
local table_helpers;
|
||||
local utils;
|
||||
local config;
|
||||
local screen;
|
||||
local players;
|
||||
@@ -42,6 +42,9 @@ local imgui = imgui;
|
||||
local draw = draw;
|
||||
local Vector2f = Vector2f;
|
||||
local reframework = reframework;
|
||||
local os = os;
|
||||
local ValueType = ValueType;
|
||||
local package = package;
|
||||
|
||||
function bar_customization.draw(bar_name, bar)
|
||||
if bar == nil then
|
||||
@@ -96,7 +99,7 @@ function bar_customization.draw(bar_name, bar)
|
||||
|
||||
|
||||
changed, index = imgui.combo(language.current_language.customization_menu.style,
|
||||
table_helpers.find_index(customization_menu.outline_styles,
|
||||
utils.table.find_index(customization_menu.outline_styles,
|
||||
bar.outline.style),
|
||||
customization_menu.displayed_outline_styles);
|
||||
bar_changed = bar_changed or changed;
|
||||
@@ -189,7 +192,7 @@ function bar_customization.draw(bar_name, bar)
|
||||
end
|
||||
|
||||
function bar_customization.init_module()
|
||||
table_helpers = require("MHR_Overlay.Misc.table_helpers");
|
||||
utils = require("MHR_Overlay.Misc.utils");
|
||||
language = require("MHR_Overlay.Misc.language");
|
||||
config = require("MHR_Overlay.Misc.config");
|
||||
screen = require("MHR_Overlay.Game_Handler.screen");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
local body_parts_customization = {};
|
||||
|
||||
local table_helpers;
|
||||
local utils;
|
||||
local config;
|
||||
local screen;
|
||||
local players;
|
||||
@@ -43,6 +43,9 @@ local imgui = imgui;
|
||||
local draw = draw;
|
||||
local Vector2f = Vector2f;
|
||||
local reframework = reframework;
|
||||
local os = os;
|
||||
local ValueType = ValueType;
|
||||
local package = package;
|
||||
|
||||
function body_parts_customization.draw(cached_config)
|
||||
local changed = false;
|
||||
@@ -88,7 +91,7 @@ function body_parts_customization.draw(cached_config)
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, index = imgui.combo(language.current_language.customization_menu.filter_mode,
|
||||
table_helpers.find_index(customization_menu.large_monster_UI_parts_filter_types, cached_config.settings.filter_mode),
|
||||
utils.table.find_index(customization_menu.large_monster_UI_parts_filter_types, cached_config.settings.filter_mode),
|
||||
customization_menu.displayed_large_monster_UI_parts_filter_types);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
@@ -108,7 +111,7 @@ function body_parts_customization.draw(cached_config)
|
||||
if imgui.tree_node(language.current_language.customization_menu.sorting) then
|
||||
changed, index = imgui.combo(
|
||||
language.current_language.customization_menu.type,
|
||||
table_helpers.find_index(customization_menu.large_monster_UI_parts_sorting_types, cached_config.sorting.type),
|
||||
utils.table.find_index(customization_menu.large_monster_UI_parts_sorting_types, cached_config.sorting.type),
|
||||
customization_menu.displayed_large_monster_UI_parts_sorting_types);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
@@ -366,7 +369,7 @@ function body_parts_customization.draw(cached_config)
|
||||
end
|
||||
|
||||
function body_parts_customization.init_module()
|
||||
table_helpers = require("MHR_Overlay.Misc.table_helpers");
|
||||
utils = require("MHR_Overlay.Misc.utils");
|
||||
language = require("MHR_Overlay.Misc.language");
|
||||
config = require("MHR_Overlay.Misc.config");
|
||||
screen = require("MHR_Overlay.Game_Handler.screen");
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
local large_monster_UI_customization = {};
|
||||
|
||||
local table_helpers;
|
||||
local config;
|
||||
local screen;
|
||||
local players;
|
||||
@@ -43,6 +42,9 @@ local imgui = imgui;
|
||||
local draw = draw;
|
||||
local Vector2f = Vector2f;
|
||||
local reframework = reframework;
|
||||
local os = os;
|
||||
local ValueType = ValueType;
|
||||
local package = package;
|
||||
|
||||
function large_monster_UI_customization.draw(cached_config)
|
||||
local changed = false;
|
||||
@@ -87,7 +89,6 @@ function large_monster_UI_customization.draw(cached_config)
|
||||
end
|
||||
|
||||
function large_monster_UI_customization.init_module()
|
||||
table_helpers = require("MHR_Overlay.Misc.table_helpers");
|
||||
language = require("MHR_Overlay.Misc.language");
|
||||
config = require("MHR_Overlay.Misc.config");
|
||||
screen = require("MHR_Overlay.Game_Handler.screen");
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
local label_customization = {};
|
||||
|
||||
local table_helpers;
|
||||
local config;
|
||||
local screen;
|
||||
local players;
|
||||
@@ -41,6 +40,9 @@ local imgui = imgui;
|
||||
local draw = draw;
|
||||
local Vector2f = Vector2f;
|
||||
local reframework = reframework;
|
||||
local os = os;
|
||||
local ValueType = ValueType;
|
||||
local package = package;
|
||||
|
||||
function label_customization.draw(label_name, label)
|
||||
local label_changed = false;
|
||||
@@ -114,7 +116,6 @@ function label_customization.draw(label_name, label)
|
||||
end
|
||||
|
||||
function label_customization.init_module()
|
||||
table_helpers = require("MHR_Overlay.Misc.table_helpers");
|
||||
language = require("MHR_Overlay.Misc.language");
|
||||
config = require("MHR_Overlay.Misc.config");
|
||||
screen = require("MHR_Overlay.Game_Handler.screen");
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
local large_monster_UI_customization = {};
|
||||
|
||||
local table_helpers;
|
||||
local config;
|
||||
local screen;
|
||||
local players;
|
||||
@@ -50,6 +49,9 @@ local imgui = imgui;
|
||||
local draw = draw;
|
||||
local Vector2f = Vector2f;
|
||||
local reframework = reframework;
|
||||
local os = os;
|
||||
local ValueType = ValueType;
|
||||
local package = package;
|
||||
|
||||
function large_monster_UI_customization.draw(cached_config)
|
||||
local changed = false;
|
||||
@@ -80,7 +82,6 @@ function large_monster_UI_customization.draw(cached_config)
|
||||
end
|
||||
|
||||
function large_monster_UI_customization.init_module()
|
||||
table_helpers = require("MHR_Overlay.Misc.table_helpers");
|
||||
language = require("MHR_Overlay.Misc.language");
|
||||
config = require("MHR_Overlay.Misc.config");
|
||||
screen = require("MHR_Overlay.Game_Handler.screen");
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
local line_customization = {};
|
||||
|
||||
local table_helpers;
|
||||
local config;
|
||||
local screen;
|
||||
local players;
|
||||
@@ -41,6 +40,9 @@ local imgui = imgui;
|
||||
local draw = draw;
|
||||
local Vector2f = Vector2f;
|
||||
local reframework = reframework;
|
||||
local os = os;
|
||||
local ValueType = ValueType;
|
||||
local package = package;
|
||||
|
||||
function line_customization.draw(line_name, line)
|
||||
if line == nil then
|
||||
@@ -94,7 +96,6 @@ function line_customization.draw(line_name, line)
|
||||
end
|
||||
|
||||
function line_customization.init_module()
|
||||
table_helpers = require("MHR_Overlay.Misc.table_helpers");
|
||||
language = require("MHR_Overlay.Misc.language");
|
||||
config = require("MHR_Overlay.Misc.config");
|
||||
screen = require("MHR_Overlay.Game_Handler.screen");
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
local module_visibility_customization = {};
|
||||
|
||||
local table_helpers;
|
||||
local config;
|
||||
local screen;
|
||||
local players;
|
||||
@@ -43,6 +42,9 @@ local imgui = imgui;
|
||||
local draw = draw;
|
||||
local Vector2f = Vector2f;
|
||||
local reframework = reframework;
|
||||
local os = os;
|
||||
local ValueType = ValueType;
|
||||
local package = package;
|
||||
|
||||
function module_visibility_customization.draw(cached_config)
|
||||
local changed = false;
|
||||
@@ -100,7 +102,6 @@ function module_visibility_customization.draw(cached_config)
|
||||
end
|
||||
|
||||
function module_visibility_customization.init_module()
|
||||
table_helpers = require("MHR_Overlay.Misc.table_helpers");
|
||||
language = require("MHR_Overlay.Misc.language");
|
||||
config = require("MHR_Overlay.Misc.config");
|
||||
screen = require("MHR_Overlay.Game_Handler.screen");
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
local rage_customization = {};
|
||||
|
||||
local table_helpers;
|
||||
local config;
|
||||
local screen;
|
||||
local players;
|
||||
@@ -43,6 +42,9 @@ local imgui = imgui;
|
||||
local draw = draw;
|
||||
local Vector2f = Vector2f;
|
||||
local reframework = reframework;
|
||||
local os = os;
|
||||
local ValueType = ValueType;
|
||||
local package = package;
|
||||
|
||||
function rage_customization.draw(cached_config)
|
||||
local changed = false;
|
||||
@@ -90,7 +92,6 @@ function rage_customization.draw(cached_config)
|
||||
end
|
||||
|
||||
function rage_customization.init_module()
|
||||
table_helpers = require("MHR_Overlay.Misc.table_helpers");
|
||||
language = require("MHR_Overlay.Misc.language");
|
||||
config = require("MHR_Overlay.Misc.config");
|
||||
screen = require("MHR_Overlay.Game_Handler.screen");
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
local stamina_customization = {};
|
||||
|
||||
local table_helpers;
|
||||
local config;
|
||||
local screen;
|
||||
local players;
|
||||
@@ -43,6 +42,9 @@ local imgui = imgui;
|
||||
local draw = draw;
|
||||
local Vector2f = Vector2f;
|
||||
local reframework = reframework;
|
||||
local os = os;
|
||||
local ValueType = ValueType;
|
||||
local package = package;
|
||||
|
||||
function stamina_customization.draw(cached_config)
|
||||
local changed = false;
|
||||
@@ -90,7 +92,6 @@ function stamina_customization.draw(cached_config)
|
||||
end
|
||||
|
||||
function stamina_customization.init_module()
|
||||
table_helpers = require("MHR_Overlay.Misc.table_helpers");
|
||||
language = require("MHR_Overlay.Misc.language");
|
||||
config = require("MHR_Overlay.Misc.config");
|
||||
screen = require("MHR_Overlay.Game_Handler.screen");
|
||||
|
||||
Reference in New Issue
Block a user