Начинающий
-
Автор темы
- #1
How to fix menu
[CODE = cpp]
[CODE = cpp]
Код:
#include <array>
#include <cwctype>
#include <fstream>
#include <functional>
#include <string>
#ifdef _WIN32
#include <ShlObj.h>
#include <Windows.h>
#endif
#include "imgui / imgui.h"
#include "imgui / imgui_internal.h"
#include "imgui / imgui_impl_win32.h"
#include "imgui / imgui_stdlib.h"
#include "imguiCustom.h"
#include "GUI.h"
#include "Config.h"
#include "Hacks / Misc.h"
#include "Hacks / SkinChanger.h"
#include "Helpers.h"
#include "Hooks.h"
#include "Interfaces.h"
#include "SDK / InputSystem.h"
#include "Hacks / Visuals.h"
#define afkbutton (xbutton, xint1, xint2) if (xint1 == xint2) Style-> Colors [ImGuiCol_Text] = ImColor (180, 180, 180); else Style-> Colors [ImGuiCol_Text] = ImColor (255, 255, 255); if (xbutton) xint1 = xint2; Style-> Colors [ImGuiCol_Text] = ImColor (255, 255, 255);
constexpr auto windowFlags = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize
| ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse;
GUI :: GUI () noexcept
{
ImGui :: StyleColorsDark ();
ImGuiStyle & style = ImGui :: GetStyle ();
style.ScrollbarSize = 9.0f;
ImGuiIO & io = ImGui :: GetIO ();
io.IniFilename = nullptr;
io.LogFilename = nullptr;
io.ConfigFlags | = ImGuiConfigFlags_NoMouseCursorChange;
#ifdef _WIN32
if (PWSTR pathToFonts; SUCCEEDED (SHGetKnownFolderPath (FOLDERID_Fonts, 0, nullptr, & pathToFonts))) {
const std :: filesystem :: path path {pathToFonts};
CoTaskMemFree (pathToFonts);
ImFontConfig cfg;
cfg.OversampleV = 3;
fonts.tahoma = io.Fonts-> AddFontFromFileTTF ((path / "tahoma.ttf"). string (). c_str (), 15.0f, & cfg, Helpers :: getFontGlyphRanges ());
cfg.MergeMode = true;
static constexpr ImWchar symbol [] {
0x2605, 0x2605, // ★
0
};
io.Fonts-> AddFontFromFileTTF ((path / "seguisym.ttf"). string (). c_str (), 15.0f, & cfg, symbol);
cfg.MergeMode = false;
fonts.segoeui = io.Fonts-> AddFontFromFileTTF ((path / "segoeui.ttf"). string (). c_str (), 15.0f, & cfg, Helpers :: getFontGlyphRanges ());
}
#endif
}
void GUI :: render () noexcept
{
if (! config-> style.menuStyle) {
renderGuiStyle2 ();
renderAimbotWindow ();
renderTriggerbotWindow ();
renderChamsWindow ();
renderStreamProofESPWindow ();
renderVisualsWindow ();
renderSkinChangerWindow ();
renderSoundWindow ();
renderStyleWindow ();
renderMiscWindow ();
renderConfigWindow ();
}
else {
}
}
void GUI :: updateColors () const noexcept
{
switch (config-> style.menuColors) {
case 0: ImGui :: StyleColorsDark (); break;
}
}
#include "InputUtil.h"
static void hotkey2 (const char * label, KeyBind & key, float samelineOffset = 0.0f, const ImVec2 & size = {100.0f, 0.0f}) noexcept
{
const auto id = ImGui :: GetID (label);
ImGui :: PushID (label);
ImGui :: TextUnformatted (label);
ImGui :: SameLine (samelineOffset);
if (ImGui :: GetActiveID () == id) {
ImGui :: PushStyleColor (ImGuiCol_Button, ImGui :: GetColorU32 (ImGuiCol_ButtonActive));
ImGui :: Button ("...", size);
ImGui :: PopStyleColor ();
ImGui :: GetCurrentContext () -> ActiveIdAllowOverlap = true;
if ((! ImGui :: IsItemHovered () && ImGui :: GetIO (). MouseClicked [0]) || key.setToPressedKey ())
ImGui :: ClearActiveID ();
}
else if (ImGui :: Button (key.toString (), size)) {
ImGui :: SetActiveID (id, ImGui :: GetCurrentWindow ());
}
ImGui :: PopID ();
}
void GUI :: handleToggle () noexcept
{
if (config-> misc.menuKey.isPressed ()) {
open =! open;
if (! open)
interfaces-> inputSystem-> resetInputState ();
#ifndef _WIN32
ImGui :: GetIO (). MouseDrawCursor = gui-> open;
#endif
}
}
static void menuBarItem (const char * name, bool & enabled) noexcept
{
if (ImGui :: MenuItem (name)) {
enabled = true;
ImGui :: SetWindowFocus (name);
ImGui :: SetWindowPos (name, {100.0f, 100.0f});
}
}
void GUI :: renderMenuBar () noexcept
{
if (ImGui :: BeginMainMenuBar ()) {
menuBarItem ("Aimbot", window.aimbot);
menuBarItem ("Triggerbot", window.triggerbot);
menuBarItem ("Chams", window.chams);
menuBarItem ("ESP", window.streamProofESP);
menuBarItem ("Visuals", window.visuals);
menuBarItem ("Skin changer", window.skinChanger);
menuBarItem ("Sound", window.sound);
menuBarItem ("Style", window.style);
menuBarItem ("Misc", window.misc);
menuBarItem ("Config", window.config);
ImGui :: EndMainMenuBar ();
}
}
void GUI :: renderAimbotWindow (bool contentOnly) noexcept
{
if (! contentOnly) {
if (! window.aimbot)
return;
ImGui :: SetNextWindowSize ({600.0f, 0.0f});
ImGui :: Begin ("Aimbot", & window.aimbot, windowFlags);
}
ImGui :: Checkbox ("On key", & config-> aimbotOnKey);
ImGui :: SameLine ();
ImGui :: PushID ("Aimbot Key");
hotkey2 ("", config-> aimbotKey);
ImGui :: PopID ();
ImGui :: SameLine ();
ImGui :: PushID (2);
ImGui :: PushItemWidth (70.0f);
ImGui :: Combo ("", & config-> aimbotKeyMode, "Hold \ 0Toggle \ 0");
ImGui :: PopItemWidth ();
ImGui :: PopID ();
ImGui :: Separator ();
static int currentCategory {0};
ImGui :: PushItemWidth (110.0f);
ImGui :: PushID (0);
ImGui :: Combo ("", & currentCategory, "All \ 0Pistols \ 0Heavy \ 0SMG \ 0Rifles \ 0");
ImGui :: PopID ();
ImGui :: SameLine ();
static int currentWeapon {0};
ImGui :: PushID (1);
switch (currentCategory) {
case 0:
currentWeapon = 0;
ImGui :: NewLine ();
break;
case 1: {
static int currentPistol {0};
static constexpr const char * pistols [] {"All", "Glock-18", "P2000", "USP-S", "Dual Berettas", "P250", "Tec-9", "Five-Seven", "CZ-75", "Desert Eagle", "Revolver"};
ImGui :: Combo ("", & currentPistol, [] (void * data, int idx, const char ** out_text) {
if (config-> aimbot [idx? idx: 35] .enabled) {
static std :: string name;
name = pistols [idx];
* out_text = name.append ("*"). c_str ();
}
else {
* out_text = pistols [idx];
}
return true;
}, nullptr, IM_ARRAYSIZE (pistols));
currentWeapon = currentPistol? currentPistol: 35;
break;
}
case 2: {
static int currentHeavy {0};
static constexpr const char * heavies [] {"All", "Nova", "XM1014", "Sawed-off", "MAG-7", "M249", "Negev"};
ImGui :: Combo ("", & currentHeavy, [] (void * data, int idx, const char ** out_text) {
if (config-> aimbot [idx? idx + 10: 36] .enabled) {
static std :: string name;
name = heavies [idx];
* out_text = name.append ("*"). c_str ();
}
else {
* out_text = heavies [idx];
}
return true;
}, nullptr, IM_ARRAYSIZE (heavies));
currentWeapon = currentHeavy? currentHeavy + 10: 36;
break;
}
case 3: {
static int currentSmg {0};
static constexpr const char * smgs [] {"All", "Mac-10", "MP9", "MP7", "MP5-SD", "UMP-45", "P90", "PP-Bizon"};
ImGui :: Combo ("", & currentSmg, [] (void * data, int idx, const char ** out_text) {
if (config-> aimbot [idx? idx + 16: 37] .enabled) {
static std :: string name;
name = smgs [idx];
* out_text = name.append ("*"). c_str ();
}
else {
* out_text = smgs [idx];
}
return true;
}, nullptr, IM_ARRAYSIZE (smgs));
currentWeapon = currentSmg? currentSmg + 16: 37;
break;
}
case 4: {
static int currentRifle {0};
static constexpr const char * rifles [] {"All", "Galil AR", "Famas", "AK-47", "M4A4", "M4A1-S", "SSG-08", "SG-553", "AUG", "AWP", "G3SG1", "SCAR-20"};
ImGui :: Combo ("", & currentRifle, [] (void * data, int idx, const char ** out_text) {
if (config-> aimbot [idx? idx + 23: 38] .enabled) {
static std :: string name;
name = rifles [idx];
* out_text = name.append ("*"). c_str ();
}
else {
* out_text = rifles [idx];
}
return true;
}, nullptr, IM_ARRAYSIZE (rifles));
currentWeapon = currentRifle? currentRifle + 23: 38;
break;
}
}
ImGui :: PopID ();
ImGui :: SameLine ();
ImGui :: Checkbox ("Enabled", & config-> aimbot [currentWeapon] .enabled);
ImGui :: Columns (2, nullptr, false);
ImGui :: SetColumnOffset (1, 220.0f);
ImGui :: Checkbox ("Aimlock", & config-> aimbot [currentWeapon] .aimlock);
ImGui :: Checkbox ("Silent", & config-> aimbot [currentWeapon] .silent);
ImGui :: Checkbox ("Friendly fire", & config-> aimbot [currentWeapon] .friendlyFire);
ImGui :: Checkbox ("Visible only", & config-> aimbot [currentWeapon] .visibleOnly);
ImGui :: Checkbox ("Scoped only", & config-> aimbot [currentWeapon] .scopedOnly);
ImGui :: Checkbox ("Ignore flash", & config-> aimbot [currentWeapon] .ignoreFlash);
ImGui :: Checkbox ("Ignore smoke", & config-> aimbot [currentWeapon] .ignoreSmoke);
ImGui :: Checkbox ("Auto shot", & config-> aimbot [currentWeapon] .autoShot);
ImGui :: Checkbox ("Auto scope", & config-> aimbot [currentWeapon] .autoScope);
ImGui :: Combo ("Bone", & config-> aimbot [currentWeapon] .bone, "Nearest \ 0Best damage \ 0Head \ 0Neck \ 0Sternum \ 0Chest \ 0Stomach \ 0Pelvis \ 0");
ImGui :: NextColumn ();
ImGui :: PushItemWidth (240.0f);
ImGui :: SliderFloat ("Fov", & config-> aimbot [currentWeapon] .fov, 0.0f, 130.0f, "% .2f", ImGuiSliderFlags_Logarithmic);
ImGui :: SliderFloat ("Smooth", & config-> aimbot [currentWeapon] .smooth, 1.0f, 50.0f, "% .2f");
ImGui :: SliderFloat ("Max aim inaccuracy", & config-> aimbot [currentWeapon] .maxAimInaccuracy, 0.0f, 1.0f, "% .5f", ImGuiSliderFlags_Logarithmic);
ImGui :: SliderFloat ("Max shot inaccuracy", & config-> aimbot [currentWeapon] .maxShotInaccuracy, 0.0f, 1.0f, "% .5f", ImGuiSliderFlags_Logarithmic);
ImGui :: InputInt ("Min damage", & config-> aimbot [currentWeapon] .minDamage);
config-> aimbot [currentWeapon] .minDamage = std :: clamp (config-> aimbot [currentWeapon] .minDamage, 0, 250);
ImGui :: Checkbox ("Killshot", & config-> aimbot [currentWeapon] .killshot);
ImGui :: Checkbox ("Between shots", & config-> aimbot [currentWeapon] .betweenShots);
ImGui :: Columns (1);
if (! contentOnly)
ImGui :: End ();
}
void GUI :: renderTriggerbotWindow (bool contentOnly) noexcept
{
if (! contentOnly) {
if (! window.triggerbot)
return;
ImGui :: SetNextWindowSize ({0.0f, 0.0f});
ImGui :: Begin ("Triggerbot", & window.triggerbot, windowFlags);
}
static int currentCategory {0};
ImGui :: PushItemWidth (110.0f);
ImGui :: PushID (0);
ImGui :: Combo ("", & currentCategory, "All \ 0Pistols \ 0Heavy \ 0SMG \ 0Rifles \ 0Zeus x27 \ 0");
ImGui :: PopID ();
ImGui :: SameLine ();
static int currentWeapon {0};
ImGui :: PushID (1);
switch (currentCategory) {
case 0:
currentWeapon = 0;
ImGui :: NewLine ();
break;
case 5:
currentWeapon = 39;
ImGui :: NewLine ();
break;
case 1: {
static int currentPistol {0};
static constexpr const char * pistols [] {"All", "Glock-18", "P2000", "USP-S", "Dual Berettas", "P250", "Tec-9", "Five-Seven", "CZ-75", "Desert Eagle", "Revolver"};
ImGui :: Combo ("", & currentPistol, [] (void * data, int idx, const char ** out_text) {
if (config-> triggerbot [idx? idx: 35] .enabled) {
static std :: string name;
name = pistols [idx];
* out_text = name.append ("*"). c_str ();
}
else {
* out_text = pistols [idx];
}
return true;
}, nullptr, IM_ARRAYSIZE (pistols));
currentWeapon = currentPistol? currentPistol: 35;
break;
}
case 2: {
static int currentHeavy {0};
static constexpr const char * heavies [] {"All", "Nova", "XM1014", "Sawed-off", "MAG-7", "M249", "Negev"};
ImGui :: Combo ("", & currentHeavy, [] (void * data, int idx, const char ** out_text) {
if (config-> triggerbot [idx? idx + 10: 36] .enabled) {
static std :: string name;
name = heavies [idx];
* out_text = name.append ("*"). c_str ();
}
else {
* out_text = heavies [idx];
}
return true;
}, nullptr, IM_ARRAYSIZE (heavies));
currentWeapon = currentHeavy? currentHeavy + 10: 36;
break;
}
case 3: {
static int currentSmg {0};
static constexpr const char * smgs [] {"All", "Mac-10", "MP9", "MP7", "MP5-SD", "UMP-45", "P90", "PP-Bizon"};
ImGui :: Combo ("", & currentSmg, [] (void * data, int idx, const char ** out_text) {
if (config-> triggerbot [idx? idx + 16: 37] .enabled) {
static std :: string name;
name = smgs [idx];
* out_text = name.append ("*"). c_str ();
}
else {
* out_text = smgs [idx];
}
return true;
}, nullptr, IM_ARRAYSIZE (smgs));
currentWeapon = currentSmg? currentSmg + 16: 37;
break;
}
case 4: {
static int currentRifle {0};
static constexpr const char * rifles [] {"All", "Galil AR", "Famas", "AK-47", "M4A4", "M4A1-S", "SSG-08", "SG-553", "AUG", "AWP", "G3SG1", "SCAR-20"};
ImGui :: Combo ("", & currentRifle, [] (void * data, int idx, const char ** out_text) {
if (config-> triggerbot [idx? idx + 23: 38] .enabled) {
static std :: string name;
name = rifles [idx];
* out_text = name.append ("*"). c_str ();
}
else {
* out_text = rifles [idx];
}
return true;
}, nullptr, IM_ARRAYSIZE (rifles));
currentWeapon = currentRifle? currentRifle + 23: 38;
break;
}
}
ImGui :: PopID ();
ImGui :: SameLine ();
ImGui :: Checkbox ("Enabled", & config-> triggerbot [currentWeapon] .enabled);
ImGui :: Separator ();
hotkey2 ("Hold Key", config-> triggerbotHoldKey);
ImGui :: Checkbox ("Friendly fire", & config-> triggerbot [currentWeapon] .friendlyFire);
ImGui :: Checkbox ("Scoped only", & config-> triggerbot [currentWeapon] .scopedOnly);
ImGui :: Checkbox ("Ignore flash", & config-> triggerbot [currentWeapon] .ignoreFlash);
ImGui :: Checkbox ("Ignore smoke", & config-> triggerbot [currentWeapon] .ignoreSmoke);
ImGui :: SetNextItemWidth (85.0f);
ImGui :: Combo ("Hitgroup", & config-> triggerbot [currentWeapon] .hitgroup, "All \ 0Head \ 0Chest \ 0Stomach \ 0Left arm \ 0Right arm \ 0Left leg \ 0Right leg \ 0");
ImGui :: PushItemWidth (220.0f);
ImGui :: SliderInt ("Shot delay", & config-> triggerbot [currentWeapon] .shotDelay, 0, 250, "% d ms");
ImGui :: InputInt ("Min damage", & config-> triggerbot [currentWeapon] .minDamage);
config-> triggerbot [currentWeapon] .minDamage = std :: clamp (config-> triggerbot [currentWeapon] .minDamage, 0, 250);
ImGui :: Checkbox ("Killshot", & config-> triggerbot [currentWeapon] .killshot);
ImGui :: SliderFloat ("Burst Time", & config-> triggerbot [currentWeapon] .burstTime, 0.0f, 0.5f, "% .3f s");
if (! contentOnly)
ImGui :: End ();
}
void GUI :: renderChamsWindow (bool contentOnly) noexcept
{
if (! contentOnly) {
if (! window.chams)
return;
ImGui :: SetNextWindowSize ({0.0f, 0.0f});
ImGui :: Begin ("Chams", & window.chams, windowFlags);
}
static int currentCategory {0};
ImGui :: PushItemWidth (110.0f);
ImGui :: PushID (0);
static int material = 1;
if (ImGui :: Combo ("", & currentCategory, "Allies \ 0Enemies \ 0Planting \ 0Defusing \ 0Local player \ 0Weapons \ 0Hands \ 0Backtrack \ 0Sleeves \ 0"))
material = 1;
ImGui :: PopID ();
ImGui :: SameLine ();
if (material <= 1)
ImGuiCustom :: arrowButtonDisabled ("## left", ImGuiDir_Left);
else if (ImGui :: ArrowButton ("## left", ImGuiDir_Left))
--material;
ImGui :: SameLine ();
ImGui :: Text ("% d", material);
constexpr std :: array categories {"Allies", "Enemies", "Planting", "Defusing", "Local player", "Weapons", "Hands", "Backtrack", "Sleeves"};
ImGui :: SameLine ();
if (material> = int (config-> chams [categories [currentCategory]]. materials.size ()))
ImGuiCustom :: arrowButtonDisabled ("## right", ImGuiDir_Right);
else if (ImGui :: ArrowButton ("## right", ImGuiDir_Right))
++ material;
ImGui :: SameLine ();
auto & chams {config-> chams [categories [currentCategory]]. materials [material - 1]};
ImGui :: Checkbox ("Enabled", & chams.enabled);
ImGui :: Separator ();
ImGui :: Checkbox ("Health based", & chams.healthBased);
ImGui :: Checkbox ("Blinking", & chams.blinking);
ImGui :: Combo ("Material", & chams.material, "Normal \ 0Flat \ 0Animated \ 0Platinum \ 0Glass \ 0Chrome \ 0Crystal \ 0Silver \ 0Gold \ 0Plastic \ 0Glow \ 0Pearlescent \ 0Metallic \ 0");
ImGui :: Checkbox ("Wireframe", & chams.wireframe);
ImGui :: Checkbox ("Cover", & chams.cover);
ImGui :: Checkbox ("Ignore-Z", & chams.ignorez);
ImGuiCustom :: colorPicker ("Color", chams);
if (! contentOnly) {
ImGui :: End ();
}
}
void GUI :: renderStreamProofESPWindow (bool contentOnly) noexcept
{
if (! contentOnly) {
if (! window.streamProofESP)
return;
ImGui :: SetNextWindowSize ({0.0f, 0.0f});
ImGui :: Begin ("ESP", & window.streamProofESP, windowFlags);
}
hotkey2 ("Toggle Key", config-> streamProofESP.toggleKey, 80.0f);
hotkey2 ("Hold Key", config-> streamProofESP.holdKey, 80.0f);
ImGui :: Separator ();
static std :: size_t currentCategory;
static auto currentItem = "All";
constexpr auto getConfigShared = [] (std :: size_t category, const char * item) noexcept -> Shared & {
switch (category) {
case 0: default: return config-> streamProofESP.enemies [item];
case 1: return config-> streamProofESP.allies [item];
case 2: return config-> streamProofESP.weapons [item];
case 3: return config-> streamProofESP.projectiles [item];
case 4: return config-> streamProofESP.lootCrates [item];
case 5: return config-> streamProofESP.otherEntities [item];
}
};
constexpr auto getConfigPlayer = [] (std :: size_t category, const char * item) noexcept -> Player & {
switch (category) {
case 0: default: return config-> streamProofESP.enemies [item];
case 1: return config-> streamProofESP.allies [item];
}
};
if (ImGui :: ListBoxHeader ("## list", {170.0f, 300.0f})) {
constexpr std :: array categories {"Enemies", "Allies", "Weapons", "Projectiles", "Loot Crates", "Other Entities"};
for (std :: size_t i = 0; i <categories.size (); ++ i) {
if (ImGui :: Selectable (categories , currentCategory == i && std :: string_view {currentItem} == "All")) {
currentCategory = i;
currentItem = "All";
}
if (ImGui :: BeginDragDropSource ()) {
switch (i) {
case 0: case 1: ImGui :: SetDragDropPayload ("Player", & getConfigPlayer (i, "All"), sizeof (Player), ImGuiCond_Once); break;
case 2: ImGui :: SetDragDropPayload ("Weapon", & config-> streamProofESP.weapons ["All"], sizeof (Weapon), ImGuiCond_Once); break;
case 3: ImGui :: SetDragDropPayload ("Projectile", & config-> streamProofESP.projectiles ["All"], sizeof (Projectile), ImGuiCond_Once); break;
default: ImGui :: SetDragDropPayload ("Entity", & getConfigShared (i, "All"), sizeof (Shared), ImGuiCond_Once); break;
}
ImGui :: EndDragDropSource ();
}
if (ImGui :: BeginDragDropTarget ()) {
if (const ImGuiPayload * payload = ImGui :: AcceptDragDropPayload ("Player")) {
const auto & data = * (Player *) payload-> Data;
switch (i) {
case 0: case 1: getConfigPlayer (i, "All") = data; break;
case 2: config-> streamProofESP.weapons ["All"] = data; break;
case 3: config-> streamProofESP.projectiles ["All"] = data; break;
default: getConfigShared (i, "All") = data; break;
}
}
if (const ImGuiPayload * payload = ImGui :: AcceptDragDropPayload ("Weapon")) {
const auto & data = * (Weapon *) payload-> Data;
switch (i) {
case 0: case 1: getConfigPlayer (i, "All") = data; break;
case 2: config-> streamProofESP.weapons ["All"] = data; break;
case 3: config-> streamProofESP.projectiles ["All"] = data; break;
default: getConfigShared (i, "All") = data; break;
}
}
if (const ImGuiPayload * payload = ImGui :: AcceptDragDropPayload ("Projectile")) {
const auto & data = * (Projectile *) payload-> Data;
switch (i) {
case 0: case 1: getConfigPlayer (i, "All") = data; break;
case 2: config-> streamProofESP.weapons ["All"] = data; break;
case 3: config-> streamProofESP.projectiles ["All"] = data; break;
default: getConfigShared (i, "All") = data; break;
}
}
if (const ImGuiPayload * payload = ImGui :: AcceptDragDropPayload ("Entity")) {
const auto & data = * (Shared *) payload-> Data;
switch (i) {
case 0: case 1: getConfigPlayer (i, "All") = data; break;
case 2: config-> streamProofESP.weapons ["All"] = data; break;
case 3: config-> streamProofESP.projectiles ["All"] = data; break;
default: getConfigShared (i, "All") = data; break;
}
}
ImGui :: EndDragDropTarget ();
}
ImGui :: PushID (i);
ImGui :: Indent ();
const auto items = [] (std :: size_t category) noexcept -> std :: vector <const char *> {
switch (category) {
case 0:
case 1: return {"Visible", "Occluded"};
case 2: return {"Pistols", "SMGs", "Rifles", "Sniper Rifles", "Shotguns", "Machineguns", "Grenades", "Melee", "Other"};
case 3: return {"Flashbang", "HE Grenade", "Breach Charge", "Bump Mine", "Decoy Grenade", "Molotov", "TA Grenade", "Smoke Grenade", "Snowball"};
case 4: return {"Pistol Case", "Light Case", "Heavy Case", "Explosive Case", "Tools Case", "Cash Dufflebag"};
case 5: return {"Defuse Kit", "Chicken", "Planted C4", "Hostage", "Sentry", "Cash", "Ammo Box", "Radar Jammer", "Snowball Pile", "Collectable Coin" };
default: return {};
}
} (i);
const auto categoryEnabled = getConfigShared (i, "All"). enabled;
for (std :: size_t j = 0; j <items.size (); ++ j) {
static bool selectedSubItem;
if (! categoryEnabled || getConfigShared (i, items [j]). enabled) {
if (ImGui :: Selectable (items [j], currentCategory == i &&! selectedSubItem && std :: string_view {currentItem} == items [j])) {
currentCategory = i;
currentItem = items [j];
selectedSubItem = false;
}
if (ImGui :: BeginDragDropSource ()) {
switch (i) {
case 0: case 1: ImGui :: SetDragDropPayload ("Player", & getConfigPlayer (i, items [j]), sizeof (Player), ImGuiCond_Once); break;
case 2: ImGui :: SetDragDropPayload ("Weapon", & config-> streamProofESP.weapons [items [j]], sizeof (Weapon), ImGuiCond_Once); break;
case 3: ImGui :: SetDragDropPayload ("Projectile", & config-> streamProofESP.projectiles [items [j]], sizeof (Projectile), ImGuiCond_Once); break;
default: ImGui :: SetDragDropPayload ("Entity", & getConfigShared (i, items [j]), sizeof (Shared), ImGuiCond_Once); break;
}
ImGui :: EndDragDropSource ();
}
if (ImGui :: BeginDragDropTarget ()) {
if (const ImGuiPayload * payload = ImGui :: AcceptDragDropPayload ("Player")) {
const auto & data = * (Player *) payload-> Data;
switch (i) {
case 0: case 1: getConfigPlayer (i, items [j]) = data; break;
case 2: config-> streamProofESP.weapons [items [j]] = data; break;
case 3: config-> streamProofESP.projectiles [items [j]] = data; break;
default: getConfigShared (i, items [j]) = data; break;
}
}
if (const ImGuiPayload * payload = ImGui :: AcceptDragDropPayload ("Weapon")) {
const auto & data = * (Weapon *) payload-> Data;
switch (i) {
case 0: case 1: getConfigPlayer (i, items [j]) = data; break;
case 2: config-> streamProofESP.weapons [items [j]] = data; break;
case 3: config-> streamProofESP.projectiles [items [j]] = data; break;
default: getConfigShared (i, items [j]) = data; break;
}
}
if (const ImGuiPayload * payload = ImGui :: AcceptDragDropPayload ("Projectile")) {
const auto & data = * (Projectile *) payload-> Data;
switch (i) {
case 0: case 1: getConfigPlayer (i, items [j]) = data; break;
case 2: config-> streamProofESP.weapons [items [j]] = data; break;
case 3: config-> streamProofESP.projectiles [items [j]] = data; break;
default: getConfigShared (i, items [j]) = data; break;
}
}
if (const ImGuiPayload * payload = ImGui :: AcceptDragDropPayload ("Entity")) {
const auto & data = * (Shared *) payload-> Data;
switch (i) {
case 0: case 1: getConfigPlayer (i, items [j]) = data; break;
case 2: config-> streamProofESP.weapons [items [j]] = data; break;
case 3: config-> streamProofESP.projectiles [items [j]] = data; break;
default: getConfigShared (i, items [j]) = data; break;
}
}
ImGui :: EndDragDropTarget ();
}
}
if (i! = 2)
continue;
ImGui :: Indent ();
const auto subItems = [] (std :: size_t item) noexcept -> std :: vector <const char *> {
switch (item) {
case 0: return {"Glock-18", "P2000", "USP-S", "Dual Berettas", "P250", "Tec-9", "Five-SeveN", "CZ75-Auto", "Desert Eagle "," R8 Revolver "};
case 1: return {"MAC-10", "MP9", "MP7", "MP5-SD", "UMP-45", "P90", "PP-Bizon"};
case 2: return {"Galil AR", "FAMAS", "AK-47", "M4A4", "M4A1-S", "SG 553", "AUG"};
case 3: return {"SSG 08", "AWP", "G3SG1", "SCAR-20"};
case 4: return {"Nova", "XM1014", "Sawed-Off", "MAG-7"};
case 5: return {"M249", "Negev"};
case 6: return {"Flashbang", "HE Grenade", "Smoke Grenade", "Molotov", "Decoy Grenade", "Incendiary", "TA Grenade", "Fire Bomb", "Diversion", "Frag Grenade" , "Snowball"};
case 7: return {"Ax", "Hammer", "Wrench"};
case 8: return {"C4", "Healthshot", "Bump Mine", "Zone Repulsor", "Shield"};
default: return {};
}
} (j);
const auto itemEnabled = getConfigShared (i, items [j]). enabled;
for (const auto subItem: subItems) {
auto & subItemConfig = config-> streamProofESP.weapons [subItem];
if ((categoryEnabled || itemEnabled) &&! subItemConfig.enabled)
continue;
if (ImGui :: Selectable (subItem, currentCategory == i && selectedSubItem && std :: string_view {currentItem} == subItem)) {
currentCategory = i;
currentItem = subItem;
selectedSubItem = true;
}
if (ImGui :: BeginDragDropSource ()) {
ImGui :: SetDragDropPayload ("Weapon", & subItemConfig, sizeof (Weapon), ImGuiCond_Once);
ImGui :: EndDragDropSource ();
}
if (ImGui :: BeginDragDropTarget ()) {
if (const ImGuiPayload * payload = ImGui :: AcceptDragDropPayload ("Player")) {
const auto & data = * (Player *) payload-> Data;
subItemConfig = data;
}
if (const ImGuiPayload * payload = ImGui :: AcceptDragDropPayload ("Weapon")) {
const auto & data = * (Weapon *) payload-> Data;
subItemConfig = data;
}
if (const ImGuiPayload * payload = ImGui :: AcceptDragDropPayload ("Projectile")) {
const auto & data = * (Projectile *) payload-> Data;
subItemConfig = data;
}
if (const ImGuiPayload * payload = ImGui :: AcceptDragDropPayload ("Entity")) {
const auto & data = * (Shared *) payload-> Data;
subItemConfig = data;
}
ImGui :: EndDragDropTarget ();
}
}
ImGui :: Unindent ();
}
ImGui :: Unindent ();
ImGui :: PopID ();
}
ImGui :: ListBoxFooter ();
}
ImGui :: SameLine ();
if (ImGui :: BeginChild ("## child", {400.0f, 0.0f})) {
auto & sharedConfig = getConfigShared (currentCategory, currentItem);
ImGui :: Checkbox ("Enabled", & sharedConfig.enabled);
ImGui :: SameLine (ImGui :: GetWindowContentRegionMax (). X - 260.0f);
ImGui :: SetNextItemWidth (220.0f);
if (ImGui :: BeginCombo ("Font", config-> getSystemFonts () [sharedConfig.font.index] .c_str ())) {
for (size_t i = 0; i <config-> getSystemFonts (). size (); i ++) {
bool isSelected = config-> getSystemFonts () == sharedConfig.font.name;
if (ImGui :: Selectable (config-> getSystemFonts () .c_str (), isSelected, 0, {250.0f, 0.0f})) {
sharedConfig.font.index = i;
sharedConfig.font.name = config-> getSystemFonts () ;
config-> scheduleFontLoad (sharedConfig.font.name);
}
if (isSelected)
ImGui :: SetItemDefaultFocus ();
}
ImGui :: EndCombo ();
}
ImGui :: Separator ();
constexpr auto spacing = 250.0f;
ImGuiCustom :: colorPicker ("Snapline", sharedConfig.snapline);
ImGui :: SameLine ();
ImGui :: SetNextItemWidth (90.0f);
ImGui :: Combo ("## 1", & sharedConfig.snapline.type, "Bottom \ 0Top \ 0Crosshair \ 0");
ImGui :: SameLine (spacing);
ImGuiCustom :: colorPicker ("Box", sharedConfig.box);
ImGui :: SameLine ();
ImGui :: PushID ("Box");
if (ImGui :: Button ("..."))
ImGui :: OpenPopup ("");
if (ImGui :: BeginPopup ("")) {
ImGui :: SetNextItemWidth (95.0f);
ImGui :: Combo ("Type", & sharedConfig.box.type, "2D \ 0" "2D corners \ 0" "3D \ 0" "3D corners \ 0");
ImGui :: SetNextItemWidth (275.0f);
ImGui :: SliderFloat3 ("Scale", sharedConfig.box.scale.data (), 0.0f, 0.50f, "% .2f");
ImGuiCustom :: colorPicker ("Fill", sharedConfig.box.fill);
ImGui :: EndPopup ();
}
ImGui :: PopID ();
ImGuiCustom :: colorPicker ("Name", sharedConfig.name);
ImGui :: SameLine (spacing);
if (currentCategory <2) {
auto & playerConfig = getConfigPlayer (currentCategory, currentItem);
ImGuiCustom :: colorPicker ("Weapon", playerConfig.weapon);
ImGuiCustom :: colorPicker ("Flash Duration", playerConfig.flashDuration);
ImGui :: SameLine (spacing);
ImGuiCustom :: colorPicker ("Skeleton", playerConfig.skeleton);
ImGui :: Checkbox ("Audible Only", & playerConfig.audibleOnly);
ImGui :: SameLine (spacing);
ImGui :: Checkbox ("Spotted Only", & playerConfig.spottedOnly);
ImGuiCustom :: colorPicker ("Head Box", playerConfig.headBox);
ImGui :: SameLine ();
ImGui :: PushID ("Head Box");
if (ImGui :: Button ("..."))
ImGui :: OpenPopup ("");
if (ImGui :: BeginPopup ("")) {
ImGui :: SetNextItemWidth (95.0f);
ImGui :: Combo ("Type", & playerConfig.headBox.type, "2D \ 0" "2D corners \ 0" "3D \ 0" "3D corners \ 0");
ImGui :: SetNextItemWidth (275.0f);
ImGui :: SliderFloat3 ("Scale", playerConfig.headBox.scale.data (), 0.0f, 0.50f, "% .2f");
ImGuiCustom :: colorPicker ("Fill", playerConfig.headBox.fill);
ImGui :: EndPopup ();
}
ImGui :: PopID ();
ImGui :: SameLine (spacing);
ImGui :: Checkbox ("Health Bar", & playerConfig.healthBar);
}
else if (currentCategory == 2) {
auto & weaponConfig = config-> streamProofESP.weapons [currentItem];
ImGuiCustom :: colorPicker ("Ammo", weaponConfig.ammo);
}
else if (currentCategory == 3) {
auto & trails = config-> streamProofESP.projectiles [currentItem] .trails;
ImGui :: Checkbox ("Trails", & trails.enabled);
ImGui :: SameLine (spacing + 77.0f);
ImGui :: PushID ("Trails");
if (ImGui :: Button ("..."))
ImGui :: OpenPopup ("");
if (ImGui :: BeginPopup ("")) {
constexpr auto trailPicker = [] (const char * name, Trail & trail) noexcept {
ImGui :: PushID (name);
ImGuiCustom :: colorPicker (name, trail);
ImGui :: SameLine (150.0f);
ImGui :: SetNextItemWidth (95.0f);
ImGui :: Combo ("", & trail.type, "Line \ 0Circles \ 0Filled Circles \ 0");
ImGui :: SameLine ();
ImGui :: SetNextItemWidth (95.0f);
ImGui :: InputFloat ("Time", & trail.time, 0.1f, 0.5f, "% .1fs");
trail.time = std :: clamp (trail.time, 1.0f, 60.0f);
ImGui :: PopID ();
};
trailPicker ("Local Player", trails.localPlayer);
trailPicker ("Allies", trails.allies);
trailPicker ("Enemies", trails.enemies);
ImGui :: EndPopup ();
}
ImGui :: PopID ();
}
ImGui :: SetNextItemWidth (95.0f);
ImGui :: InputFloat ("Text Cull Distance", & sharedConfig.textCullDistance, 0.4f, 0.8f, "% .1fm");
sharedConfig.textCullDistance = std :: clamp (sharedConfig.textCullDistance, 0.0f, 999.9f);
}
ImGui :: EndChild ();
if (! contentOnly)
ImGui :: End ();
}
void GUI :: renderVisualsWindow (bool contentOnly) noexcept
{
if (! contentOnly) {
if (! window.visuals)
return;
ImGui :: SetNextWindowSize ({680.0f, 0.0f});
ImGui :: Begin ("Visuals", & window.visuals, windowFlags);
}
ImGui :: Columns (2, nullptr, false);
ImGui :: SetColumnOffset (1, 280.0f);
Shahmat | Elite Crew \ 0Enforcer | Phoenix \ 0Slingshot | Phoenix \ 0Soldier | Phoenix \ 0Pirate \ 0Pirate Variant A \ 0Pirate Variant B \ 0Pirate Variant C \ 0Pirate Variant D \ 0Anarchist \ 0Anarchist Variant A \ 0Anarchist Variant B \ 0Anarchist Variant C \ 0Anarchist Variant C \ 0Anarchist Variant Variant C \ 0Anarchist Variant C \ 0Anarchist Variant B 0Balkan Variant D \ 0Balkan Variant E \ 0Jumpsuit Variant A \ 0Jumpsuit Variant B \ 0Jumpsuit Variant C \ 0Street Soldier | Phoenix \ 0'Blueberries' Buckshot | NSWC SEAL \ 0'Two Times' McCoy | TACP Cavalry \ 0Rezan the Redshirt | Saber \ 0Dragomir | Saber Footsoldier \ 0Cmdr. Mae 'Dead Cold' Jamison | SWAT \ 0 1st Lieutenant Farlow | SWAT \ 0John 'Van Healen' Kask | SWAT \ 0Bio-Haz Specialist | SWAT \ 0Sergeant Bombson | SWAT \ 0Chem-Haz Specialist | SWAT \ 0Sir Bloody Miami Darryl | The Professionals \ 0Sir Bloody Silent Darryl | The Professionals \ 0Sir Bloody Skullhead Darryl | The Professionals \ 0Sir Bloody Darryl Royale | The Professionals \ 0Sir Bloody Loudmouth Darryl | The Professionals \ 0Safecracker Voltzmann | The Professionals \ 0Little Kev | The Professionals \ 0Number K | The Professionals \ 0Getaway Sally | The Professionals \ 0 ";
ImGui :: Combo ("T Player Model", & config-> visuals.playerModelT, playerModels);
ImGui :: Combo ("CT Player Model", & config-> visuals.playerModelCT, playerModels);
ImGui :: Checkbox ("Disable post-processing", & config-> visuals.disablePostProcessing);
ImGui :: Checkbox ("No fog", & config-> visuals.noFog);
ImGui :: Checkbox ("No 3d sky", & config-> visuals.no3dSky);
ImGui :: Checkbox ("No smoke", & config-> visuals.noSmoke);
ImGui :: Checkbox ("No blur", & config-> visuals.noBlur);
ImGui :: Checkbox ("No scope overlay", & config-> visuals.noScopeOverlay);
ImGui :: Checkbox ("No shadows", & config-> visuals.noShadows);
ImGui :: Checkbox ("Wireframe smoke", & config-> visuals.wireframeSmoke);
ImGui :: NextColumn ();
ImGui :: PopID ();
ImGui :: PushItemWidth (290.0f);
ImGui :: PushID (1);
ImGui :: SliderInt ("", & config-> visuals.viewmodelFov, -60, 60, "Viewmodel FOV:% d");
ImGui :: PopID ();
ImGui :: PushID (2);
ImGui :: SliderInt ("", & config-> visuals.fov, -60, 0, "FOV:% d");
ImGui :: PopID ();
ImGui :: PushID (3);
ImGui :: SliderInt ("", & config-> visuals.farZ, 0, 2000, "Far Z:% d");
ImGui :: PopID ();
ImGui :: PushID (4);
ImGui :: SliderInt ("", & config-> visuals.flashReduction, 0, 100, "Flash reduction:% d %%");
ImGui :: PopID ();
ImGui :: PushID (5);
ImGui :: SliderFloat ("", & config-> visuals.brightness, 0.0f, 1.0f, "Brightness:% .2f");
ImGui :: PopID ();
ImGui :: PopItemWidth ();
ImGui :: Combo ("Skybox", & config-> visuals.skybox, Visuals :: skyboxList.data (), Visuals :: skyboxList.size ());
ImGuiCustom :: colorPicker ("World color", config-> visuals.world);
ImGuiCustom :: colorPicker ("Sky color", config-> visuals.sky);
ImGui :: Checkbox ("Deagle spinner", & config-> visuals.deagleSpinner);
ImGui :: Combo ("Hit marker", & config-> visuals.hitMarker, "None \ 0Default (Cross) \ 0");
ImGui :: SliderFloat ("Hit marker time", & config-> visuals.hitMarkerTime, 0.1f, 1.5f, "% .2fs");
ImGui :: Checkbox ("Color correction", & config-> visuals.colorCorrection.enabled);
ImGui :: SameLine ();
bool ccPopup = ImGui :: Button ("Edit");
if (ccPopup)
ImGui :: OpenPopup ("## popup");
if (ImGui :: BeginPopup ("## popup")) {
ImGui :: VSliderFloat ("## 1", {40.0f, 160.0f}, & config-> visuals.colorCorrection.blue, 0.0f, 1.0f, "Blue \ n% .3f"); ImGui :: SameLine ();
ImGui :: VSliderFloat ("## 2", {40.0f, 160.0f}, & config-> visuals.colorCorrection.red, 0.0f, 1.0f, "Red \ n% .3f"); ImGui :: SameLine ();
ImGui :: VSliderFloat ("## 3", {40.0f, 160.0f}, & config-> visuals.colorCorrection.mono, 0.0f, 1.0f, "Mono \ n% .3f"); ImGui :: SameLine ();
ImGui :: VSliderFloat ("## 4", {40.0f, 160.0f}, & config-> visuals.colorCorrection.saturation, 0.0f, 1.0f, "Sat \ n% .3f"); ImGui :: SameLine ();
ImGui :: VSliderFloat ("## 5", {40.0f, 160.0f}, & config-> visuals.colorCorrection.ghost, 0.0f, 1.0f, "Ghost \ n% .3f"); ImGui :: SameLine ();
ImGui :: VSliderFloat ("## 6", {40.0f, 160.0f}, & config-> visuals.colorCorrection.green, 0.0f, 1.0f, "Green \ n% .3f"); ImGui :: SameLine ();
ImGui :: VSliderFloat ("## 7", {40.0f, 160.0f}, & config-> visuals.colorCorrection.yellow, 0.0f, 1.0f, "Yellow \ n% .3f"); ImGui :: SameLine ();
ImGui :: EndPopup ();
}
ImGui :: Columns (1);
if (! contentOnly)
ImGui :: End ();
}
void GUI :: renderSkinChangerWindow (bool contentOnly) noexcept
{
if (! contentOnly) {
if (! window.skinChanger)
return;
ImGui :: SetNextWindowSize ({700.0f, 0.0f});
if (! ImGui :: Begin ("Skin changer", & window.skinChanger, windowFlags)) {
ImGui :: End ();
return;
}
}
static auto itemIndex = 0;
ImGui :: PushItemWidth (110.0f);
ImGui :: Combo ("## 1", & itemIndex, [] (void * data, int idx, const char ** out_text) {
* out_text = SkinChanger :: weapon_names [idx] .name;
return true;
}, nullptr, SkinChanger :: weapon_names.size (), 5);
ImGui :: PopItemWidth ();
auto & selected_entry = config-> skinChanger [itemIndex];
selected_entry.itemIdIndex = itemIndex;
constexpr auto rarityColor = [] (int rarity) {
constexpr auto rarityColors = std :: to_array <ImU32> ({
IM_COL32 (0, 0, 0, 0),
IM_COL32 (176, 195, 217, 255),
IM_COL32 (94, 152, 217, 255),
IM_COL32 (75, 105, 255, 255),
IM_COL32 (136, 71, 255, 255),
IM_COL32 (211, 44, 230, 255),
IM_COL32 (235, 75, 75, 255),
IM_COL32 (228, 174, 57, 255)
});
return rarityColors [static_cast <std :: size_t> (rarity) <rarityColors.size ()? rarity: 0];
};
constexpr auto passesFilter = [] (const std :: wstring & str, std :: wstring filter) {
constexpr auto delimiter = L "";
wchar_t * _;
wchar_t * token = std :: wcstok (filter.data (), delimiter, & _);
while (token) {
if (! std :: wcsstr (str.c_str (), token))
return false;
token = std :: wcstok (nullptr, delimiter, & _);
}
return true;
};
{
ImGui :: SameLine ();
ImGui :: Checkbox ("Enabled", & selected_entry.enabled);
ImGui :: Separator ();
ImGui :: Columns (2, nullptr, false);
ImGui :: InputInt ("Seed", & selected_entry.seed);
ImGui :: InputInt ("StatTrak \ u2122", & selected_entry.stat_trak);
selected_entry.stat_trak = (std :: max) (selected_entry.stat_trak, -1);
ImGui :: SliderFloat ("Wear", & selected_entry.wear, FLT_MIN, 1.f, "% .10f", ImGuiSliderFlags_Logarithmic);
const auto & kits = itemIndex == 1? SkinChanger :: getGloveKits (): SkinChanger :: getSkinKits ();
if (ImGui :: BeginCombo ("Paint Kit", kits [selected_entry.paint_kit_vector_index] .name.c_str ())) {
ImGui :: PushID ("Paint Kit");
ImGui :: PushID ("Search");
ImGui :: SetNextItemWidth (-1.0f);
static std :: array <std :: string, SkinChanger :: weapon_names.size ()> filters;
auto & filter = filters [itemIndex];
ImGui :: InputTextWithHint ("", "Search", & filter);
if (ImGui :: IsItemHovered () || (ImGui :: IsWindowFocused (ImGuiFocusedFlags_RootAndChildWindows) &&! ImGui :: IsAnyItemActive () &&! ImGui :: IsMouseClicked (0)))
ImGui :: SetKeyboardFocusHere (-1);
ImGui :: PopID ();
const std :: wstring filterWide = Helpers :: toUpper (Helpers :: toWideString (filter));
if (ImGui :: BeginChild ("## scrollarea", {0, 6 * ImGui :: GetTextLineHeightWithSpacing ()})) {
for (std :: size_t i = 0; i <kits.size (); ++ i) {
if (filter.empty () || passesFilter (kits .nameUpperCase, filterWide)) {
ImGui :: PushID (i);
const auto selected = i == selected_entry.paint_kit_vector_index;
if (ImGui :: SelectableWithBullet (kits .name.c_str (), rarityColor (kits .rarity), selected)) {
selected_entry.paint_kit_vector_index = i;
ImGui :: CloseCurrentPopup ();
}
if (selected && ImGui :: IsWindowAppearing ())
ImGui :: SetScrollHereY ();
ImGui :: PopID ();
}
}
ImGui :: EndChild ();
}
ImGui :: PopID ();
ImGui :: EndCombo ();
}
ImGui :: Combo ("Quality", & selected_entry.entity_quality_vector_index, [] (void * data, int idx, const char ** out_text) {
* out_text = SkinChanger :: getQualities () [idx] .name.c_str (); // safe within this lamba
return true;
}, nullptr, SkinChanger :: getQualities (). size (), 5);
if (itemIndex == 0) {
ImGui :: Combo ("Knife", & selected_entry.definition_override_vector_index, [] (void * data, int idx, const char ** out_text) {
* out_text = SkinChanger :: getKnifeTypes () [idx] .name.c_str ();
return true;
}, nullptr, SkinChanger :: getKnifeTypes (). size (), 5);
}
else if (itemIndex == 1) {
ImGui :: Combo ("Glove", & selected_entry.definition_override_vector_index, [] (void * data, int idx, const char ** out_text) {
* out_text = SkinChanger :: getGloveTypes () [idx] .name.c_str ();
return true;
}, nullptr, SkinChanger :: getGloveTypes (). size (), 5);
}
else {
static auto unused_value = 0;
selected_entry.definition_override_vector_index = 0;
ImGui :: Combo ("Unavailable", & unused_value, "For knives or gloves \ 0");
}
ImGui :: InputText ("Name Tag", selected_entry.custom_name, 32);
}
ImGui :: NextColumn ();
{
ImGui :: PushID ("sticker");
static std :: size_t selectedStickerSlot = 0;
ImGui :: PushItemWidth (-1);
if (ImGui :: ListBoxHeader ("", 5)) {
for (int i = 0; i <5; ++ i) {
ImGui :: PushID (i);
const auto kit_vector_index = config-> skinChanger [itemIndex] .stickers .kit_vector_index;
const std :: string text = '#' + std :: to_string (i + 1) + "" + SkinChanger :: getStickerKits () [kit_vector_index] .name;
if (ImGui :: Selectable (text.c_str (), i == selectedStickerSlot))
selectedStickerSlot = i;
ImGui :: PopID ();
}
ImGui :: ListBoxFooter ();
}
ImGui :: PopItemWidth ();
auto & selected_sticker = selected_entry.stickers [selectedStickerSlot];
const auto & kits = SkinChanger :: getStickerKits ();
if (ImGui :: BeginCombo ("Sticker", kits [selected_sticker.kit_vector_index] .name.c_str ())) {
ImGui :: PushID ("Sticker");
ImGui :: PushID ("Search");
ImGui :: SetNextItemWidth (-1.0f);
static std :: array <std :: string, SkinChanger :: weapon_names.size ()> filters;
auto & filter = filters [itemIndex];
ImGui :: InputTextWithHint ("", "Search", & filter);
if (ImGui :: IsItemHovered () || (ImGui :: IsWindowFocused (ImGuiFocusedFlags_RootAndChildWindows) &&! ImGui :: IsAnyItemActive () &&! ImGui :: IsMouseClicked (0)))
ImGui :: SetKeyboardFocusHere (-1);
ImGui :: PopID ();
const std :: wstring filterWide = Helpers :: toUpper (Helpers :: toWideString (filter));
if (ImGui :: BeginChild ("## scrollarea", {0, 6 * ImGui :: GetTextLineHeightWithSpacing ()})) {
for (std :: size_t i = 0; i <kits.size (); ++ i) {
if (filter.empty () || passesFilter (kits .nameUpperCase, filterWide)) {
ImGui :: PushID (i);
const auto selected = i == selected_sticker.kit_vector_index;
if (ImGui :: SelectableWithBullet (kits .name.c_str (), rarityColor (kits .rarity), selected)) {
selected_sticker.kit_vector_index = i;
ImGui :: CloseCurrentPopup ();
}
if (selected && ImGui :: IsWindowAppearing ())
ImGui :: SetScrollHereY ();
ImGui :: PopID ();
}
}
ImGui :: EndChild ();
}
ImGui :: PopID ();
ImGui :: EndCombo ();
}
ImGui :: SliderFloat ("Wear", & selected_sticker.wear, FLT_MIN, 1.0f, "% .10f", ImGuiSliderFlags_Logarithmic);
ImGui :: SliderFloat ("Scale", & selected_sticker.scale, 0.1f, 5.0f);
ImGui :: SliderFloat ("Rotation", & selected_sticker.rotation, 0.0f, 360.0f);
ImGui :: PopID ();
}
selected_entry.update ();
ImGui :: Columns (1);
ImGui :: Separator ();
if (ImGui :: Button ("Update", {130.0f, 30.0f}))
SkinChanger :: scheduleHudUpdate ();
if (! contentOnly)
ImGui :: End ();
}
void GUI :: renderSoundWindow (bool contentOnly) noexcept
{
if (! contentOnly) {
if (! window.sound)
return;
ImGui :: SetNextWindowSize ({0.0f, 0.0f});
ImGui :: Begin ("Sound", & window.sound, windowFlags);
}
ImGui :: SliderInt ("Chicken volume", & config-> sound.chickenVolume, 0, 200, "% d %%");
static int currentCategory {0};
ImGui :: PushItemWidth (110.0f);
ImGui :: Combo ("", & currentCategory, "Local player \ 0Allies \ 0Enemies \ 0");
ImGui :: PopItemWidth ();
ImGui :: SliderInt ("Master volume", & config-> sound.players [currentCategory] .masterVolume, 0, 200, "% d %%");
ImGui :: SliderInt ("Headshot volume", & config-> sound.players [currentCategory] .headshotVolume, 0, 200, "% d %%");
ImGui :: SliderInt ("Weapon volume", & config-> sound.players [currentCategory] .weaponVolume, 0, 200, "% d %%");
ImGui :: SliderInt ("Footstep volume", & config-> sound.players [currentCategory] .footstepVolume, 0, 200, "% d %%");
if (! contentOnly)
ImGui :: End ();
}
void GUI :: renderStyleWindow (bool contentOnly) noexcept
{
if (! contentOnly) {
if (! window.style)
return;
ImGui :: SetNextWindowSize ({0.0f, 0.0f});
ImGui :: Begin ("Style", & window.style, windowFlags);
}
ImGui :: PushItemWidth (150.0f);
if (ImGui :: Combo ("Menu style", & config-> style.menuStyle, "Classic \ 0One window \ 0"))
window = {};
if (ImGui :: Combo ("Menu colors", & config-> style.menuColors, "Dark \ 0Light \ 0Classic \ 0Custom \ 0"))
updateColors ();
ImGui :: PopItemWidth ();
if (config-> style.menuColors == 3) {
ImGuiStyle & style = ImGui :: GetStyle ();
for (int i = 0; i <ImGuiCol_COUNT; i ++) {
if (i && i & 3) ImGui :: SameLine (220.0f * (i & 3));
ImGuiCustom :: colorPicker (ImGui :: GetStyleColorName (i), (float *) & style.Colors , & style.Colors .w);
}
}
if (! contentOnly)
ImGui :: End ();
}
void GUI :: renderMiscWindow (bool contentOnly) noexcept
{
if (! contentOnly) {
if (! window.misc)
return;
ImGui :: SetNextWindowSize ({580.0f, 0.0f});
ImGui :: Begin ("Misc", & window.misc, windowFlags);
}
ImGui :: Columns (2, nullptr, false);
ImGui :: SetColumnOffset (1, 230.0f);
hotkey2 ("Menu Key", config-> misc.menuKey);
ImGui :: Checkbox ("Auto strafe", & config-> misc.autoStrafe);
ImGui :: Checkbox ("Bunny hop", & config-> misc.bunnyHop);
ImGui :: Checkbox ("Edge Jump", & config-> misc.edgejump);
ImGui :: SameLine ();
ImGui :: PushID ("Edge Jump Key");
hotkey2 ("", config-> misc.edgejumpkey);
ImGui :: PopID ();
ImGui :: SameLine ();
ImGui :: PushID ("Slowwalk Key");
hotkey2 ("", config-> misc.slowwalkKey);
ImGui :: PopID ();
ImGuiCustom :: colorPicker ("Noscope crosshair", config-> misc.noscopeCrosshair);
ImGuiCustom :: colorPicker ("Recoil crosshair", config-> misc.recoilCrosshair);
ImGui :: Checkbox ("Auto accept", & config-> misc.autoAccept);
ImGui :: Checkbox ("Reveal ranks", & config-> misc.revealRanks);
ImGui :: Checkbox ("Reveal suspect", & config-> misc.revealSuspect);
ImGuiCustom :: colorPicker ("Offscreen Enemies", config-> misc.offscreenEnemies.color, & config-> misc.offscreenEnemies.enabled);
ImGui :: SliderFloat ("Aspect Ratio", & config-> misc.aspectratio, 0.0f, 5.0f, "% .2f");
ImGui :: NextColumn ();
ImGui :: Checkbox ("Disable HUD blur", & config-> misc.disablePanoramablur);
ImGui :: SameLine ();
ImGui :: PushItemWidth (120.0f);
ImGui :: PushID (0);
ImGuiCustom :: colorPicker ("Bomb timer", config-> misc.bombTimer);
ImGui :: Combo ("Hit Sound", & config-> misc.hitSound, "None \ 0Gamesense \ 0Bell \ 0");
if (config-> misc.hitSound == 5) {
ImGui :: InputText ("Hit Sound filename", & config-> misc.customHitSound);
if (ImGui :: IsItemHovered ())
ImGui :: SetTooltip ("audio file must be put in csgo / sound / directory");
}
ImGui :: Checkbox ("Fix tablet signal", & config-> misc.fixTabletSignal);
ImGui :: SetNextItemWidth (120.0f);
ImGui :: Checkbox ("Fake prime", & config-> misc.fakePrime);
ImGui :: Checkbox ("Opposite Hand Knife", & config-> misc.oppositeHandKnife);
ImGui :: PopID ();
if (ImGui :: Button ("Unhook"))
hooks-> uninstall ();
ImGui :: Columns (1);
if (! contentOnly)
ImGui :: End ();
}
void GUI :: renderConfigWindow (bool contentOnly) noexcept
{
if (! contentOnly) {
if (! window.config)
return;
ImGui :: SetNextWindowSize ({320.0f, 0.0f});
if (! ImGui :: Begin ("Config", & window.config, windowFlags)) {
ImGui :: End ();
return;
}
}
ImGui :: Columns (2, nullptr, false);
ImGui :: SetColumnOffset (1, 170.0f);
static bool incrementalLoad = false;
ImGui :: Checkbox ("Incremental Load", & incrementalLoad);
ImGui :: PushItemWidth (160.0f);
auto & configItems = config-> getConfigs ();
static int currentConfig = -1;
static std :: string buffer;
timeToNextConfigRefresh - = ImGui :: GetIO (). DeltaTime;
if (timeToNextConfigRefresh <= 0.0f) {
config-> listConfigs ();
if (const auto it = std :: find (configItems.begin (), configItems.end (), buffer); it! = configItems.end ())
currentConfig = std :: distance (configItems.begin (), it);
timeToNextConfigRefresh = 0.1f;
}
if (static_cast <std :: size_t> (currentConfig)> = configItems.size ())
currentConfig = -1;
if (ImGui :: ListBox ("", & currentConfig, [] (void * data, int idx, const char ** out_text) {
auto & vector = * static_cast <std :: vector <std :: string> *> (data);
* out_text = vector [idx] .c_str ();
return true;
}, & configItems, configItems.size (), 5) && currentConfig! = -1)
buffer = configItems [currentConfig];
ImGui :: PushID (0);
if (ImGui :: InputTextWithHint ("", "config name", & buffer, ImGuiInputTextFlags_EnterReturnsTrue)) {
if (currentConfig! = -1)
config-> rename (currentConfig, buffer.c_str ());
}
ImGui :: PopID ();
ImGui :: NextColumn ();
ImGui :: PushItemWidth (100.0f);
if (ImGui :: Button ("Open config directory"))
config-> openConfigDir ();
if (ImGui :: Button ("Create config", {100.0f, 25.0f}))
config-> add (buffer.c_str ());
if (ImGui :: Button ("Reset config", {100.0f, 25.0f}))
ImGui :: OpenPopup ("Config to reset");
if (ImGui :: BeginPopup ("Config to reset")) {
static constexpr const char * names [] {"Whole", "Aimbot", "Triggerbot", "Backtrack", "Anti aim", "Glow", "Chams", "ESP", "Visuals", "Skin changer" , "Sound", "Style", "Misc"};
for (int i = 0; i <IM_ARRAYSIZE (names); i ++) {
if (i == 1) ImGui :: Separator ();
if (ImGui :: Selectable (names )) {
switch (i) {
case 0: config-> reset (); updateColors (); SkinChanger :: scheduleHudUpdate (); break;
case 1: config-> aimbot = {}; break;
case 2: config-> triggerbot = {}; break;
case 3: config-> chams = {}; break;
case 4: config-> streamProofESP = {}; break;
case 5: config-> visuals = {}; break;
case 6: config-> skinChanger = {}; SkinChanger :: scheduleHudUpdate (); break;
case 7: config-> sound = {}; break;
case 8: config-> style = {}; updateColors (); break;
case 9: config-> misc = {}; break;
}
}
}
ImGui :: EndPopup ();
}
if (currentConfig! = -1) {
if (ImGui :: Button ("Load selected", {100.0f, 25.0f})) {
config-> load (currentConfig, incrementalLoad);
updateColors ();
SkinChanger :: scheduleHudUpdate ();
}
if (ImGui :: Button ("Save selected", {100.0f, 25.0f}))
config-> save (currentConfig);
if (ImGui :: Button ("Delete selected", {100.0f, 25.0f})) {
config-> remove (currentConfig);
if (static_cast <std :: size_t> (currentConfig) <configItems.size ())
buffer = configItems [currentConfig];
else
buffer.clear ();
}
}
ImGui :: Columns (1);
if (! contentOnly)
ImGui :: End ();
}
void Active () {ImGuiStyle * Style = & ImGui :: GetStyle (); Style-> Colors [ImGuiCol_Button] = ImColor (25, 30, 34); Style-> Colors [ImGuiCol_ButtonActive] = ImColor (25, 30, 34); Style-> Colors [ImGuiCol_ButtonHovered] = ImColor (25, 30, 34); }
void Hovered () {ImGuiStyle * Style = & ImGui :: GetStyle (); Style-> Colors [ImGuiCol_Button] = ImColor (19, 22, 27); Style-> Colors [ImGuiCol_ButtonActive] = ImColor (19, 22, 27); Style-> Colors [ImGuiCol_ButtonHovered] = ImColor (19, 22, 27); }
void Hovered2 () {ImGuiStyle * Style = & ImGui :: GetStyle (); Style-> Colors [ImGuiCol_Text] = ImColor (255, 255, 255); }
void Active2 () {ImGuiStyle * Style = & ImGui :: GetStyle (); Style-> Colors [ImGuiCol_Text] = ImColor (170, 170, 170); }
void GUI :: renderGuiStyle2 () noexcept
{
ImGuiStyle * Style = & ImGui :: GetStyle ();
Style-> WindowRounding = 0;
Style-> WindowBorderSize = 0;
Style-> ChildRounding = 0;
Style-> FrameBorderSize = 0;
Style-> Colors [ImGuiCol_TitleBg] = ImColor (19, 22, 27);
Style-> Colors [ImGuiCol_TitleBgActive] = ImColor (19, 22, 27);
Style-> Colors [ImGuiCol_WindowBg] = ImColor (0, 0, 0, 0);
Style-> Colors [ImGuiCol_ChildBg] = ImColor (19, 22, 27);
Style-> Colors [ImGuiCol_Button] = ImColor (25, 30, 34);
Style-> Colors [ImGuiCol_ButtonHovered] = ImColor (25, 30, 34);
Style-> Colors [ImGuiCol_ButtonActive] = ImColor (25, 30, 34);
Style-> Colors [ImGuiCol_FrameBg] = ImColor (56, 56, 56);
Style-> Colors [ImGuiCol_FrameBgHovered] = ImColor (56, 56, 56);
Style-> Colors [ImGuiCol_FrameBgActive] = ImColor (56, 56, 56);
Style-> Colors [ImGuiCol_SliderGrab] = ImVec4 (0.239f, 0.521f, 0.878f, 1.f);
static int Active_Tab = 1;
static int Active_SubTabRage = 1;
static int Active_SubTabVisuals = 1;
static int Active_SubTabMisc = 1;
static int Active_SubTabSkins = 1;
static int Active_SubTabConfigs = 1;
if (ImGui :: Begin ("Menu", NULL, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings)) {
ImGui :: PushFont (nullptr);
ImGui :: BeginChild ("## Main", ImVec2 {640, 430}, false);
{
ImGui :: BeginChild ("## UP", ImVec2 {640, 430}, false);
{
ImGui :: SetCursorPos (ImVec2 {20, 12});
ImGui :: PushFont (nullptr); ImGui :: Text ("Infectware"); ImGui :: PopFont ();
ImGui :: PushFont (nullptr);
ImGui :: SetCursorPos (ImVec2 {240, 0});
if (Active_Tab == 1) Active (); else Hovered ();
if (ImGui :: Button ("Legitbot", ImVec2 {75, 45}))
Active_Tab = 1;
ImGui :: SetCursorPos (ImVec2 {320, 0});
if (Active_Tab == 2) Active (); else Hovered ();
if (ImGui :: Button ("Visuals", ImVec2 {75, 45}))
Active_Tab = 2;
ImGui :: SetCursorPos (ImVec2 {400, 0});
if (Active_Tab == 3) Active (); else Hovered ();
if (ImGui :: Button ("Misc", ImVec2 {75, 45}))
Active_Tab = 3;
ImGui :: SetCursorPos (ImVec2 {480, 0});
if (Active_Tab == 4) Active (); else Hovered ();
if (ImGui :: Button ("Skins", ImVec2 {75, 45}))
Active_Tab = 4;
ImGui :: SetCursorPos (ImVec2 {560, 0});
if (Active_Tab == 5) Active (); else Hovered ();
if (ImGui :: Button ("Configs", ImVec2 {75, 45}))
Active_Tab = 5;
ImGui :: PopFont ();
}
ImGui :: EndChild ();
ImGui :: SetCursorPos (ImVec2 {0, 45});
Style-> Colors [ImGuiCol_ChildBg] = ImColor (25, 30, 34);
Style-> Colors [ImGuiCol_Button] = ImColor (25, 30, 34);
Style-> Colors [ImGuiCol_ButtonHovered] = ImColor (25, 30, 34);
Style-> Colors [ImGuiCol_ButtonActive] = ImColor (25, 30, 34);
ImGui :: BeginChild ("## Childs", ImVec2 {640, 365}, false);
{
ImGui :: SetCursorPos (ImVec2 {15, 5});
Style-> ChildRounding = 0;
ImGui :: BeginChild ("## Left", ImVec2 {155, 320}, false);
{
if (Active_Tab == 1)
{
ImGuiStyle * Style = & ImGui :: GetStyle ();
ImGui :: SetCursorPosY (10);
ImGui :: PushFont (nullptr);
afkbutton (ImGui :: Button ("Aimbot", ImVec2 {140, 20}), Active_SubTabRage, 1);
afkbutton (ImGui :: Button ("TriggerBot", ImVec2 {140, 20}), Active_SubTabRage, 2);
ImGui :: PopFont ();
}
else if (Active_Tab == 2)
{
ImGuiStyle * Style = & ImGui :: GetStyle ();
ImGui :: SetCursorPosY (10);
ImGui :: PushFont (nullptr);
afkbutton (ImGui :: Button ("ESP", ImVec2 {140, 20}), Active_SubTabVisuals, 1);
afkbutton (ImGui :: Button ("Chams", ImVec2 {140, 20}), Active_SubTabVisuals, 2);
afkbutton (ImGui :: Button ("World", ImVec2 {140, 20}), Active_SubTabVisuals, 3);
afkbutton (ImGui :: Button ("Glow", ImVec2 {140, 20}), Active_SubTabVisuals, 4);
ImGui :: PopFont ();
}
else if (Active_Tab == 3)
{
}
else if (Active_Tab == 4)
{
}
else if (Active_Tab == 5)
{
}
}
ImGui :: EndChild ();
ImGui :: SetCursorPos (ImVec2 {175, 5});
Style-> Colors [ImGuiCol_ChildBg] = ImColor (29, 34, 38);
Style-> ChildRounding = 5;
ImGui :: BeginChild ("## SubMain", ImVec2 {455, 350}, false);
{
ImGui :: SetCursorPos (ImVec2 {10, 10});
if (Active_Tab == 1 && Active_SubTabRage == 1)
{
renderAimbotWindow (true);
}
if (Active_Tab == 1 && Active_SubTabRage == 2)
{
}
if (Active_Tab == 1 && Active_SubTabRage == 3)
{
renderTriggerbotWindow (true);
}
if (Active_Tab == 2 && Active_SubTabVisuals == 1)
{
renderStreamProofESPWindow (true);
}
if (Active_Tab == 2 && Active_SubTabVisuals == 2)
{
renderChamsWindow (true);
}
if (Active_Tab == 2 && Active_SubTabVisuals == 3)
{
renderVisualsWindow (true);
}
if (Active_Tab == 2 && Active_SubTabVisuals == 4)
{
}
else if (Active_Tab == 3)
{
renderMiscWindow (true);
}
else if (Active_Tab == 4)
{
renderSkinChangerWindow (true);
}
else if (Active_Tab == 5)
{
renderConfigWindow (true);
}
}
ImGui :: EndChild ();
}
ImGui :: EndChild ();
ImGui :: SetCursorPos (ImVec2 {0, 410});
Style-> Colors [ImGuiCol_ChildBg] = ImColor (45, 50, 54);
Style-> ChildRounding = 0;
ImGui :: BeginChild ("## Text", ImVec2 {640, 20}, false);
{
ImGui :: SetCursorPos (ImVec2 {3, 3});
ImGui :: Text ("Infectware by hlix");
}
ImGui :: EndChild ();
}
ImGui :: EndChild ();
}
ImGui :: End ();
}
[/THE CODE]
Вложения
-
16.8 KB Просмотры: 107