Skip to content

Commit 1b80e4d

Browse files
committed
nyaaa
1 parent 7262972 commit 1b80e4d

21 files changed

+277
-429
lines changed

CMakeLists.txt

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ file(GLOB SOURCES
1818
src/*/*/*.cpp
1919
)
2020

21-
#if ("${GEODE_TARGET_PLATFORM}" STREQUAL "iOS" OR IOS)
22-
# src/*.mm
23-
# src/*/*.mm
24-
# src/*/*/*.mm
25-
#endif()
21+
file(GLOB OBJC_SOURCES
22+
src/*.mm
23+
src/*/*.mm
24+
src/*/*/*.mm
25+
)
2626

2727
add_library(${PROJECT_NAME} SHARED ${SOURCES})
2828

@@ -44,15 +44,10 @@ endif()
4444
add_subdirectory($ENV{GEODE_SDK} ${CMAKE_CURRENT_BINARY_DIR}/geode)
4545
include_directories(include)
4646

47-
file(READ "modules.txt" MODULES_CONTENT)
47+
add_definitions(-DSTATUS_TEXTS)
4848

49-
string(REGEX REPLACE "\n$" "" MODULES_CONTENT "${MODULES_CONTENT}")
50-
string(REPLACE "\n" ";" MODULES_LIST "${MODULES_CONTENT}")
49+
CPMAddPackage("gh:matcool/gd-imgui-cocos#09a9555")
5150

52-
foreach(MODULE ${MODULES_LIST})
53-
if(NOT MODULE MATCHES "^//")
54-
add_definitions(-D${MODULE})
55-
endif()
56-
endforeach()
51+
target_link_libraries(${PROJECT_NAME} imgui-cocos)
5752

58-
setup_geode_mod(${PROJECT_NAME})
53+
setup_geode_mod(${PROJECT_NAME})

changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# 1.6.1
2+
3+
- Fixed game loading slowly if speedhack was turned to really low (<0.01)
4+
- Fixed Editor Wave Trail changing the position while not the wave
5+
- Transparent BG Now updates live when you change it
6+
- Added **Hide Pause Menu**
7+
- Added **Auto Clicker**
8+
19
# 1.6.0
210

311
- Fixed Transparent BG not working on apple devices

src/Client/Client.cpp

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,35 @@ bool Client::handleKeybinds(enumKeyCodes key, bool isDown, bool isRepeatedKey)
5252
}
5353

5454
return false;
55-
}
55+
}
56+
57+
bool Client::useImGuiUI()
58+
{
59+
return false;
60+
}
61+
62+
void Client::initImGui()
63+
{
64+
ImGuiStyle* style = &ImGui::GetStyle();
65+
ImGuiIO* io = &ImGui::GetIO();
66+
67+
io->ConfigWindowsMoveFromTitleBarOnly = true;
68+
69+
style->FramePadding = ImVec2(3, 6);
70+
style->Colors[ImGuiCol_TitleBg] = ImVec4(20.0f / 255, 20.0f / 255, 20.0f / 255, 1);
71+
}
72+
73+
void Client::drawImGui()
74+
{
75+
for (auto window : windows)
76+
{
77+
window->drawImGui();
78+
}
79+
80+
ImGui::ShowStyleEditor();
81+
}
82+
83+
void Client::sortWindows()
84+
{
85+
86+
}

src/Client/Client.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
22

3+
#include <imgui-cocos.hpp>
34
#include "../Defines/Platform.h"
45

56
#include "Types/InputModule.hpp"
@@ -37,6 +38,11 @@ class Client
3738
static Client* get();
3839

3940
bool handleKeybinds(enumKeyCodes key, bool isDown, bool isRepeatedKey);
41+
42+
bool useImGuiUI();
43+
void initImGui();
44+
void drawImGui();
45+
void sortWindows();
4046

4147
//[[deprecated("GetModuleEnabled has been deprecated due to lag, please rember to cache the module :3")]]
4248
static bool GetModuleEnabled(std::string id)

src/Client/ClientSetup.h

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class ClientUtils
5555
Window* speedhack = new Speedhack();
5656
speedhack->name = "Speedhack";
5757
speedhack->id = "speedhack-window";
58-
speedhack->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 2, 50);
58+
//speedhack->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 2, 50);
5959

6060
speedhack->modules.push_back(new SpeedhackTop());
6161
speedhack->modules.push_back(new SpeedhackEnabled());
@@ -73,7 +73,7 @@ class ClientUtils
7373
Window* level = new Level();
7474
level->name = "Level";
7575
level->id = "level-window";
76-
level->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 1, 50);
76+
//level->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 1, 50);
7777

