Added hotkeys, separated player initialization and drawing.

This commit is contained in:
GreenComfyTea
2022-02-20 19:23:36 +02:00
parent 39e324e0a5
commit c6669e5df0
25 changed files with 1458 additions and 361 deletions

View File

@@ -12,6 +12,22 @@ function config.init()
global_settings = {
language = "default",
menu_font = {
size = 17
},
UI_font = {
family = "Consolas",
size = 13,
bold = true,
italic = false
},
modifiers = {
global_position_modifier = 2,
global_scale_modifier = 2
},
performance = {
max_monster_updates_per_tick = 2,
prioritize_large_monsters = false,
@@ -27,7 +43,7 @@ function config.init()
damage_meter_UI = true
},
quest_summary_screen = {
quest_result_screen = {
small_monster_UI = false,
large_monster_dynamic_UI = false,
large_monster_static_UI = true,
@@ -44,16 +60,16 @@ function config.init()
}
},
menu_font = {
size = 17
},
UI_font = {
family = "Consolas",
size = 13,
bold = true,
italic = false
},
hotkeys = {
all_UI = 0,
small_monster_UI = 0,
large_monster_UI = 0,
large_monster_dynamic_UI = 0,
large_monster_static_UI = 0,
large_monster_highlighted_UI = 0,
time_UI = 0,
damage_meter_UI = 0,
}
},
small_monster_UI = {
@@ -662,7 +678,7 @@ function config.init()
include = {
part_name = true,
break_count = true
flinch_count = true
},
offset = {
@@ -1136,7 +1152,7 @@ function config.init()
include = {
part_name = true,
break_count = true
flinch_count = true
},
offset = {
@@ -1236,10 +1252,6 @@ function config.init()
highlighted = {
enabled = true,
settings = {
hide_dead_or_captured = true
},
position = {
x = 615,
y = 25,--y = 44,
@@ -1596,7 +1608,7 @@ function config.init()
include = {
part_name = true,
break_count = true
flinch_count = true
},
offset = {
@@ -1776,12 +1788,14 @@ function config.init()
include = {
myself = {
hunter_rank = true,
word_player = false,
player_id = false,
player_name = true
},
others = {
hunter_rank = true,
word_player = false,
player_id = false,
player_name = true
@@ -1790,7 +1804,7 @@ function config.init()
text = "%s",
offset = {
x = 45,
x = 5,
y = 0
},
color = 0xFFCCF4E1,
@@ -1806,7 +1820,7 @@ function config.init()
},
hunter_rank_label = {
visibility = true,
visibility = false,
enable_for = {
me = true,
@@ -1815,7 +1829,7 @@ function config.init()
text = "[%d]",
offset = {
x = 5,
x = -35,
y = 0
},
color = 0xFFCCF4E1,
@@ -2012,7 +2026,7 @@ function config.init_module()
config.init();
config.load();
config.current_config.version = "v1.8";
config.current_config.version = "v1.9";
language.update(table_helpers.find_index(language.language_names, config.current_config.global_settings.language, false));

View File

@@ -86,7 +86,7 @@ language.default_language = {
language = "Language",
module_visibility_on_different_screens = "Module Visibility on Different Screens",
during_quest = "During Quest",
quest_summary_screen = "Quest Summary Screen",
quest_result_screen = "Quest Result Screen",
training_area = "Training Area",
performance = "Performance",
@@ -170,7 +170,7 @@ language.default_language = {
body_parts = "Body Parts",
hide_undamaged_parts = "Hide Undamaged Parts",
part_name = "Part Name",
break_count = "Break Count",
flinch_count = "Flinch Count",
orientation = "Orientation",
horizontal = "Horizontal",
@@ -244,8 +244,16 @@ language.default_language = {
first_hit = "First Hit",
quest_time = "Quest Time",
join_time = "Join Time",
fight_time = "Fight Time"
fight_time = "Fight Time",
modifiers = "Modifiers",
global_scale_modifier = "Global Scale Modifier",
global_position_modifier = "Global Position Modifier",
hotkeys = "Hotkeys",
all_UI = "All UI",
assign_new_key = "Assign new key",
press_any_key = "Press any key..."
}
};
@@ -264,7 +272,6 @@ function language.load()
for i, language_file_name in ipairs(language_files) do
local language_name = language_file_name:gsub(language.language_folder, ""):gsub(".json", "");
-- language_file will be something like `my-cool-mod\config-file-1.json`;
local loaded_language = json.load_file(language_file_name);
if loaded_language ~= nil then
log.info("[MHR Overlay] " .. language_name .. ".json loaded successfully");