Skip to content

Commit 71a93e0

Browse files
authored
Merge pull request #121 from ByteCorum/WIP
Added speclist; Added logger; New offsets system; Bugfix
2 parents 617a43c + 609e6e4 commit 71a93e0

35 files changed

+569
-702
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

DragonBurn/Config/ConfigMenu.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,28 @@ namespace ConfigMenu {
3939
float ComponentWidth = ImGui::GetColumnWidth() - ImGui::GetStyle().ItemSpacing.x - CursorX * 2;
4040

4141
ImGui::SetCursorPos(ImVec2(15.f, 24.f));
42-
ImGui::SeparatorText(Lang::ConfigText.FeatureName);
42+
ImGui::SeparatorText(Text::Config::FeatureName.c_str());
4343

4444
ImGui::SetCursorPosX(CurrentCursorX + CursorX);
45-
ImGui::TextDisabled(Lang::ConfigText.MyConfigs);
45+
ImGui::TextDisabled(Text::Config::MyConfigs.c_str());
4646
ImGui::SetCursorPosX(CurrentCursorX + CursorX);
4747
ImGui::SetNextItemWidth(ComponentWidth);
4848
ImGui::ListBox("##ConfigFiles", &selectedConfig, configFilesCStr.data(), configFilesCStr.size());
4949
ImGui::SetCursorPosX(CurrentCursorX + CursorX);
50-
if (ImGui::Button(Lang::ConfigText.Load, { 120.f, 30.f }) && selectedConfig >= 0 && selectedConfig < configFiles.size())
50+
if (ImGui::Button(Text::Config::Load.c_str(), { 120.f, 30.f }) && selectedConfig >= 0 && selectedConfig < configFiles.size())
5151
{
5252
std::string selectedConfigFile = configFiles[selectedConfig];
5353
MyConfigSaver::LoadConfig(selectedConfigFile);
5454
}
5555
ImGui::SameLine();
56-
if (ImGui::Button(Lang::ConfigText.Save, { 120.f, 30.f }) && selectedConfig >= 0 && selectedConfig < configFiles.size())
56+
if (ImGui::Button(Text::Config::Save.c_str(), { 120.f, 30.f }) && selectedConfig >= 0 && selectedConfig < configFiles.size())
5757
{
5858
std::string selectedConfigFile = configFiles[selectedConfig];
5959
MyConfigSaver::SaveConfig(selectedConfigFile);
6060
}
6161

6262
ImGui::SetCursorPosX(CurrentCursorX + CursorX);
63-
if (ImGui::Button(Lang::ConfigText.Delete, { 120.f, 30.f }) && selectedConfig >= 0 && selectedConfig < configFiles.size())
63+
if (ImGui::Button(Text::Config::Delete.c_str(), { 120.f, 30.f }) && selectedConfig >= 0 && selectedConfig < configFiles.size())
6464
ImGui::OpenPopup("##reallyDelete");
6565
if (ImGui::BeginPopup("##reallyDelete"))
6666
{
@@ -85,7 +85,7 @@ namespace ConfigMenu {
8585
ImGui::EndPopup();
8686
}
8787
ImGui::SameLine();
88-
if (ImGui::Button(Lang::ConfigText.Reset, { 120.f, 30.f }))
88+
if (ImGui::Button(Text::Config::Reset.c_str(), { 120.f, 30.f }))
8989
ImGui::OpenPopup("##reallyReset");
9090
if (ImGui::BeginPopup("##reallyReset"))
9191
{
@@ -106,21 +106,21 @@ namespace ConfigMenu {
106106
ImGui::NextColumn();
107107
CurrentCursorX = ImGui::GetCursorPosX();
108108
ImGui::SetCursorPos(ImVec2(CurrentCursorX + CursorX, 24.f));
109-
ImGui::SeparatorText(Lang::ConfigText.SeparateLine);
110-
ImGui::TextDisabled(Lang::ConfigText.ConfigName);
109+
ImGui::SeparatorText(Text::Config::SeparateLine.c_str());
110+
ImGui::TextDisabled(Text::Config::ConfigName.c_str());
111111
ImGui::SetNextItemWidth(ComponentWidth + 8);
112112
ImGui::InputText("###ConfigNameInput", configNameBuffer, sizeof(configNameBuffer));
113-
ImGui::TextDisabled(Lang::ConfigText.AuthorName);
113+
ImGui::TextDisabled(Text::Config::AuthorName.c_str());
114114
ImGui::SetNextItemWidth(ComponentWidth + 8);
115115
ImGui::InputText("###AuthorNameInput", configAuthorBuffer, sizeof(configAuthorBuffer));
116116
ImGui::NewLine();
117-
if (ImGui::Button(Lang::ConfigText.Create, { 120.f, 30.f }))
117+
if (ImGui::Button(Text::Config::Create.c_str(), { 120.f, 30.f }))
118118
{
119119
std::string configFileName = std::string(configNameBuffer) + ".cfg";
120120
MyConfigSaver::SaveConfig(configFileName, std::string(configAuthorBuffer));
121121
}
122122
ImGui::SameLine();
123-
if (ImGui::Button(Lang::ConfigText.OpenFolder, { 120.f, 30.f }))
123+
if (ImGui::Button(Text::Config::OpenFolder.c_str(), { 120.f, 30.f }))
124124
{
125125
Gui.OpenWebpage(configDir.c_str());
126126
}

DragonBurn/Config/ConfigSaver.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ namespace MyConfigSaver
2222

2323
json ConfigData;
2424

25-
ConfigData["0"]["Name"] = "DragonBurn";
26-
ConfigData["0"]["Version"] = "1.0.5.2";
25+
ConfigData["0"]["Name"] = MenuConfig::name;
26+
ConfigData["0"]["Version"] = MenuConfig::version;
2727
ConfigData["0"]["Author"] = author;
2828

2929

DragonBurn/Config/MenuConfig.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
namespace MenuConfig
66
{
7-
inline std::string version = "1.0.5.2";
7+
inline std::string name = "DragonBurn";
8+
inline std::string version = "1.1.0.0";
89
inline std::string author = "ByteCorum";
910

1011
inline std::string path = "";

DragonBurn/Core/Cheats.cpp

+5-6
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void Visual(const CEntity&);
2626
void Radar(Base_Radar, const CEntity&);
2727
void Trigger(const CEntity&);
2828
void AIM(const CEntity&, std::vector<Vec3>);
29-
void MiscFuncs(const CEntity&);
29+
void MiscFuncs(CEntity&);
3030

3131
void Cheats::Run()
3232
{
@@ -224,16 +224,15 @@ void Visual(const CEntity& LocalEntity)
224224
// HeadShoot Line
225225
Render::HeadShootLine(LocalEntity, MiscCFG::HeadShootLineColor);
226226

227-
// CrossHair
228-
TriggerBot::TargetCheck(LocalEntity);
229227
Misc::AirCheck(LocalEntity);
228+
230229
RenderCrosshair(ImGui::GetBackgroundDrawList(), LocalEntity);
231230
}
232231

233232
void Radar(Base_Radar Radar, const CEntity& LocalEntity)
234233
{
235234
// Radar render
236-
if (RadarCFG::ShowRadar && LocalEntity.Controller.TeamID != 0)
235+
if ((RadarCFG::ShowRadar && LocalEntity.Controller.TeamID != 0) || (RadarCFG::ShowRadar && MenuConfig::ShowMenu))
237236
{
238237
Radar.Render();
239238
ImGui::End();
@@ -271,7 +270,7 @@ void AIM(const CEntity& LocalEntity, std::vector<Vec3> AimPosList)
271270
RCS::RecoilControl(LocalEntity);
272271
}
273272

274-
void MiscFuncs(const CEntity& LocalEntity)
273+
void MiscFuncs(CEntity& LocalEntity)
275274
{
276275
Misc::HitManager(LocalEntity, PreviousTotalHits);
277276
Misc::BunnyHop(LocalEntity);
@@ -323,7 +322,7 @@ void RenderCrosshair(ImDrawList* drawList, const CEntity& LocalEntity)
323322
bool isScoped;
324323
ProcessMgr.ReadMemory<bool>(LocalEntity.Pawn.Address + Offset.Pawn.isScoped, isScoped);
325324

326-
if (!MiscCFG::SniperCrosshair || LocalEntity.Controller.TeamID == 0 || !TriggerBot::CheckScopeWeapon(LocalEntity) || isScoped)
325+
if (!MiscCFG::SniperCrosshair || LocalEntity.Controller.TeamID == 0 || !TriggerBot::CheckScopeWeapon(LocalEntity) || isScoped || MenuConfig::ShowMenu)
327326
return;
328327

329328
Render::DrawCrossHair(drawList, ImVec2(ImGui::GetIO().DisplaySize.x / 2, ImGui::GetIO().DisplaySize.y / 2), MiscCFG::SniperCrosshairColor);

0 commit comments

Comments
 (0)