Skip to content

Commit

Permalink
add some braces around if
Browse files Browse the repository at this point in the history
  • Loading branch information
RayDeeUx authored Jan 14, 2025
1 parent fc98d93 commit e583a2d
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions loader/src/loader/SettingNodeV3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,23 @@ void SettingNodeV3::updateState(CCNode* invoker) {

void SettingNodeV3::onDescription(CCObject*) {
auto title = m_impl->setting->getDisplayName();
if (!m_impl->setting->getScrollableDescription()) FLAlertLayer::create(
nullptr,
title.c_str(),
m_impl->setting->getDescription().value_or("No description provided"),
"OK", nullptr,
clamp(title.size() * 16, 300, 400)
)->show();
else FLAlertLayer::create(
nullptr,
title.c_str(),
m_impl->setting->getDescription().value_or("No description provided"),
"OK", nullptr,
420.f, true, 320.f, 1.0f // params in order: width, scrollable bool, height, textScale
)->show();
if (!m_impl->setting->getScrollableDescription()) {
FLAlertLayer::create(
nullptr,
title.c_str(),
m_impl->setting->getDescription().value_or("No description provided"),
"OK", nullptr,
clamp(title.size() * 16, 300, 400)
)->show();
} else {
FLAlertLayer::create(
nullptr,
title.c_str(),
m_impl->setting->getDescription().value_or("No description provided"),
"OK", nullptr,
420.f, true, 320.f, 1.0f // params in order: width, scrollable bool, height, textScale
)->show();
}
}
void SettingNodeV3::onReset(CCObject*) {
createQuickPopup(
Expand Down

0 comments on commit e583a2d

Please sign in to comment.