diff --git a/.idea/.idea.KhaoticEngineReborn/.idea/projectSettingsUpdater.xml b/.idea/.idea.KhaoticEngineReborn/.idea/projectSettingsUpdater.xml
index 64af657..4bb9f4d 100644
--- a/.idea/.idea.KhaoticEngineReborn/.idea/projectSettingsUpdater.xml
+++ b/.idea/.idea.KhaoticEngineReborn/.idea/projectSettingsUpdater.xml
@@ -1,7 +1,6 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml b/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml
index 65a8385..ae86950 100644
--- a/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml
+++ b/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml
@@ -5,11 +5,10 @@
-
-
-
-
+
+
+
@@ -42,30 +41,38 @@
- {
+ "keyToString": {
+ "ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
+ "C++ Project.enginecustom.executor": "Run",
+ "C/C++ Project.enginecustom.executor": "Run",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "RunOnceActivity.git.unshallow": "true",
+ "SHARE_PROJECT_CONFIGURATION_FILES": "true",
+ "git-widget-placeholder": "main",
+ "ignore.virus.scanning.warn.message": "true",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "settings.editor.selected.configurable": "preferences.pluginManager",
+ "vue.rearranger.settings.migration": "true"
+ },
+ "keyToStringList": {
+ "rider.external.source.directories": [
+ "C:\\Users\\arivas\\AppData\\Roaming\\JetBrains\\Rider2024.1\\resharper-host\\DecompilerCache",
+ "C:\\Users\\arivas\\AppData\\Roaming\\JetBrains\\Rider2024.1\\resharper-host\\SourcesCache",
+ "C:\\Users\\arivas\\AppData\\Local\\Symbols\\src"
+ ]
}
-}]]>
-
+}
+
-
+
+
@@ -73,19 +80,18 @@
-
-
-
+
+
@@ -93,11 +99,11 @@
-
-
+
+
@@ -105,10 +111,8 @@
-
-
@@ -152,6 +156,8 @@
+
+
diff --git a/enginecustom/src/src/system/Systemclass.cpp b/enginecustom/src/src/system/Systemclass.cpp
index ab2d4eb..d8b3c9a 100644
--- a/enginecustom/src/src/system/Systemclass.cpp
+++ b/enginecustom/src/src/system/Systemclass.cpp
@@ -268,16 +268,16 @@ bool SystemClass::Frame()
return false;
}
- if(m_Input->IsTildePressed() && !m_IsDebugKeyPressed)
+ if(!m_Input->IsKeyDown(222))
{
//log the key press
- m_IsDebugKeyPressed = true;
- DEBUG_MODE = !DEBUG_MODE;
+ m_IsDebugKeyPressed = false;
}
- else if (!m_Input->IsTildeReleased())
+ else if (m_Input->IsKeyDown(222) && !m_IsDebugKeyPressed)
{
// Log the key release state
- m_IsDebugKeyPressed = false;
+ m_IsDebugKeyPressed = true;
+ DEBUG_MODE = !DEBUG_MODE;
}
diff --git a/enginecustom/src/src/system/inputclass.cpp b/enginecustom/src/src/system/inputclass.cpp
index a7f0b97..34dee76 100644
--- a/enginecustom/src/src/system/inputclass.cpp
+++ b/enginecustom/src/src/system/inputclass.cpp
@@ -121,7 +121,7 @@ bool InputClass::Initialize(HINSTANCE hinstance, HWND hwnd, int screenWidth, int
void InputClass::KeyDown(unsigned int input)
{
// If a key is pressed then save that state in the key array.
- Logger::Get().Log("Key down", __FILE__, __LINE__, Logger::LogLevel::Input);
+ Logger::Get().Log("Key down: " + std::to_string(input), __FILE__, __LINE__, Logger::LogLevel::Input);
m_keys[input] = true;
return;
}
@@ -130,7 +130,6 @@ void InputClass::KeyDown(unsigned int input)
void InputClass::KeyUp(unsigned int input)
{
// If a key is released then clear that state in the key array.
- Logger::Get().Log("Key up", __FILE__, __LINE__, Logger::LogLevel::Input);
m_keys[input] = false;
return;
}
@@ -385,17 +384,6 @@ 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âchée et était enfoncée lors de la derniè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;