|
2 | 2 | #include "AntiInvisibleHacker.h" |
3 | 3 |
|
4 | 4 | #include "IMGUI/imgui_internal.h" |
| 5 | +#include <shellapi.h> //for ShellExecute |
5 | 6 |
|
6 | 7 | std::string AntiInvisibleHacker::GetPluginName() |
7 | 8 | { |
8 | | - return "AntiInvisibleHacker v1.1"; |
| 9 | + return "AntiInvisibleHacker v1.2"; |
9 | 10 | } |
10 | 11 |
|
11 | 12 | void AntiInvisibleHacker::SetImGuiContext(uintptr_t ctx) |
@@ -69,13 +70,60 @@ void AntiInvisibleHacker::RenderSettings() |
69 | 70 | ImGui::Separator(); |
70 | 71 |
|
71 | 72 | ImGui::Text("Important note :"); |
72 | | - ImGui::Text("This plugin will only work for the Rocket League version v2.51.\nSo I recommend you to remove the plugin from your plugins folder once Psyonix releases a new Rocket League update, as it might crash your game due to the changes\nPsyonix will make to the game."); |
| 73 | + RenderUnderLine(ImColor(255, 255, 252, 170)); |
| 74 | + ImGui::Text("This plugin will only work for the Rocket League version v2.52.\nSo I recommend you to remove the plugin from your plugins folder once Psyonix releases a new Rocket League update, as it might crash your game due to the changes\nPsyonix will make to the game."); |
73 | 75 | } |
74 | 76 | else |
75 | 77 | { |
76 | | - ImGui::Text("This plugin has been made to only work for the Rocket League version v2.51 and won't work for the current version you are playing on."); |
| 78 | + ImGui::Text("This plugin has been made to only work for the Rocket League version v2.52 and won't work for the current version you are playing on."); |
77 | 79 | ImGui::Text("I recommend you to remove the plugin from your plugins folder."); |
78 | 80 | } |
| 81 | + |
| 82 | + ImGui::NewLine(); |
| 83 | + ImGui::NewLine(); |
| 84 | + |
| 85 | + ImGui::Text("Plugin made by"); |
| 86 | + ImGui::SameLine(); |
| 87 | + RenderLink("https://x.com/Vync5"); |
| 88 | +} |
| 89 | + |
| 90 | +void AntiInvisibleHacker::RenderLink(std::string link) |
| 91 | +{ |
| 92 | + std::wstring w_LINK = s2ws(link); |
| 93 | + LPCWSTR L_LINK = w_LINK.c_str(); |
| 94 | + |
| 95 | + ImGui::TextColored(ImColor(3, 94, 252, 255), link.c_str()); |
| 96 | + RenderUnderLine(ImColor(3, 94, 252, 255)); |
| 97 | + if (ImGui::IsItemHovered()) |
| 98 | + { |
| 99 | + ImGui::SetMouseCursor(ImGuiMouseCursor_Hand); |
| 100 | + if (ImGui::IsMouseClicked(0)) |
| 101 | + { |
| 102 | + ShellExecute(0, 0, L_LINK, 0, 0, SW_SHOW); //open link in web browser |
| 103 | + } |
| 104 | + RenderUnderLine(ImGui::GetStyle().Colors[ImGuiCol_ButtonHovered]); |
| 105 | + } |
| 106 | +} |
| 107 | + |
| 108 | +//https://gist.github.com/dougbinks/ef0962ef6ebe2cadae76c4e9f0586c69 |
| 109 | +void AntiInvisibleHacker::RenderUnderLine(ImColor col_) |
| 110 | +{ |
| 111 | + ImVec2 min = ImGui::GetItemRectMin(); |
| 112 | + ImVec2 max = ImGui::GetItemRectMax(); |
| 113 | + min.y = max.y; |
| 114 | + ImGui::GetWindowDrawList()->AddLine(min, max, col_, 1.0f); |
| 115 | +} |
| 116 | + |
| 117 | +std::wstring AntiInvisibleHacker::s2ws(const std::string& s) |
| 118 | +{ |
| 119 | + int len; |
| 120 | + int slength = (int)s.length() + 1; |
| 121 | + len = MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, 0, 0); |
| 122 | + wchar_t* buf = new wchar_t[len]; |
| 123 | + MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, buf, len); |
| 124 | + std::wstring r(buf); |
| 125 | + delete[] buf; |
| 126 | + return r; |
79 | 127 | } |
80 | 128 |
|
81 | 129 | /* |
|
0 commit comments