| 36 | } |
| 37 | |
| 38 | void GameToolbox::popSceneWithTransition(float duration, popTransition type) { |
| 39 | auto dir = AltDirector::getInstance(); |
| 40 | |
| 41 | if (dir->getRunningScene() != nullptr) { |
| 42 | dir->popScene(); |
| 43 | |
| 44 | unsigned int c = dir->getScenesStack().size(); |
| 45 | if (c == 0) dir->end(); |
| 46 | else { |
| 47 | dir->setSendCleanupToScene(true); |
| 48 | auto scene = dir->getScenesStack().back(); |
| 49 | |
| 50 | switch (type) { |
| 51 | case popTransition::kTransitionShop: |
| 52 | dir->replaceScene(TransitionMoveInB::create(duration, scene)); // i will change this transition later / att: Sai |
| 53 | break; |
| 54 | default: |
| 55 | dir->replaceScene(TransitionFade::create(duration, scene)); |
| 56 | break; |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | // no more "GameToolbox::getTextureString" in Label::createWithBMFont |
| 63 | Label* GameToolbox::createBMFont(std::string text, std::string font, int width, TextHAlignment alignment) { |
nothing calls this directly
no test coverage detected