mirror of
https://github.com/EricPlayZ/EGameTools.git
synced 2025-07-18 17:37:53 +08:00
- Added a "Debug" menu tab
- Changed "Menu Transparency" to "Menu Opacity"
This commit is contained in:
@ -86,6 +86,7 @@
|
||||
<ClCompile Include="source\ImGui\impl\win32_impl.cpp" />
|
||||
<ClCompile Include="source\kiero.cpp" />
|
||||
<ClCompile Include="source\menu\camera.cpp" />
|
||||
<ClCompile Include="source\menu\debug.cpp" />
|
||||
<ClCompile Include="source\menu\menu.cpp" />
|
||||
<ClCompile Include="source\menu\misc.cpp" />
|
||||
<ClCompile Include="source\menu\player.cpp" />
|
||||
@ -159,6 +160,7 @@
|
||||
<ClInclude Include="source\ImGui\imstb_truetype.h" />
|
||||
<ClInclude Include="source\kiero.h" />
|
||||
<ClInclude Include="source\menu\camera.h" />
|
||||
<ClInclude Include="source\menu\debug.h" />
|
||||
<ClInclude Include="source\menu\menu.h" />
|
||||
<ClInclude Include="source\menu\misc.h" />
|
||||
<ClInclude Include="source\menu\player.h" />
|
||||
|
@ -179,6 +179,9 @@
|
||||
<ClCompile Include="source\game\GamePH\PlayerDI_PH.cpp">
|
||||
<Filter>game\GamePH</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\menu\debug.cpp">
|
||||
<Filter>menu</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="source\kiero.h" />
|
||||
@ -384,6 +387,9 @@
|
||||
<ClInclude Include="source\game\GamePH\PlayerDI_PH.h">
|
||||
<Filter>game\GamePH</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\menu\debug.h">
|
||||
<Filter>menu</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="MinHook">
|
||||
|
@ -4022,7 +4022,7 @@ namespace Config {
|
||||
ValueType type;
|
||||
};
|
||||
static const auto configVariablesDefault = std::to_array<ConfigEntry>({
|
||||
{ "Menu", "Transparency", 99.0f, &Menu::transparency, Float },
|
||||
{ "Menu", "Opacity", 99.0f, &Menu::opacity, Float },
|
||||
{ "Menu", "Scale", 1.0f, &Menu::scale, Float },
|
||||
{ "Menu", "FirstTimeRunning", true, &Menu::firstTimeRunning, OPTION },
|
||||
{ "Menu", "HasSeenChangelog", false, &Menu::hasSeenChangelog, OPTION },
|
||||
|
@ -80,6 +80,7 @@ namespace Engine {
|
||||
if (!cachedUserModDirs.empty())
|
||||
cachedUserModDirs.clear();
|
||||
|
||||
cachedUserModDirs.push_back("EGameTools\\UserModFiles");
|
||||
for (const auto& entry : std::filesystem::recursive_directory_iterator("EGameTools\\UserModFiles")) {
|
||||
const std::filesystem::path pathToDir = entry.path();
|
||||
if (!std::filesystem::is_directory(pathToDir))
|
||||
|
@ -12,6 +12,7 @@ namespace GamePH {
|
||||
buffer<0x38, Engine::CBaseCamera*> pCBaseCamera;
|
||||
buffer<0x42, bool> enableSpeedMultiplier1;
|
||||
buffer<0x43, bool> enableSpeedMultiplier2;
|
||||
buffer<0x1B4, float> FOV;
|
||||
buffer<0x1CC, float> speedMultiplier;
|
||||
};
|
||||
|
||||
|
74
DL2GameOverhaulScript/source/menu/debug.cpp
Normal file
74
DL2GameOverhaulScript/source/menu/debug.cpp
Normal file
@ -0,0 +1,74 @@
|
||||
#include <pch.h>
|
||||
#include "debug.h"
|
||||
|
||||
#include "..\game\GamePH\DayNightCycle.h"
|
||||
#include "..\game\GamePH\FreeCamera.h"
|
||||
#include "..\game\GamePH\GameDI_PH.h"
|
||||
#include "..\game\GamePH\GameDI_PH2.h"
|
||||
#include "..\game\GamePH\LevelDI.h"
|
||||
#include "..\game\GamePH\LocalClientDI.h"
|
||||
#include "..\game\GamePH\LogicalPlayer.h"
|
||||
#include "..\game\GamePH\PlayerDI_PH.h"
|
||||
#include "..\game\GamePH\PlayerHealthModule.h"
|
||||
#include "..\game\GamePH\PlayerObjProperties.h"
|
||||
#include "..\game\GamePH\PlayerState.h"
|
||||
#include "..\game\GamePH\PlayerVariables.h"
|
||||
#include "..\game\GamePH\SessionCooperativeDI.h"
|
||||
#include "..\game\GamePH\TPPCameraDI.h"
|
||||
#include "..\game\GamePH\TimeWeather\CSystem.h"
|
||||
#include "..\game\GamePH\gen_TPPModel.h"
|
||||
|
||||
#include "..\game\Engine\CBulletPhysicsCharacter.h"
|
||||
#include "..\game\Engine\CGSObject.h"
|
||||
#include "..\game\Engine\CGSObject2.h"
|
||||
#include "..\game\Engine\CGame.h"
|
||||
#include "..\game\Engine\CInput.h"
|
||||
#include "..\game\Engine\CLevel.h"
|
||||
#include "..\game\Engine\CLevel2.h"
|
||||
#include "..\game\Engine\CLobbySteam.h"
|
||||
#include "..\game\Engine\CVideoSettings.h"
|
||||
#include "..\game\Engine\CoPhysicsProperty.h"
|
||||
|
||||
namespace Menu {
|
||||
namespace Debug {
|
||||
Tab Tab::instance{};
|
||||
void Tab::Update() {}
|
||||
void Tab::Render() {
|
||||
ImGui::SeparatorText("Class addresses##Debug");
|
||||
if (ImGui::CollapsingHeader("GamePH", ImGuiTreeNodeFlags_None)) {
|
||||
ImGui::Indent();
|
||||
ImGui::Text("TimeWeather\\CSystem: 0x%p", GamePH::TimeWeather::CSystem::Get());
|
||||
ImGui::Text("DayNightCycle: 0x%p", GamePH::DayNightCycle::Get());
|
||||
ImGui::Text("FreeCamera: 0x%p", GamePH::FreeCamera::Get());
|
||||
ImGui::Text("GameDI_PH: 0x%p", GamePH::GameDI_PH::Get());
|
||||
ImGui::Text("GameDI_PH2: 0x%p", GamePH::GameDI_PH2::Get());
|
||||
ImGui::Text("gen_TPPModel: 0x%p", GamePH::gen_TPPModel::Get());
|
||||
ImGui::Text("LevelDI: 0x%p", GamePH::LevelDI::Get());
|
||||
ImGui::Text("LocalClientDI: 0x%p", GamePH::LocalClientDI::Get());
|
||||
ImGui::Text("LogicalPlayer: 0x%p", GamePH::LogicalPlayer::Get());
|
||||
ImGui::Text("PlayerDI_PH: 0x%p", GamePH::PlayerDI_PH::Get());
|
||||
ImGui::Text("PlayerHealthModule: 0x%p", GamePH::PlayerHealthModule::Get());
|
||||
ImGui::Text("PlayerObjProperties: 0x%p", GamePH::PlayerObjProperties::Get());
|
||||
ImGui::Text("PlayerState: 0x%p", GamePH::PlayerState::Get());
|
||||
ImGui::Text("PlayerVariables: 0x%p", GamePH::PlayerVariables::Get());
|
||||
ImGui::Text("SessionCooperativeDI: 0x%p", GamePH::SessionCooperativeDI::Get());
|
||||
ImGui::Text("TPPCameraDI: 0x%p", GamePH::TPPCameraDI::Get());
|
||||
ImGui::Unindent();
|
||||
}
|
||||
if (ImGui::CollapsingHeader("Engine", ImGuiTreeNodeFlags_None)) {
|
||||
ImGui::Indent();
|
||||
ImGui::Text("CBulletPhysicsCharacter: 0x%p", Engine::CBulletPhysicsCharacter::Get());
|
||||
ImGui::Text("CGSObject: 0x%p", Engine::CGSObject::Get());
|
||||
ImGui::Text("CGSObject2: 0x%p", Engine::CGSObject2::Get());
|
||||
ImGui::Text("CGame: 0x%p", Engine::CGame::Get());
|
||||
ImGui::Text("CInput: 0x%p", Engine::CInput::Get());
|
||||
ImGui::Text("CLevel: 0x%p", Engine::CLevel::Get());
|
||||
ImGui::Text("CLevel2: 0x%p", Engine::CLevel2::Get());
|
||||
ImGui::Text("CLobbySteam: 0x%p", Engine::CLobbySteam::Get());
|
||||
ImGui::Text("CVideoSettings: 0x%p", Engine::CVideoSettings::Get());
|
||||
ImGui::Text("CoPhysicsProperty: 0x%p", Engine::CoPhysicsProperty::Get());
|
||||
ImGui::Unindent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
15
DL2GameOverhaulScript/source/menu/debug.h
Normal file
15
DL2GameOverhaulScript/source/menu/debug.h
Normal file
@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
#include "menu.h"
|
||||
|
||||
namespace Menu {
|
||||
namespace Debug {
|
||||
class Tab : MenuTab {
|
||||
public:
|
||||
Tab() : MenuTab("Debug", 4) {}
|
||||
void Update() override;
|
||||
void Render() override;
|
||||
|
||||
static Tab instance;
|
||||
};
|
||||
}
|
||||
}
|
@ -18,7 +18,7 @@ namespace Menu {
|
||||
static ImVec2 maxWndSize = defMaxWndSize;
|
||||
|
||||
KeyBindOption menuToggle = KeyBindOption(VK_F5);
|
||||
float transparency = 99.0f;
|
||||
float opacity = 99.0f;
|
||||
float scale = 1.0f;
|
||||
|
||||
static Utils::Time::Timer timePassedFromWelcomeScreen{};
|
||||
@ -200,7 +200,7 @@ namespace Menu {
|
||||
}
|
||||
void Render() {
|
||||
maxWndSize = defMaxWndSize * scale;
|
||||
ImGui::SetNextWindowBgAlpha(static_cast<float>(transparency) / 100.0f);
|
||||
ImGui::SetNextWindowBgAlpha(static_cast<float>(opacity) / 100.0f);
|
||||
ImGui::SetNextWindowSizeConstraints(minWndSize, maxWndSize);
|
||||
ImGui::Begin(title.c_str(), &menuToggle.value, windowFlags); {
|
||||
if (ImGui::BeginTabBar("##MainTabBar")) {
|
||||
@ -216,7 +216,7 @@ namespace Menu {
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::Hotkey("Menu Toggle Key", &menuToggle);
|
||||
ImGui::SliderFloat("Menu Transparency", &transparency, 0.0f, 100.0f, "%.1f%%", ImGuiSliderFlags_AlwaysClamp);
|
||||
ImGui::SliderFloat("Menu Opacity", &opacity, 0.0f, 100.0f, "%.1f%%", ImGuiSliderFlags_AlwaysClamp);
|
||||
if (ImGui::SliderFloat("Menu Scale", &scale, 1.0f, 2.5f, "%.1f%%", ImGuiSliderFlags_AlwaysClamp)) {
|
||||
ImGui::StyleScaleAllSizes(&ImGui::GetStyle(), scale);
|
||||
ImGui::GetIO().FontGlobalScale = scale;
|
||||
|
@ -17,7 +17,7 @@ namespace Menu {
|
||||
};
|
||||
|
||||
extern KeyBindOption menuToggle;
|
||||
extern float transparency;
|
||||
extern float opacity;
|
||||
extern float scale;
|
||||
|
||||
extern Option firstTimeRunning;
|
||||
|
Reference in New Issue
Block a user