refactor: refactor KBM input code

This commit is contained in:
daoge_cmd
2026-03-04 21:19:40 +08:00
parent ac03b88a90
commit 1dc8a005ed
25 changed files with 1187 additions and 689 deletions

View File

@@ -7,7 +7,7 @@
#include "TutorialConstraints.h"
#include "InfoTask.h"
#include "..\..\..\Minecraft.World\Material.h"
#include "..\..\KeyboardMouseInput.h"
#include "..\..\Windows64\KeyboardMouseInput.h"
InfoTask::InfoTask(Tutorial *tutorial, int descriptionId, int promptId /*= -1*/, bool requiresUserInput /*= false*/,
int iMapping /*= 0*/, ETelemetryChallenges telemetryEvent /*= eTelemetryTutorial_NoEvent*/)
@@ -67,7 +67,7 @@ bool InfoTask::isCompleted()
if(!current)
{
#ifdef _WINDOWS64
if (InputManager.GetValue(pMinecraft->player->GetXboxPad(), (*it).first) > 0 || KMInput.IsKeyDown(VK_SPACE))
if (InputManager.GetValue(pMinecraft->player->GetXboxPad(), (*it).first) > 0 || g_KBMInput.IsKeyDown(VK_SPACE))
#else
if( InputManager.GetValue(pMinecraft->player->GetXboxPad(), (*it).first) > 0)
#endif