diff --git a/changelog.md b/changelog.md index aeedd86..07b308b 100644 --- a/changelog.md +++ b/changelog.md @@ -7,6 +7,7 @@ - ~~Added Noclip Deaths and Noclip Accuracy~~ it's delayed because this shits annoying to fix - Added Alerts to the text bypasses to let the user know that they can crash - Added Instant Restart +- Added Transition Customizer - Fixed Solid Wave Trail white being broken - Temporarily removed thicker hitboxes due to lag :( diff --git a/src/Client/Window.h b/src/Client/Window.h index ee73939..fcb8f0b 100644 --- a/src/Client/Window.h +++ b/src/Client/Window.h @@ -1267,8 +1267,6 @@ class Universal : public Window auto pos = ccp(menu->getContentSize().width, 0) + ccp(-58, 22); - return; - auto btnS = ButtonSprite::create("Transition\nCustomizer", 90, false, "bigFont.fnt", "GJ_button_05.png", 35, 0.75f); as(btnS->getChildren()->objectAtIndex(0))->setScale(0.375f); as(btnS->getChildren()->objectAtIndex(0))->setAlignment(CCTextAlignment::kCCTextAlignmentCenter); diff --git a/src/Hacks/TransitionTimeCustomiser.cpp b/src/Hacks/TransitionTimeCustomiser.cpp index e673368..95b0d9f 100644 --- a/src/Hacks/TransitionTimeCustomiser.cpp +++ b/src/Hacks/TransitionTimeCustomiser.cpp @@ -6,6 +6,8 @@ using namespace geode::prelude; +//{"Fade", "Cross Fade", "Fade Bottom Left", "Fade Top Right", "Fade Up", "Fade Down", "Flip Angular", "Flip X", "Flip Y", "Zoom Flip Angular" "Zoom Flip X", "Zoom Flip Y", "Jump Zoom", "Move In Top", "Move In Bottom", "Move In Left", "Move In Right", "Rotate Zoom", "Shrink Grow", "Slide In Top", "Slide In Bottom", "Slide In Left", "Slide In Right", "Split Rows", "Split Columns", "Tiles"} + CCScene* getSceneForSel(int i, float f, CCScene* s) { AppDelegate::get()->willSwitchToScene(s); @@ -77,6 +79,6 @@ class $modify (cocos2d::CCTransitionFade) mod = 0; } - return as(getSceneForSel(0, duration * mod, scene));// /*base_cast(CCTransitionFlipY::create(duration * mod, scene)); */CCTransitionFade::create(duration * mod, scene); + return as(getSceneForSel(Mod::get()->getSavedValue("transition", 0), duration * mod, scene));// /*base_cast(CCTransitionFlipY::create(duration * mod, scene)); */CCTransitionFade::create(duration * mod, scene); } -}; \ No newline at end of file +}; diff --git a/src/Layers/SetupTransitionCustomizer.h b/src/Layers/SetupTransitionCustomizer.h index aceeebb..d8568b5 100644 --- a/src/Layers/SetupTransitionCustomizer.h +++ b/src/Layers/SetupTransitionCustomizer.h @@ -8,6 +8,14 @@ using namespace geode::prelude; class SetupTransCustom : public FLAlertLayer { public: + std::vector transNames = {"Fade", "Cross Fade", "Fade Bottom Left", "Fade Top Right", "Fade Up", "Fade Down", "Flip Angular", "Flip X", "Flip Y", "Zoom Flip Angular", "Zoom Flip X", "Zoom Flip Y", "Jump Zoom", "Move In Top", "Move In Bottom", "Move In Left", "Move In Right", "Rotate Zoom", "Shrink Grow", "Slide In Top", "Slide In Bottom", "Slide In Left", "Slide In Right", "Split Rows", "Split Columns", "Tiles"}; + + CCMenuItemSpriteExtra* left; + CCMenuItemSpriteExtra* right; + CCLabelBMFont* label; + + int selMode; + void onClose(CCObject*) { this->removeFromParent(); @@ -18,11 +26,37 @@ class SetupTransCustom : public FLAlertLayer onClose(nullptr); } + void onLeft(CCObject*) + { + selMode--; + + left->setVisible(selMode != 0); + right->setVisible(selMode != transNames.size() - 1); + label->setString(transNames[selMode].c_str()); + label->limitLabelWidth(235, 1, 0.1f); + + Mod::get()->setSavedValue("transition", selMode); + } + + void onRight(CCObject*) + { + selMode++; + + left->setVisible(selMode != 0); + right->setVisible(selMode != transNames.size() - 1); + label->setString(transNames[selMode].c_str()); + label->limitLabelWidth(235, 1, 0.1f); + + Mod::get()->setSavedValue("transition", selMode); + } + bool init() { if (!FLAlertLayer::init(0)) return false; + selMode = Mod::get()->getSavedValue("transition", 0); + this->runAction(CCFadeTo::create(1, 100)); //this->setTouchEnabled(true); this->setKeypadEnabled(true); @@ -44,7 +78,7 @@ class SetupTransCustom : public FLAlertLayer panel->setID("panel"); l->addChild(panel); - auto title = CCLabelBMFont::create("Setup Transition Customizer", "bigFont.fnt"); + auto title = CCLabelBMFont::create("Transition Customizer", "bigFont.fnt"); title->setPosition(l->getContentSize() / 2 + ccp(0, 90)); title->setOpacity(100); title->setScale(0.5f); @@ -54,9 +88,27 @@ class SetupTransCustom : public FLAlertLayer ok->setPosition(l->getContentSize() / 2 + ccp(0, -82)); l->addChild(ok); - auto dd = Dropdown::create({130, 30}, {"Fade", "Cross Fade", "Fade Bottom Left", "Fade Top Right", "Fade Up", "Fade Down", "Flip Angular", "Flip X", "Flip Y", "Jump Zoom", "Move In Top", "Move In Bottom", "Move In Left", "Move In Right", "Rotate Zoom", "Shrink Grow", "Slide In Top", "Slide In Bottom", "Slide In Left", "Slide In Right", "Split Rows", "Split Columns", "Tiles"}, nullptr); - dd->setTouchPriority(-550); - l->addChild(dd); + auto leftSpr = CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png"); + left = CCMenuItemSpriteExtra::create(leftSpr, this, menu_selector(SetupTransCustom::onLeft)); + left->setPosition(l->getContentSize() / 2 + ccp(-140, 0)); + left->setVisible(selMode != 0); + l->addChild(left); + + auto rightSpr = CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png"); + rightSpr->setFlipX(true); + right = CCMenuItemSpriteExtra::create(rightSpr, this, menu_selector(SetupTransCustom::onRight)); + right->setPosition(l->getContentSize() / 2 + ccp(140, 0)); + right->setVisible(selMode != transNames.size() - 1); + l->addChild(right); + + label = CCLabelBMFont::create(transNames[selMode].c_str(), "bigFont.fnt"); + label->setPosition(l->getContentSize() / 2); + label->limitLabelWidth(235, 1, 0.1f); + l->addChild(label); + + //auto dd = Dropdown::create({130, 30}, , nullptr); + //dd->setTouchPriority(-550); + //l->addChild(dd); this->addChild(l);