Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/sourcelist.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ set(sources ${sources}
src/System/Hooks.cpp
src/System/Hotkeys.cpp
src/System/Input.cpp
src/System/Journal.cpp
src/System/Papyrus.cpp
src/System/Settings.cpp
src/System/Translation.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/FUCK-Host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ namespace FUCK::Host
return static_cast<int>(FUCK::InputDevice::kGamepad);
return static_cast<int>(FUCK::InputDevice::kMouseKeyboard);
}
static const char* GetKeyName_Impl(std::uint32_t key) { return Input::Manager::GetSingleton()->GetKeyName(key); }
static const char* GetKeyName_Impl(std::uint32_t key) { return Input::Keymap::GetKeyName(key); }
static bool IsGamepadKey_Impl(std::uint32_t k) { return k >= Input::Keymap::kGPBase; }
static bool IsBinding_Impl() { return Input::Manager::GetSingleton()->IsBinding(); }
static void AbortBinding_Impl() { Input::Manager::GetSingleton()->AbortBinding(); }
Expand Down
13 changes: 13 additions & 0 deletions src/FUCK-Man.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,19 @@ void FUCKMan::Toggle()
_isOpen ? Close() : Open();
}

EventResult FUCKMan::ProcessEvent(RE::InputEvent* const* a_events, RE::BSTEventSource<RE::InputEvent*>*)
{
MANAGER(Input)->ProcessInputEvents(a_events);

// Do not interfere if the console is open
if (auto ui = RE::UI::GetSingleton(); ui && ui->IsMenuOpen(RE::Console::MENU_NAME)) {
return EventResult::kContinue;
}

ProcessAsyncInput(a_events);
return EventResult::kContinue;
}

EventResult FUCKMan::ProcessEvent(const RE::MenuOpenCloseEvent* a_event, RE::BSTEventSource<RE::MenuOpenCloseEvent>*)
{
if (!a_event)
Expand Down
4 changes: 3 additions & 1 deletion src/FUCK-Man.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

class FUCKMan :
public REX::Singleton<FUCKMan>,
public RE::BSTEventSink<RE::MenuOpenCloseEvent>
public RE::BSTEventSink<RE::MenuOpenCloseEvent>,
public RE::BSTEventSink<RE::InputEvent*>
{
public:
enum class PauseType : int
Expand Down Expand Up @@ -134,6 +135,7 @@ class FUCKMan :

protected:
EventResult ProcessEvent(const RE::MenuOpenCloseEvent* a_event, RE::BSTEventSource<RE::MenuOpenCloseEvent>*) override;
EventResult ProcessEvent(RE::InputEvent* const* a_events, RE::BSTEventSource<RE::InputEvent*>*) override;

private:
void UpdateGameState();
Expand Down
2 changes: 1 addition & 1 deletion src/ImGui/Widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ namespace ImGui
if (kIcon) {
AddIcon(kIcon);
} else {
AddText(Input::Manager::GetSingleton()->GetKeyName(key));
AddText(Input::Keymap::GetKeyName(key));
}

// 2. Mod 2 ( Grows Left )
Expand Down
Loading