Skip to content

Commit

Permalink
i should just give up, ill never achieve anything
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSillyDoggo committed Nov 14, 2024
1 parent 2cdda2c commit eefb282
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 18 deletions.
39 changes: 22 additions & 17 deletions src/Client/AndroidBall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ void AndroidBall::UpdateVisible(bool i)

AndroidBall::~AndroidBall()
{
instance = nullptr;
if (instance == this)
instance = nullptr;
}

float AndroidBall::clampf(float v, float min, float max)
Expand Down Expand Up @@ -331,38 +332,42 @@ class $modify (AppDelegate)
return; // fixes texture ldr

if (auto ball = newScene->getChildByType<AndroidBall>(0))
ball->removeFromParent();

newScene->addChild(AndroidBall::create());

if (auto shop = newScene->getChildByType<GJShopLayer>(0))
{
cocos::handleTouchPriority(shop);
AndroidBall::instance = ball;

return;
}

auto ball = AndroidBall::create();

newScene->addChild(ball);
}
};

void QOLModTouchDispatcher::touches(CCSet* touches, CCEvent* event, unsigned int type)
{
bool thIgn;
bool sendToGame = true;

if (AndroidUI::instance)
return CCTouchDispatcher::touches(touches, event, type);

if (AndroidBall::get())
if (touches)
{
auto t = as<CCTouch*>(touches->anyObject());
if (auto ball = AndroidBall::get())
{
auto t = as<CCTouch*>(touches->anyObject());

if (type == ccTouchType::CCTOUCHBEGAN)
thIgn = AndroidBall::get()->_ccTouchBegan(t, event);
if (type == ccTouchType::CCTOUCHBEGAN)
sendToGame = !ball->_ccTouchBegan(t, event);

if (type == ccTouchType::CCTOUCHMOVED)
thIgn = AndroidBall::get()->_ccTouchMoved(t, event);
if (type == ccTouchType::CCTOUCHMOVED)
sendToGame = !ball->_ccTouchMoved(t, event);

if (type == ccTouchType::CCTOUCHENDED)
thIgn = AndroidBall::get()->_ccTouchEnded(t, event);
if (type == ccTouchType::CCTOUCHENDED)
sendToGame = !ball->_ccTouchEnded(t, event);
}
}

if (!thIgn)
if (sendToGame)
CCTouchDispatcher::touches(touches, event, type);
}
6 changes: 5 additions & 1 deletion src/Client/AndroidUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,11 @@ void AndroidUI::goToPage(int p, bool transition)

void AndroidUI::onClose(CCObject* sender)
{
this->removeFromParent();
log::info("CLOSEDS ETHLOSDFS");

FLAlertLayer::create("ADSSYFHSDFDS", "ADASD", "OK")->show();

// this->removeFromParent();
}

CCAction* AndroidUI::getEnterAction(CCNode* panel)
Expand Down

4 comments on commit eefb282

@ALEXGEDEE
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is bro babbling about

@ALEXGEDEE
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait waht

@ALEXGEDEE
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It saves my comment in discord???

@ALEXGEDEE
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Real taxes evasion 🤑🤑🤑

Please sign in to comment.