add: SetSteamName, fix: menu stuff

This commit is contained in:
ALittlePatate
2022-10-02 14:51:52 +02:00
parent 6f8781c346
commit 41bd408edb
4 changed files with 26 additions and 7 deletions

View File

@@ -18,4 +18,7 @@ void OnUpdate() {
if (settings::unlimited_uv) {
Misc::UnlimitedUV(settings::unlimited_uv);
}
}
if (settings::steam_name_spoof) {
Misc::SetSteamName(settings::new_name);
}
}

View File

@@ -300,10 +300,10 @@ void DrawMiscTab() {
}
ImGui::Checkbox("Change Steam name", &settings::steam_name_spoof);
ImGui::InputText("New name", &settings::new_name);
ImGui::InputText("New name##steam", &settings::new_name);
ImGui::Checkbox("Change server name", &settings::server_name_spoof);
ImGui::InputText("New name", &settings::server_name);
ImGui::InputText("New name##server", &settings::server_name);
ImGui::Checkbox("Fly", &settings::fly);
@@ -324,10 +324,6 @@ void DrawMiscTab() {
if (ImGui::Button("Inspector")) {
inspector = !inspector;
}
if (inspector) {
DrawInspector();
}
#endif
ImGui::Spacing();
@@ -341,6 +337,12 @@ void DrawMenu(bool open_menu) {
ImGui::SetNextWindowSize(ImVec2(240.000f, 300.000f), ImGuiCond_Once);
ImGui::Begin("Devour Client", NULL, 2);
#if _DEBUG
if (inspector) {
DrawInspector();
}
#endif
ImGui::SameLine();
if (ImGui::Button("Visuals")) {//, ImVec2(0.000f, 0.000f))) {
current_tab = tabs::VISUALS;

View File

@@ -27,3 +27,16 @@ void Misc::UnlimitedUV(bool active) {
std::cout << "Unlimited UV error";
}
}
void Misc::SetSteamName(std::string name) {
Unity::CGameObject* MenuController = Unity::GameObject::Find("MenuController");
if (!MenuController) {
return;
}
Unity::CComponent* Menu = MenuController->GetComponent("Horror.Menu");
if (!Menu) {
return;
}
Menu->SetMemberValue<Unity::System_String*>("steamName", IL2CPP::String::New(name));
}

View File

@@ -9,4 +9,5 @@ namespace Misc {
void SetRank(int rank);
void WalkInlobby(bool walk);
void UnlimitedUV(bool active);
void SetSteamName(std::string name);
}