Skip to content

Add quick layer push util#2076

Open
BlueWitherer wants to merge 4 commits into
geode-sdk:mainfrom
BlueWitherer:push-scene-util
Open

Add quick layer push util#2076
BlueWitherer wants to merge 4 commits into
geode-sdk:mainfrom
BlueWitherer:push-scene-util

Conversation

@BlueWitherer
Copy link
Copy Markdown
Contributor

@BlueWitherer BlueWitherer commented May 14, 2026

Add a convenient one-line util function to push a scene with your CCLayer without having to create a whole new scene() function and pushing it yourself.

Simply provide a pointer to the layer with your create() method.

geode::pushSceneWithLayer(MyLayer::create());

This will automatically create a new CCScene and push it with a 0.5-second long transition fade.

The intention is simply to help reduce boilerplate in mods' UI code!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants