how's this

This commit is contained in:
Justin 2024-11-18 20:02:16 -05:00 committed by GitHub
parent 1f3b2145e1
commit 00fa3b6236
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,20 +24,18 @@ void CopyButtonSettingNode::onCopy(CCObject*) {
});
});
std::stringstream ss;
std::string modsList;
using namespace std::string_view_literals;
for (int i = 0; i < mods.size(); i++) {
auto& mod = mods[i];
ss << fmt::format("{} | [{}] {}",
modsList += fmt::format("{} | [{}] {}{}",
mod->isEnabled() ? "x"sv :
mod->hasLoadProblems() ? "!"sv :
mod->targetsOutdatedVersion() ? "*"sv :
" "sv,
mod->getVersion().toVString(), mod->getID()
mod->getVersion().toVString(), mod->getID(),
i < mods.size() ? "\n" : ""
);
if (i != mods.size() - 1) {
ss << "\n";
}
}
clipboard::write(ss.str());