Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into dev
  • Loading branch information
mlthelama committed Jan 12, 2024
2 parents cbf108c + 9becfcb commit 81cc967
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/event/input_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ namespace event {

//for whatever reason I can open the menu while at a crafting station
//so let that not happen
if (ui->IsMenuOpen(RE::CraftingMenu::MENU_NAME) || input::menu_key_input_holder::is_one_ignore_menu_open()) {
if (ui->IsMenuOpen(RE::CraftingMenu::MENU_NAME) ||
input::menu_key_input_holder::is_one_ignore_menu_open()) {
continue;
}

Expand Down
10 changes: 5 additions & 5 deletions src/input/menu_key_input_holder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ namespace input {

void menu_key_input_holder::clear_set() { key_down_list_.clear(); }

bool menu_key_input_holder::is_one_ignore_menu_open() {
bool menu_key_input_holder::is_one_ignore_menu_open() {
auto ignore_menu_list = setting::input_setting::get_ignore_input_menu_list();

if (ignore_menu_list.empty()){
if (ignore_menu_list.empty()) {
return false;
}

auto* ui = RE::UI::GetSingleton();
auto open = false;
for (auto& menu : ignore_menu_list) {
Expand All @@ -58,10 +58,10 @@ namespace input {
return open;
}
}

return open;
}

bool menu_key_input_holder::is_down_list_equal(bool a_open) {
log_combo_set(a_open);
if (a_open) {
Expand Down
2 changes: 1 addition & 1 deletion src/input/menu_key_input_holder.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace input {
void clear_set();

static bool is_one_ignore_menu_open();

menu_key_input_holder(const menu_key_input_holder&) = delete;
menu_key_input_holder(menu_key_input_holder&&) = delete;
menu_key_input_holder& operator=(const menu_key_input_holder&) = delete;
Expand Down
6 changes: 3 additions & 3 deletions src/setting/input_setting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ namespace setting {
}
ignore_input_menu_list = menus;
}

logger::info("done loading input setting file"sv);
}

Expand All @@ -119,7 +119,7 @@ namespace setting {
bool input_setting::get_tween_menu_only() { return tween_menu_only; }

std::vector<std::string> input_setting::get_ignore_input_menu_list() { return ignore_input_menu_list; }

void input_setting::log() {
logger::debug(
"open(size) {}, close(size) {}, next(size) {}, previous(size) {}, paused {}. enabled {}, auto_inventory {}, auto_magic {}, tween menu {}, ignore_input_menu(size) {}"sv,
Expand All @@ -134,5 +134,5 @@ namespace setting {
tween_menu_only,
ignore_input_menu_list.size());
}

} // setting
2 changes: 1 addition & 1 deletion src/setting/input_setting.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace setting {
static bool auto_open_inventory_menu_magic();

static bool get_tween_menu_only();

static std::vector<std::string> get_ignore_input_menu_list();

static void log();
Expand Down
2 changes: 1 addition & 1 deletion src/setting/mod_detection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace setting {
wait_menu_redirected_json.is_boolean()) {
wait_menu_redirected = wait_menu_redirected_json;
}

logger::info("done loading input setting file"sv);
log();
}
Expand Down

0 comments on commit 81cc967

Please sign in to comment.