-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
831f740
commit c1809e1
Showing
6 changed files
with
141 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#include "../Client/Dropdown.h" | ||
#include <Geode/ui/GeodeUI.hpp> | ||
|
||
using namespace geode::prelude; | ||
|
||
class SetupTransCustom : public FLAlertLayer | ||
{ | ||
public: | ||
void onClose(CCObject*) | ||
{ | ||
this->removeFromParent(); | ||
} | ||
|
||
virtual void keyBackClicked() | ||
{ | ||
onClose(nullptr); | ||
} | ||
|
||
bool init() | ||
{ | ||
if (!FLAlertLayer::init(0)) | ||
return false; | ||
|
||
this->runAction(CCFadeTo::create(1, 100)); | ||
//this->setTouchEnabled(true); | ||
this->setKeypadEnabled(true); | ||
|
||
auto l = CCMenu::create(); | ||
l->setContentSize(ccp(330, 210)); | ||
l->setPosition(CCDirector::get()->getWinSize() / 2); | ||
l->ignoreAnchorPointForPosition(false); | ||
l->setTouchPriority(-514); | ||
|
||
std::stringstream ss; | ||
ss << "GJ_square0"; | ||
ss << Mod::get()->getSavedValue<int>("theme", 5); | ||
ss << ".png"; | ||
|
||
auto panel = CCScale9Sprite::create(ss.str().c_str()); | ||
panel->setContentSize(l->getContentSize()); | ||
panel->setAnchorPoint(ccp(0, 0)); | ||
panel->setID("panel"); | ||
l->addChild(panel); | ||
|
||
auto title = CCLabelBMFont::create("Setup Transition Customizer", "bigFont.fnt"); | ||
title->setPosition(l->getContentSize() / 2 + ccp(0, 90)); | ||
title->setOpacity(100); | ||
title->setScale(0.5f); | ||
l->addChild(title); | ||
|
||
auto ok = CCMenuItemSpriteExtra::create(ButtonSprite::create("OK"), this, menu_selector(SetupTransCustom::onClose)); | ||
ok->setPosition(l->getContentSize() / 2 + ccp(0, -85)); | ||
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); | ||
|
||
this->addChild(l); | ||
|
||
l->setScale(0.1f); | ||
l->runAction(CCEaseElasticOut::create(CCScaleTo::create(1, 1))); | ||
|
||
return true; | ||
} | ||
|
||
static SetupTransCustom* create() | ||
{ | ||
SetupTransCustom* pRet = new SetupTransCustom(); | ||
if (pRet && pRet->init()) { | ||
pRet->autorelease(); | ||
return pRet; | ||
} else { | ||
delete pRet; | ||
return nullptr; | ||
} | ||
} | ||
|
||
static void addToScene() | ||
{ | ||
auto pRet = SetupTransCustom::create(); | ||
|
||
CCScene::get()->addChild(pRet, 99999); | ||
} | ||
}; |