7878
level->modules.push_back(new Module("Noclip", "noclip", "Prevents the player from dying"));
7979
level->modules.push_back(new Module("Instant Complete", "instant", "Instantly completes a level.\nMay not work because of the <cg>Geometry Dash</c> anti-cheat.\nUsing this cheat on a <co>rated level</c> <cr>WILL GET YOU LEADERBOARD BANNED</c>", false, "<cr>Warning!</c>\nUsing this cheat on a <co>rated level</c> <cr>WILL GET YOU LEADERBOARD BANNED</c>", true));
@@ -122,6 +122,8 @@ class ClientUtils
122122

123123
level->modules.push_back(new Module("Suicide", "you-should-kill-yourself-now", "Kills the player instantly"));
124124
level->modules.push_back(new Module("No Checkpoint Limit", "no-checkpoint-limit", "Removes the 50 checkpoint limit from practice mode"));
125+
126+
level->modules.push_back(new Module("Auto Clicker", "auto-clicker", "Automatically clicks (and holds for) every X ticks"));
125127
//level->modules.push_back(new Module("Frame Stepper", "frame-stepper", "Step the game through frames by tapping a button"));
126128

127129

@@ -162,14 +164,21 @@ class ClientUtils
162164
//Client::GetModule("smart-startpos")->optionSizeForce = Client::GetModule("smart-startpos")->options[0]->sizeForOptionsPage();
163165

164166
Client::GetModule("custom-respawn-time")->options.push_back(new InputModule("Delay:", "respawn-time-delay", "4.2069"));
167+
168+
Client::GetModule("auto-clicker")->options.push_back(new InputModule("Interval", "auto-clicker-delay", "6"));
169+
Client::GetModule("auto-clicker")->options.push_back(new InputModule("Hold For", "auto-clicker-hold-for", "3"));
170+
Client::GetModule("auto-clicker")->options.push_back(new Module("Player 1", "auto-clicker-player1", "Should it click for player 1", true));
171+
Client::GetModule("auto-clicker")->options.push_back(new Module("Player 2", "auto-clicker-player2", "Should it click for player 2", true));
172+
as<InputModule*>(Client::GetModule("auto-clicker")->options[0])->allowedChars = "0123456789";
173+
as<InputModule*>(Client::GetModule("auto-clicker")->options[1])->allowedChars = "0123456789";
165174
}
166175

167176
static void SetupBypass()
168177
{
169178
Window* bypass = new Window();
170179
bypass->name = "Bypass";
171180
bypass->id = "bypass-window";
172-
bypass->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 0, 50);
181+
//bypass->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 0, 50);
173182

174183
//bypass->modules.push_back(new Module("Slider Limit Bypass", "slider-limit", "Allows sliders to go beyond the limit of the slider. <cr>Doesn't work for scaling in the editor currently</c>"));
175184

@@ -181,7 +190,7 @@ class ClientUtils
181190
Window* bypass = new Universal();
182191
bypass->name = "Universal";
183192
bypass->id = "universal-window";
184-
bypass->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 0, 50);
193+
//bypass->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 0, 50);
185194

186195

187196
bypass->modules.push_back(new Module("Practice Music Sync", "practice-bypass", "Unlocks the Practice Music Sync button in the pause menu options"));
@@ -213,6 +222,8 @@ class ClientUtils
213222

214223
bypass->modules.push_back(new Module("Show Touches", "show-touches", "Shows a circle on the screen whenever you touch"));
215224
bypass->modules.push_back(new Module("Auto LDM", "auto-ldm", "Automatically enable Low Detail Mode in levels when you view them"));
225+
226+
bypass->modules.push_back(new Module("Hide Pause Menu", "hide-pause-menu", "Hides the pause menu :3"));
216227

217228
Client::instance->windows.push_back(bypass);
218229

@@ -235,7 +246,7 @@ class ClientUtils
235246
Window* creator = new Window();
236247
creator->name = "Creator";
237248
creator->id = "creator-window";
238-
creator->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 0, 50);
249+
//creator->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 0, 50);
239250

240251
creator->modules.push_back(new SetValueModule("Set Scale:", "set-scale"));
241252
creator->modules.push_back(new SetValueModule("Set Rotation:", "set-rot"));
@@ -278,7 +289,7 @@ class ClientUtils
278289
Window* cosmetic = new Window();
279290
cosmetic->name = "Cosmetic";
280291
cosmetic->id = "cosmetic-window";
281-
cosmetic->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 3, 50);
292+
//cosmetic->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 3, 50);
282293

283294
//cosmetic->modules.push_back(new Module("Hide Endscreen BTN", "end-screen", "Adds an arrow to hide the end screen"));
284295
cosmetic->modules.push_back(new Module("No Transition", "no-trans", "Disables the fade scene transitions"));
@@ -357,7 +368,7 @@ class ClientUtils
357368
Window* misc = new Window();
358369
misc->name = "Misc";
359370
misc->id = "misc-window";
360-
misc->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 4, 50);
371+
//misc->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 4, 50);
361372

362373
//misc->modules.push_back(new Module("Use Full Options", "full-options", "Opens the full options menu instead of the mini options in the pause menu.\nAlso adds a button to the normal pause menu to open the mini options."));
363374

