|
6 | 6 | #include "RLRouletteInfoLayer.hpp" |
7 | 7 | #include "../manager/RouletteManager.hpp" |
8 | 8 | #include "../../custom_nodes/RLDifficultyNode.hpp" |
| 9 | +#include "../../custom_layers/RLDifficultySelectLayer.hpp" |
9 | 10 | #include "../../utils.hpp" |
10 | 11 |
|
11 | 12 | #include <Geode/Geode.hpp> |
@@ -386,8 +387,7 @@ void RLRouletteLayer::onInfoButton(CCObject*) |
386 | 387 | m_roulette_info_layer->show(); |
387 | 388 | } |
388 | 389 | else |
389 | | - // this->addChild(TextAlertPopup::create("You are currently in a game of roulette!", 1.2f, .8f, 1, "bigFont.fnt")); |
390 | | - Notification::create("You are currently in a game of roulette!", NotificationIcon::Error, .7f)->show(); |
| 390 | + rl::utils::createNotificationToast(this, "You are currently in a game of roulette!", .5f, 85.f); |
391 | 391 | } |
392 | 392 |
|
393 | 393 | void RLRouletteLayer::onDifficultyButton(CCObject* sender) |
@@ -475,8 +475,7 @@ void RLRouletteLayer::onLevelInfo(CCObject* sender) |
475 | 475 | } |
476 | 476 |
|
477 | 477 | clipboard::write(text); |
478 | | - // this->addChild(TextAlertPopup::create("Copied to Clipboard", .5f, .6f, 1, "bigFont.fnt")); |
479 | | - Notification::create("Copied to Clipboard", NotificationIcon::Success)->show(); |
| 478 | + rl::utils::createNotificationToast(this, "Copied to Clipboard", .5f, 85.f); |
480 | 479 | } |
481 | 480 |
|
482 | 481 | void RLRouletteLayer::onPlayButton(CCObject*) |
@@ -535,16 +534,7 @@ void RLRouletteLayer::onNextButton(CCObject*) |
535 | 534 | ); |
536 | 535 | } |
537 | 536 | else |
538 | | - // this->addChild(TextAlertPopup::create( |
539 | | - // std::format( |
540 | | - // "You need to get at least {}%!", static_cast<int>(g_rouletteManager.levelPercentageGoal) |
541 | | - // ), 1.2f, .8f, 1, "bigFont.fnt" |
542 | | - // )); |
543 | | - Notification::create( |
544 | | - fmt::format("You need to get at least {}%!", g_rouletteManager.levelPercentageGoal), |
545 | | - NotificationIcon::Error, |
546 | | - .7f |
547 | | - )->show(); |
| 537 | + rl::utils::createNotificationToast(this, fmt::format("You need to get at least {}%!", g_rouletteManager.levelPercentageGoal), .5f, 85.f); |
548 | 538 | } |
549 | 539 |
|
550 | 540 | void RLRouletteLayer::onResetButton(CCObject*) |
@@ -599,12 +589,7 @@ void RLRouletteLayer::onSkipButton(CCObject*) |
599 | 589 | ); |
600 | 590 | } |
601 | 591 | else |
602 | | - // this->addChild( |
603 | | - // TextAlertPopup::create( |
604 | | - // "You don't have any skips left!", 1.2f, .8f, 1, "bigFont.fnt" |
605 | | - // ) |
606 | | - // ); |
607 | | - Notification::create("You don't have any skips left!", NotificationIcon::Error, .7f)->show(); |
| 592 | + rl::utils::createNotificationToast(this, "You don't have any skips left!", .5f, 85.f); |
608 | 593 | } |
609 | 594 |
|
610 | 595 | void RLRouletteLayer::finishLevelRoulette() |
|
0 commit comments