Skip to content

Commit b164974

Browse files
committed
discord server link
1 parent 3feb5eb commit b164974

File tree

7 files changed

+193
-17
lines changed

7 files changed

+193
-17
lines changed

about.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# <cp>QOLMod</c>
1+
# QOLMod
22

33
<co>Note:</c> This mod only has a mobile <cl>UI</c> currently, if you want a Mega Hack like menu, wait for the update to release
44

5-
<cp>QOLMod</c> is **THE** mod menu for android, it has a Mobile Optimised <cl>UI</c> with many features to improve your mobile <cg>Geometry Dash</c> experience such as a <cl>Speedhack</c>, <cL>Copy hack</c>, <cL>Slider limit hack</c> (Android only <cr>sad</c>) and <cL>Unlock item hack</c>.
5+
QOLMod is **THE** mod menu for android, it has a Mobile Optimised <cl>UI</c> with many features to improve your mobile <cg>Geometry Dash</c> experience such as a <cl>Speedhack</c>, <cL>Copy hack</c>, <cL>Slider limit hack</c> (Android only <cr>sad</c>) and <cL>Unlock item hack.
66

7-
While <cp>QOLMod</c> has only a few mods right now, it will be updated regularly future with <cr>more</c> mods.
7+
Join the [Discord Server (https://discord.gg/DfQSTEnQKK)](https://discord.gg/DfQSTEnQKK)

changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# 1.1.0
2+
3+
- Added Icon Effects (RGB Icons)
4+
- Created an official [Discord Server](https://discord.gg/DfQSTEnQKK)
5+
6+
# 1.0.3
7+
8+
- Added back the button wheh in gameplay
9+
- Fixed pause crash with speedhack
10+
111
# 1.0.2
212

313
- Fixed crash when playing user levels

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"geode": "2.0.0",
3-
"version": "v1.0.3",
3+
"version": "v1.1.0",
44
"gd": {
55
"win": "2.204",
66
"android": "*"

src/Client/AndroidUI.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,12 @@ class AndroidUI : public cocos2d::CCLayerColor {
5858
{
5959
if (Client::GetModuleEnabled("speedhack-enabled"))
6060
{
61-
try
61+
float v = 1.0f;
62+
63+
if (SpeedhackTop::instance->text.size() != 0 && !SpeedhackTop::instance->text.ends_with("."))
6264
{
6365
v = std::stof(SpeedhackTop::instance->text);
6466
}
65-
catch(const std::exception& e)
66-
{
67-
v = 1.0f;
68-
}
6967

7068
if (v < 0.01f)
7169
v = 0.01f;
@@ -253,7 +251,7 @@ class AndroidUI : public cocos2d::CCLayerColor {
253251
{
254252
auto menu = CCMenu::create();
255253
menu->setAnchorPoint(ccp(1, 0));
256-
menu->setPosition(ccp(panel->getContentSize().width - 15 + 5, 10));
254+
menu->setPosition(ccp(475 - 15 + 5, 10));
257255
menu->setContentSize(ccp(340, panel->getContentSize().height - 10 - 10));
258256
menu->ignoreAnchorPointForPosition(false);
259257

src/Client/Dropdown.h

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
#include <Geode/Geode.hpp>
2+
3+
using namespace geode::prelude;
4+
5+
class Dropdown : public CCMenu
6+
{
7+
static Dropdown* create(std::vector<std::string> words, CCObject* sender, SEL_MenuHandler event) {
8+
Dropdown *ret = new Dropdown();
9+
if (ret && ret->init(words, sender, event)) {
10+
ret->autorelease();
11+
return ret;
12+
} else {
13+
delete ret;
14+
return nullptr;
15+
}
16+
}
17+
18+
virtual bool init() {
19+
if (!CCNode::init()) {
20+
return false;
21+
}
22+
23+
24+
25+
auto sprite = Sprite::createWithSpriteFrameName("portal_17_extra_2_001.png");
26+
sprite->setPosition(Vec2(0, 0));
27+
addChild(sprite);
28+
29+
// Your additional initialization code here
30+
31+
return true;
32+
}
33+
34+
/*virtual bool onTouchBegan(Touch *touch, Event *event) {
35+
return true;
36+
}*/
37+
};
38+
39+
/*
40+
class Dropdown {
41+
public:
42+
int selected = 0;
43+
CCMenu* menu;
44+
std::vector<std::string> strs;
45+
CCLabelBMFont* lbl;
46+
47+
void onToggle(CCObject* sender) {
48+
auto obj = reinterpret_cast<CCMenuItemSprite*>(sender);
49+
bool expanded = obj->getScaleY() < 0 ? true : false;
50+
#ifdef GEODE_IS_WINDOWS
51+
obj->runAction(CCEaseBackOut::create(CCScaleTo::create(0.5f, 0.75f, (!expanded ? -0.75f : 0.75f))));
52+
#else
53+
obj->runAction(CCScaleTo::create(0.5f, 0.75f, (!expanded ? -0.75f : 0.75f)));
54+
#endif
55+
56+
auto parent = obj->getParent();
57+
auto background = parent->getChildByID("background");
58+
auto ddmenu = parent->getChildByID("dropdown-menu");
59+
60+
int h = ddmenu->getChildrenCount() + 1;
61+
h = expanded ? h : 1;
62+
63+
ddmenu->setVisible(expanded);
64+
background->setContentSize({background->getContentSize().width, (25 / background->getScale()) * h});
65+
}
66+
67+
void onSelect(CCObject* sender) {
68+
auto obj = reinterpret_cast<CCMenuItemSpriteExtra*>(sender);
69+
reinterpret_cast<CCLabelBMFont*>(obj->getParent()->getParent()->getChildByID("selected-label"))->setString((reinterpret_cast<CCLabelBMFont*>(obj->getChildren()->objectAtIndex(0)))->getString());
70+
71+
auto obj2 = reinterpret_cast<CCMenuItemSprite*>(obj->getParent()->getParent()->getChildByID("flip-btn"));
72+
bool expanded = obj2->getScaleY() < 0 ? true : false;
73+
#ifdef GEODE_IS_WINDOWS
74+
obj2->runAction(CCEaseBackOut::create(CCScaleTo::create(0.5f, 0.75f, (!expanded ? -0.75f : 0.75f))));
75+
#else
76+
obj2->runAction(CCScaleTo::create(0.5f, 0.75f, (!expanded ? -0.75f : 0.75f)));
77+
#endif
78+
79+
auto parent = obj2->getParent();
80+
auto background = parent->getChildByID("background");
81+
auto ddmenu = parent->getChildByID("dropdown-menu");
82+
83+
int h = ddmenu->getChildrenCount() + 1;
84+
h = expanded ? h : 1;
85+
86+
ddmenu->setVisible(expanded);
87+
background->setContentSize({background->getContentSize().width, (25 / background->getScale()) * h});
88+
}
89+
90+
static Dropdown* create(std::vector<std::string> strs)
91+
{
92+
Dropdown* dd = new Dropdown();
93+
dd->strs = strs;
94+
95+
CCSize size = {240, 25};
96+
97+
CCMenu* menu = CCMenu::create();
98+
menu->ignoreAnchorPointForPosition(false);
99+
100+
menu->setContentSize(size);
101+
102+
auto background = CCScale9Sprite::create("GJ_square01.png");
103+
background->setScale(0.3f);
104+
background->setContentSize({size.width / background->getScale(), size.height / background->getScale()});
105+
background->setAnchorPoint({0, 1});
106+
background->setPosition(0, size.height);
107+
background->setID("background");
108+
background->setOpacity(100);
109+
background->setColor({0, 0, 0});
110+
menu->addChild(background);
111+
112+
auto spr = CCSprite::createWithSpriteFrameName("edit_upBtn_001.png");
113+
spr->setScale(0.9f);
114+
115+
auto spr2 = CCSprite::createWithSpriteFrameName("edit_upBtn_001.png");
116+
spr2->setScale(0.9f);
117+
spr2->setColor({150, 150, 150});
118+
119+
auto arrowBtn = CCMenuItemSprite::create(spr, spr2, menu, menu_selector(Dropdown::onToggle));
120+
arrowBtn->setPosition(size.width - 15, 25 / 2);
121+
arrowBtn->setID("flip-btn");
122+
arrowBtn->setScale(0.75f);
123+
arrowBtn->setScaleY(-0.75f);
124+
menu->addChild(arrowBtn);
125+
126+
auto lbl = CCLabelBMFont::create(strs[0].c_str(), "bigFont.fnt");
127+
lbl->setScale(0.5f);
128+
lbl->setPosition({size.width / 2 - (arrowBtn->getScaledContentSize().width / 2) - 5, size.height / 2});
129+
lbl->limitLabelWidth(145, 0.6f, 0);
130+
lbl->setID("selected-label");
131+
dd->lbl = lbl;
132+
menu->addChild(lbl);
133+
134+
auto btnMenu = CCMenu::create();
135+
btnMenu->setAnchorPoint({0, 1});
136+
btnMenu->setPosition({0, size.height});
137+
btnMenu->setContentSize({size.width, size.height * strs.size()});
138+
btnMenu->ignoreAnchorPointForPosition(false);
139+
btnMenu->setVisible(false);
140+
btnMenu->setID("dropdown-menu");
141+
142+
for (size_t i = 0; i < strs.size(); i++)
143+
{
144+
auto lbl = CCLabelBMFont::create(strs[i].c_str(), "bigFont.fnt");
145+
lbl->limitLabelWidth(size.width - 20, 0.6f, 0);
146+
147+
auto btn = CCMenuItemSpriteExtra::create(lbl, menu, menu_selector(Dropdown::onSelect));
148+
btn->setPosition({size.width / 2, (background->getScaledContentSize().height - (size.height * i)) + size.height / 2});
149+
150+
btnMenu->addChild(btn);
151+
}
152+
153+
154+
menu->addChild(btnMenu);
155+
156+
dd->menu = menu;
157+
return dd;
158+
}
159+
};*/

src/Client/Window.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,5 +661,9 @@ class Config : public Window
661661
menu->addChild(GP);
662662
menu->addChild(lED);
663663
menu->addChild(ED);
664+
665+
auto discord = CCMenuItemSpriteExtra::create(CCSprite::createWithSpriteFrameName("gj_discordIcon_001.png"), menu, nullptr); // https://discord.gg/DfQSTEnQKK
666+
discord->setPosition(ccp(menu->getContentSize().width, 0) + ccp(-10, 12));
667+
menu->addChild(discord);
664668
}
665669
};

src/Hacks/PracticeAlert.cpp

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
using namespace geode::prelude;
66
7-
class $modify (AlertPauseLayer, PauseLayer)
7+
class $modify (PauseLayer)
88
{
99
void onPrac(float dt)
1010
{
@@ -13,17 +13,22 @@ class $modify (AlertPauseLayer, PauseLayer)
1313
1414
void onPracticeMode(cocos2d::CCObject* sender)
1515
{
16-
//create(FLAlertLayerProtocol* p0, char const* p1, gd::string p2, char const* p3, char const* p4)
17-
auto al = FLAlertLayer::create(this, "");
16+
if (PlayLayer::get()->m_isPracticeMode)
17+
{ PlayLayer::get()->resetLevelFromStart(); PlayLayer::get()->togglePracticeMode(false); PlayLayer::get()->pauseGame(false); return; }
18+
1819
19-
al->show();
2020
geode::createQuickPopup(
2121
"Practice Mode",
22-
"Are you sure you want to enter\n<cg>practice mode</c>",
22+
"Are you sure you want to\nenter <cg>practice mode</c>?",
2323
"Cancel", "Practice",
24-
[](auto tis, bool btn2) {
24+
[](FLAlertLayer* tis, bool btn2) {
25+
log::info("click practice");
26+
2527
if (btn2) {
26-
tis->scheduleOnce(schedule_selector(AlertPauseLayer::onPrac), 1.0f);
28+
log::info("right btn");
29+
30+
PlayLayer::get()->togglePracticeMode(true);
31+
PlayLayer::get()->pauseGame(false);
2732
}
2833
}
2934
);

0 commit comments

Comments
 (0)