Skip to content

Commit

Permalink
Update main.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiLko authored Feb 11, 2024
1 parent c445efa commit 5243dc5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class RecordLayer : public geode::Popup<std::string const&> {
this,
menu_selector(RecordLayer::discordPopup)
);
btn->setPosition(winSize/2.f-ccp(-m_size.width/2.f,m_size.height/2.f) + ccp(-325, 20));
btn->setPosition(winSize/2.f-ccp(-m_size.width/2.f,m_size.height/2.f) + ccp(-310, 20));
menu->addChild(btn);

if (!isAndroid) {
Expand Down Expand Up @@ -311,7 +311,7 @@ class RecordLayer : public geode::Popup<std::string const&> {
void discordPopup(CCObject*) {
geode::createQuickPopup(
"Join Discord",
"Join the <cb>Discord</c> server?",
"Join the <cb>Discord</c> server?\n(<cl>discord.gg/dwk5whfeu2</c>)",
"No", "Yes",
[this](auto, bool btn2) {
if (btn2) {
Expand Down Expand Up @@ -800,6 +800,7 @@ void addLabel(const char* text) {

class $modify(GJBaseGameLayer) {
void handleButton(bool holding, int button, bool player1) {
if (!isAndroid) GJBaseGameLayer::handleButton(holding,button,player1);
if (isAndroid) {
if (recorder.state == state::recording) {
GJBaseGameLayer::handleButton(holding,button,player1);
Expand Down Expand Up @@ -829,7 +830,7 @@ class $modify(GJBaseGameLayer) {
recorder.recordAction(holding, button, player1, frame, this, p1, p2);
} else if (recorder.state == state::playing) {
if (androidAction != nullptr) {
if (!androidAction->posOnly && androidAction->p1.xPos != 0 && androidAction->frame == recorder.currentFrame()) {
if (!androidAction->posOnly && androidAction->p1.xPos != 0) {
if (!areEqual(this->m_player1->getPositionX(), androidAction->p1.xPos) ||
!areEqual(this->m_player1->getPositionY(), androidAction->p1.yPos))
this->m_player1->setPosition(cocos2d::CCPoint(androidAction->p1.xPos, androidAction->p1.yPos));
Expand Down Expand Up @@ -884,7 +885,6 @@ class $modify(GJBaseGameLayer) {
int frame = recorder.currentFrame();
recorder.recordAction(holding, button, player1, frame, this, p1, p2);
}
if (!isAndroid) GJBaseGameLayer::handleButton(holding,button,player1);
}

int getPlayer1(int p1, GJBaseGameLayer* bgl) {
Expand Down

0 comments on commit 5243dc5

Please sign in to comment.