This repository was archived by the owner on Mar 6, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
139 lines (96 loc) · 4.07 KB
/
main.cpp
File metadata and controls
139 lines (96 loc) · 4.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#include <includes.h>
using namespace UI::Primitives;
static Vector2<float> mainSectionPos = { 50.0f, 100.0f };
static Vector2<float> aimbotSectionPos = { 400.0f, 100.0f };
static Vector2<float> visualsSectionPos = { 750.0f, 100.0f };
static Vector2<float> worldSectionPos = { 1100.0f, 100.0f };
static Vector2<float> exploitsSectionPos = { 1450.0f, 100.0f };
static bool combatModuleEnabled = true;
static bool visualsModuleEnabled = true;
static bool worldModuleEnabled = true;
static bool exploitsModuleEnabled = true;
static bool settingsModuleEnabled = false;
static bool aboutModuleEnabled = false;
static bool aimbotEnabled = false;
static bool triggerbotEnabled = false;
static bool rapidfireEnabled = false;
static bool espEnabled = false;
static bool linesEnabled = false;
int main()
{
ClickUI ui = ClickUI(360);
ui.Initialize("super hacker");
bool running = true;
int frameCount = 0;
double totalTime = 0.0;
Color<uint8_t> moduleColor = { 25, 25, 25, 255 };
Color<uint8_t> toggleColor = { 20, 20, 20, 255 };
UI::Elements::Section combatSection(&ui, "Combat", aimbotSectionPos, { 300, 500 }, { 20, 20, 20, 60 });
{
combatSection.AddModifiers(true, true);
combatSection.AddToggle("Aimbot", toggleColor, aimbotEnabled);
combatSection.AddToggle("Triggerbot", toggleColor, triggerbotEnabled);
combatSection.AddToggle("Rapidfire", toggleColor, rapidfireEnabled, true);
}
UI::Elements::Section visualsSection(&ui, "Visuals", visualsSectionPos, { 300, 500 }, { 20, 20, 20, 60 });
{
visualsSection.AddModifiers(true, true);
visualsSection.AddToggle("ESP", toggleColor, espEnabled);
visualsSection.AddToggle("Lines", toggleColor, linesEnabled, true);
}
UI::Elements::Section worldSection(&ui, "World", worldSectionPos, { 300, 500 }, { 20, 20, 20, 60 });
{
worldSection.AddModifiers(true, true);
}
UI::Elements::Section exploitsSection(&ui, "Exploits", exploitsSectionPos, { 300, 500 }, { 20, 20, 20, 60 });
{
exploitsSection.AddModifiers(true, true);
}
UI::Elements::Section mainSection(&ui, "Client", mainSectionPos, { 300, 500 }, { 20, 20, 20, 60 });
{
mainSection.AddModifiers(true, false, true);
mainSection.AddDivider("FEATURES");
mainSection.AddModule("Combat", moduleColor, combatModuleEnabled, [&](bool toggled) {
combatSection.visible = toggled;
});
mainSection.AddModule("Visuals", moduleColor, visualsModuleEnabled, [&](bool toggled) {
visualsSection.visible = toggled;
});
mainSection.AddModule("World", moduleColor, worldModuleEnabled, [&](bool toggled) {
worldSection.visible = toggled;
});
mainSection.AddModule("Exploits", moduleColor, exploitsModuleEnabled, [&](bool toggled) {
exploitsSection.visible = toggled;
});
mainSection.AddDivider("MISC");
mainSection.AddModule("Settings", moduleColor, settingsModuleEnabled, [&](bool toggled) {
});
mainSection.AddModule("About", moduleColor, aboutModuleEnabled, [&](bool toggled) {
}, true);
mainSection.AddDivider("v0.0.1");
}
// UI::Effects::GPUBlur::Initialize(ui.renderer);
while (running)
{
auto start = std::chrono::high_resolution_clock::now();
ui.PollEvents(running);
ui.ClearScreen();
mainSection.Render();
combatSection.Render();
visualsSection.Render();
worldSection.Render();
exploitsSection.Render();
ui.RenderScreen();
auto end = std::chrono::high_resolution_clock::now();
auto duration = std::chrono::duration_cast<std::chrono::microseconds>(end - start);
double frameTime = duration.count() / 1000.0;
totalTime += frameTime;
frameCount++;
if (frameCount % 360 == 0) {
std::cout << "Average frame time: " << totalTime / frameCount << " ms ("
<< 1000.0 / (totalTime / frameCount) << " FPS)" << std::endl;
}
}
UI::Elements::Image::ClearCache(ui.renderer);
ui.Finalize();
}