mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-23 07:57:51 -05:00
made it slightly better
This commit is contained in:
parent
9a46231420
commit
0da9cef29f
2 changed files with 28 additions and 28 deletions
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 5.9 KiB |
|
@ -714,10 +714,12 @@ void ModsLayer::onSettings(CCObject*) {
|
|||
}
|
||||
|
||||
void ModsLayer::onCopy(CCObject*) {
|
||||
auto text = "No mods installed";
|
||||
auto mods = Loader::get()->getAllMods();
|
||||
if (!mods.empty()) {
|
||||
text = "Mods list copied to clipboard!";
|
||||
if (mods.empty()) {
|
||||
Notification::create("No mods installed", NotificationIcon::Info, 0.6f)->show();
|
||||
return;
|
||||
}
|
||||
|
||||
std::sort(mods.begin(), mods.end(), [](Mod* a, Mod* b) {
|
||||
auto const s1 = a->getID();
|
||||
auto const s2 = b->getID();
|
||||
|
@ -741,10 +743,8 @@ void ModsLayer::onCopy(CCObject*) {
|
|||
}
|
||||
}
|
||||
clipboard::write(ss.str());
|
||||
}
|
||||
|
||||
auto popup = TextAlertPopup::create(text, 0.5f, 0.6f, 150, "bigFont.fnt");
|
||||
this->addChild(popup, 100);
|
||||
Notification::create("Mods list copied to clipboard", NotificationIcon::Info, 0.5f)->show();
|
||||
}
|
||||
|
||||
ModsLayer* ModsLayer::create() {
|
||||
|
|
Loading…
Reference in a new issue