@@ -448,7 +459,7 @@ class ClientUtils
448459
Window* replay = new Window();
449460
replay->name = "Config";
450461
replay->id = "options-window";
451-
replay->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 4, 50);
462+
//replay->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 4, 50);
452463

453464
if (android)
454465
{
@@ -488,7 +499,7 @@ class ClientUtils
488499
Window* theming = new Window();
489500
theming->name = "Theming";
490501
theming->id = "themes-window";
491-
theming->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 5, 50);
502+
//theming->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 5, 50);
492503

493504
theming->modules.push_back(new ColourModule("Accent", "accent-colour", ccc3(10, 0, 0)));
494505

@@ -502,7 +513,7 @@ class ClientUtils
502513
Window* devtools = new Window();
503514
devtools->name = "Developer";
504515
devtools->id = "devtools-window";
505-
devtools->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 5, 50);
516+
//devtools->windowPos = ccp(50 + (50 + (Client::instance->tileSize.x)) * 5, 50);
506517

507518
devtools->modules.push_back(new Module("Recompile Shader", "recomp-shaders", "Recompiles blur shader"));
508519

src/Client/Module.cpp

Lines changed: 8 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,57 +2,12 @@
22

33
#include "../Layers/ModuleOptionsLayer.h"
44
#include "Dropdown.h"
5-
#include "../UI/PCDrawUtils.hpp"
65

7-
bool Module::touchBegan(CCPoint point, CCTouch* touch)
6+
void Module::drawImGui()
87
{
9-
if (CCRectMake(0, 0, Client::tileSize.x, Client::tileSize.y).containsPoint(point))
10-
{
11-
log::info("id: {}", id);
12-
mouseHeldDown = true;
13-
14-
return true;
15-
}
16-
17-
return false;
18-
}
19-
20-
bool Module::touchMoved(CCPoint point, CCTouch* touch)
21-
{
22-
return false;
23-
}
24-
25-
bool Module::touchEndedOrCancelled(CCPoint point, CCTouch* touch, bool cancelled)
26-
{
27-
if (mouseHeldDown)
28-
{
29-
enabled = !enabled;
30-
save();
31-
onChange();
32-
33-
if (enabled)
34-
enableHooks();
35-
else
36-
disableHooks();
37-
38-
if (enabled)
39-
enablePatches();
40-
else
41-
disablePatches();
42-
43-
mouseHeldDown = false;
44-
}
45-
46-
return false;
47-
}
48-
49-
50-
void Module::drawModule(CCPoint pointTopLeft)
51-
{
52-
PCDrawUtils::drawRect(pointTopLeft, Client::tileSize, ccc4(0, 0, 255, 255));
8+
ImGui::Button(this->name.c_str());
539
}
5410

55-
5611
void Module::onOptionsAndroid(CCObject* sender)
5712
{
5813
auto dat = static_cast<Module*>(static_cast<CCNode*>(sender)->getUserData());
@@ -87,6 +42,9 @@ void Module::onToggleAndroid(CCObject* sender)
8742
else
8843
disableHooks();
8944

45+
if (onToggle)
46+
onToggle(enabled);
47+
9048
return;
9149
}
9250

@@ -115,6 +73,9 @@ void Module::onToggleAndroid(CCObject* sender)
11573
dat->enableHooks();
11674
else
11775
dat->disableHooks();
76+
77+
if (dat->onToggle)
78+
dat->onToggle(dat->enabled);
11879
}
11980

12081
void Module::makeAndroid(CCNode* menu, CCPoint pos)

src/Client/Module.h

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ class Module : public UIComponent
5151

5252
bool mouseHeldDown = false;
5353

54+
geode::utils::MiniFunction<void(bool)> onToggle;
5455
ModuleChangeDelegate* delegate = nullptr;
56+
5557
CCSize optionSizeForce = CCSizeZero;
5658

5759
void addHookRaw(Result<Hook*> hook);
@@ -65,6 +67,8 @@ class Module : public UIComponent
6567
void disablePatches();
6668
void enablePatches();
6769

70+
virtual void drawImGui();
71+
6872
Module()
6973
{
7074

@@ -95,17 +99,6 @@ class Module : public UIComponent
9599

96100
// options
97101
CCSize sizeForOptionsPage();
98-
99-
100-
/// @brief
101-
/// @param point the position of the touch relative to where the module should be drawn
102-
/// @param touch touch
103-
/// @return should stop input passing to gd
104-
bool touchBegan(CCPoint point, CCTouch* touch);
105-
bool touchMoved(CCPoint point, CCTouch* touch);
106-
bool touchEndedOrCancelled(CCPoint point, CCTouch* touch, bool cancelled);
107-
108-
void drawModule(CCPoint pointTopLeft);
109102

110103
virtual void onChange()
111104
{

0 commit comments

Comments
 (0)