Fixed the touch priority of the settings buttons (#1079)
Some checks are pending
Build Binaries / Build Windows (push) Waiting to run
Build Binaries / Build macOS (push) Waiting to run
Build Binaries / Build Android (64-bit) (push) Waiting to run
Build Binaries / Build Android (32-bit) (push) Waiting to run
Build Binaries / Publish (push) Blocked by required conditions

* Fixed the touch priority of the settings buttons

* Added a touch priority overwrite for the apply button
This commit is contained in:
SMJS 2024-09-13 20:47:08 +02:00 committed by GitHub
parent 00e0600d11
commit b3d54747bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -83,11 +83,6 @@ bool ModSettingsPopup::setup(Mod* mod) {
else {
node = UnresolvedCustomSettingNodeV3::create(key, mod, layerSize.width);
}
// auto separator = CCLayerColor::create({ 0, 0, 0, 50 }, layerSize.width, 1.f);
// separator->setOpacity(bg ? 100 : 50);
// separator->ignoreAnchorPointForPosition(false);
// bg->addChildAtPosition(separator, Anchor::Bottom, ccp(0, 0), ccp(.5f, .5f));
m_settings.push_back(node);
m_list->m_contentLayer->addChild(node);
@ -102,6 +97,11 @@ bool ModSettingsPopup::setup(Mod* mod) {
);
m_list->moveToTop();
const int buttonPriority = m_list->getTouchPriority() - 1;
m_buttonMenu->setTouchPriority(buttonPriority);
searchContainer->setTouchPriority(buttonPriority);
layerBG->addChildAtPosition(m_list, Anchor::BottomLeft);
// layer borders
@ -119,6 +119,7 @@ bool ModSettingsPopup::setup(Mod* mod) {
m_applyMenu->setContentWidth(150);
m_applyMenu->setLayout(RowLayout::create());
m_applyMenu->getLayout()->ignoreInvisibleChildren(true);
m_applyMenu->setTouchPriority(buttonPriority);
auto restartBtnSpr = createGeodeButton("Restart Now", true);
restartBtnSpr->setScale(.6f);