Skip to content

Commit

Permalink
discord server link
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSillyDoggo committed Jan 28, 2024
1 parent 3feb5eb commit b164974
Show file tree
Hide file tree
Showing 7 changed files with 193 additions and 17 deletions.
6 changes: 3 additions & 3 deletions about.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# <cp>QOLMod</c>
# QOLMod

<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

<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>.
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.

While <cp>QOLMod</c> has only a few mods right now, it will be updated regularly future with <cr>more</c> mods.
Join the [Discord Server (https://discord.gg/DfQSTEnQKK)](https://discord.gg/DfQSTEnQKK)
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# 1.1.0

- Added Icon Effects (RGB Icons)
- Created an official [Discord Server](https://discord.gg/DfQSTEnQKK)

# 1.0.3

- Added back the button wheh in gameplay
- Fixed pause crash with speedhack

# 1.0.2

- Fixed crash when playing user levels
Expand Down
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"geode": "2.0.0",
"version": "v1.0.3",
"version": "v1.1.0",
"gd": {
"win": "2.204",
"android": "*"
Expand Down
10 changes: 4 additions & 6 deletions src/Client/AndroidUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,12 @@ class AndroidUI : public cocos2d::CCLayerColor {
{
if (Client::GetModuleEnabled("speedhack-enabled"))
{
try
float v = 1.0f;

if (SpeedhackTop::instance->text.size() != 0 && !SpeedhackTop::instance->text.ends_with("."))
{
v = std::stof(SpeedhackTop::instance->text);
}
catch(const std::exception& e)
{
v = 1.0f;
}

if (v < 0.01f)
v = 0.01f;
Expand Down Expand Up @@ -253,7 +251,7 @@ class AndroidUI : public cocos2d::CCLayerColor {
{
auto menu = CCMenu::create();
menu->setAnchorPoint(ccp(1, 0));
menu->setPosition(ccp(panel->getContentSize().width - 15 + 5, 10));
menu->setPosition(ccp(475 - 15 + 5, 10));
menu->setContentSize(ccp(340, panel->getContentSize().height - 10 - 10));
menu->ignoreAnchorPointForPosition(false);

Expand Down
159 changes: 159 additions & 0 deletions src/Client/Dropdown.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
#include <Geode/Geode.hpp>

using namespace geode::prelude;

class Dropdown : public CCMenu
{
static Dropdown* create(std::vector<std::string> words, CCObject* sender, SEL_MenuHandler event) {
Dropdown *ret = new Dropdown();
if (ret && ret->init(words, sender, event)) {
ret->autorelease();
return ret;
} else {
delete ret;
return nullptr;
}
}

virtual bool init() {
if (!CCNode::init()) {
return false;
}



auto sprite = Sprite::createWithSpriteFrameName("portal_17_extra_2_001.png");
sprite->setPosition(Vec2(0, 0));
addChild(sprite);

// Your additional initialization code here

return true;
}

/*virtual bool onTouchBegan(Touch *touch, Event *event) {
return true;
}*/
};

/*
class Dropdown {
public:
int selected = 0;
CCMenu* menu;
std::vector<std::string> strs;
CCLabelBMFont* lbl;
void onToggle(CCObject* sender) {
auto obj = reinterpret_cast<CCMenuItemSprite*>(sender);
bool expanded = obj->getScaleY() < 0 ? true : false;
#ifdef GEODE_IS_WINDOWS
obj->runAction(CCEaseBackOut::create(CCScaleTo::create(0.5f, 0.75f, (!expanded ? -0.75f : 0.75f))));
#else
obj->runAction(CCScaleTo::create(0.5f, 0.75f, (!expanded ? -0.75f : 0.75f)));
#endif
auto parent = obj->getParent();
auto background = parent->getChildByID("background");
auto ddmenu = parent->getChildByID("dropdown-menu");
int h = ddmenu->getChildrenCount() + 1;
h = expanded ? h : 1;
ddmenu->setVisible(expanded);
background->setContentSize({background->getContentSize().width, (25 / background->getScale()) * h});
}
void onSelect(CCObject* sender) {
auto obj = reinterpret_cast<CCMenuItemSpriteExtra*>(sender);
reinterpret_cast<CCLabelBMFont*>(obj->getParent()->getParent()->getChildByID("selected-label"))->setString((reinterpret_cast<CCLabelBMFont*>(obj->getChildren()->objectAtIndex(0)))->getString());
auto obj2 = reinterpret_cast<CCMenuItemSprite*>(obj->getParent()->getParent()->getChildByID("flip-btn"));
bool expanded = obj2->getScaleY() < 0 ? true : false;
#ifdef GEODE_IS_WINDOWS
obj2->runAction(CCEaseBackOut::create(CCScaleTo::create(0.5f, 0.75f, (!expanded ? -0.75f : 0.75f))));
#else
obj2->runAction(CCScaleTo::create(0.5f, 0.75f, (!expanded ? -0.75f : 0.75f)));
#endif
auto parent = obj2->getParent();
auto background = parent->getChildByID("background");
auto ddmenu = parent->getChildByID("dropdown-menu");
int h = ddmenu->getChildrenCount() + 1;
h = expanded ? h : 1;
ddmenu->setVisible(expanded);
background->setContentSize({background->getContentSize().width, (25 / background->getScale()) * h});
}
static Dropdown* create(std::vector<std::string> strs)
{
Dropdown* dd = new Dropdown();
dd->strs = strs;
CCSize size = {240, 25};
CCMenu* menu = CCMenu::create();
menu->ignoreAnchorPointForPosition(false);
menu->setContentSize(size);
auto background = CCScale9Sprite::create("GJ_square01.png");
background->setScale(0.3f);
background->setContentSize({size.width / background->getScale(), size.height / background->getScale()});
background->setAnchorPoint({0, 1});
background->setPosition(0, size.height);
background->setID("background");
background->setOpacity(100);
background->setColor({0, 0, 0});
menu->addChild(background);
auto spr = CCSprite::createWithSpriteFrameName("edit_upBtn_001.png");
spr->setScale(0.9f);
auto spr2 = CCSprite::createWithSpriteFrameName("edit_upBtn_001.png");
spr2->setScale(0.9f);
spr2->setColor({150, 150, 150});
auto arrowBtn = CCMenuItemSprite::create(spr, spr2, menu, menu_selector(Dropdown::onToggle));
arrowBtn->setPosition(size.width - 15, 25 / 2);
arrowBtn->setID("flip-btn");
arrowBtn->setScale(0.75f);
arrowBtn->setScaleY(-0.75f);
menu->addChild(arrowBtn);
auto lbl = CCLabelBMFont::create(strs[0].c_str(), "bigFont.fnt");
lbl->setScale(0.5f);
lbl->setPosition({size.width / 2 - (arrowBtn->getScaledContentSize().width / 2) - 5, size.height / 2});
lbl->limitLabelWidth(145, 0.6f, 0);
lbl->setID("selected-label");
dd->lbl = lbl;
menu->addChild(lbl);
auto btnMenu = CCMenu::create();
btnMenu->setAnchorPoint({0, 1});
btnMenu->setPosition({0, size.height});
btnMenu->setContentSize({size.width, size.height * strs.size()});
btnMenu->ignoreAnchorPointForPosition(false);
btnMenu->setVisible(false);
btnMenu->setID("dropdown-menu");
for (size_t i = 0; i < strs.size(); i++)
{
auto lbl = CCLabelBMFont::create(strs[i].c_str(), "bigFont.fnt");
lbl->limitLabelWidth(size.width - 20, 0.6f, 0);
auto btn = CCMenuItemSpriteExtra::create(lbl, menu, menu_selector(Dropdown::onSelect));
btn->setPosition({size.width / 2, (background->getScaledContentSize().height - (size.height * i)) + size.height / 2});
btnMenu->addChild(btn);
}
menu->addChild(btnMenu);
dd->menu = menu;
return dd;
}
};*/
4 changes: 4 additions & 0 deletions src/Client/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -661,5 +661,9 @@ class Config : public Window
menu->addChild(GP);
menu->addChild(lED);
menu->addChild(ED);

auto discord = CCMenuItemSpriteExtra::create(CCSprite::createWithSpriteFrameName("gj_discordIcon_001.png"), menu, nullptr); // https://discord.gg/DfQSTEnQKK
discord->setPosition(ccp(menu->getContentSize().width, 0) + ccp(-10, 12));
menu->addChild(discord);
}
};
19 changes: 12 additions & 7 deletions src/Hacks/PracticeAlert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using namespace geode::prelude;
class $modify (AlertPauseLayer, PauseLayer)
class $modify (PauseLayer)
{
void onPrac(float dt)
{
Expand All @@ -13,17 +13,22 @@ class $modify (AlertPauseLayer, PauseLayer)
void onPracticeMode(cocos2d::CCObject* sender)
{
//create(FLAlertLayerProtocol* p0, char const* p1, gd::string p2, char const* p3, char const* p4)
auto al = FLAlertLayer::create(this, "");
if (PlayLayer::get()->m_isPracticeMode)
{ PlayLayer::get()->resetLevelFromStart(); PlayLayer::get()->togglePracticeMode(false); PlayLayer::get()->pauseGame(false); return; }
al->show();
geode::createQuickPopup(
"Practice Mode",
"Are you sure you want to enter\n<cg>practice mode</c>",
"Are you sure you want to\nenter <cg>practice mode</c>?",
"Cancel", "Practice",
[](auto tis, bool btn2) {
[](FLAlertLayer* tis, bool btn2) {
log::info("click practice");
if (btn2) {
tis->scheduleOnce(schedule_selector(AlertPauseLayer::onPrac), 1.0f);
log::info("right btn");
PlayLayer::get()->togglePracticeMode(true);
PlayLayer::get()->pauseGame(false);
}
}
);
Expand Down

0 comments on commit b164974

Please sign in to comment.