Patch update - V9.2.1
This commit is contained in:
@@ -50,6 +50,8 @@ public:
|
||||
bool IsSPressed() const;
|
||||
bool IsQPressed() const;
|
||||
bool IsEPressed()const;
|
||||
bool IsTildePressed() const;
|
||||
bool IsTildeReleased() const;
|
||||
|
||||
bool IsKeyDown(unsigned int) const;
|
||||
|
||||
@@ -69,6 +71,7 @@ private:
|
||||
DIMOUSESTATE m_mouseState;
|
||||
|
||||
int m_screenWidth, m_screenHeight, m_mouseX, m_mouseY;
|
||||
bool m_previousTildeState;
|
||||
|
||||
};
|
||||
|
||||
|
@@ -52,6 +52,7 @@ private:
|
||||
int m_initialWindowHeight;
|
||||
bool m_isDirect3DInitialized;
|
||||
bool m_isResizing = false;
|
||||
bool m_IsDebugKeyPressed = false;
|
||||
|
||||
std::mutex renderMutex;
|
||||
};
|
||||
|
@@ -268,6 +268,19 @@ bool SystemClass::Frame()
|
||||
return false;
|
||||
}
|
||||
|
||||
if(m_Input->IsTildePressed() && !m_IsDebugKeyPressed)
|
||||
{
|
||||
//log the key press
|
||||
m_IsDebugKeyPressed = true;
|
||||
DEBUG_MODE = !DEBUG_MODE;
|
||||
}
|
||||
else if (!m_Input->IsTildeReleased())
|
||||
{
|
||||
// Log the key release state
|
||||
m_IsDebugKeyPressed = false;
|
||||
}
|
||||
|
||||
|
||||
if (DEBUG_MODE)
|
||||
{
|
||||
// Render ImGui
|
||||
|
@@ -110,8 +110,6 @@ void imguiManager::SetupDockspace(ApplicationClass* app) {
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
|
||||
|
||||
ImGui::EndMenuBar();
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@ InputClass::InputClass()
|
||||
m_directInput = 0;
|
||||
m_keyboard = 0;
|
||||
m_mouse = 0;
|
||||
m_previousTildeState = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -384,6 +385,17 @@ bool InputClass::IsEPressed() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool InputClass::IsTildePressed() const
|
||||
{
|
||||
return (m_keyboardState[DIK_GRAVE] & 0x80) && !m_previousTildeState;
|
||||
}
|
||||
|
||||
// Ajoutez la m<>thode IsTildeReleased pour v<>rifier si la touche est actuellement rel<65>ch<63>e et <20>tait enfonc<6E>e lors de la derni<6E>re v<>rification
|
||||
bool InputClass::IsTildeReleased() const
|
||||
{
|
||||
return !(m_keyboardState[DIK_GRAVE] & 0x80) && m_previousTildeState;
|
||||
}
|
||||
|
||||
void InputClass::GetMouseLocation(int& mouseX, int& mouseY) const
|
||||
{
|
||||
mouseX = m_mouseX;
|
||||
|
Reference in New Issue
Block a user