fix some touch prio issues in ModsLayer

This commit is contained in:
Fleeym 2024-06-08 13:02:41 +03:00
parent 5388a1d68a
commit e910645cb8
2 changed files with 4 additions and 0 deletions
loader/src/ui/mods

View file

@ -416,6 +416,8 @@ bool ModsLayer::init() {
mainTabs->setContentWidth(tabsTop->getContentWidth() - 45);
mainTabs->setAnchorPoint({ .5f, .0f });
mainTabs->setPosition(m_frame->convertToWorldSpace(tabsTop->getPosition() + ccp(0, 8)));
// Increment touch priority so the mods in the list don't override
mainTabs->setTouchPriority(-150);
for (auto item : std::initializer_list<std::tuple<const char*, const char*, ModListSource*, const char*>> {
{ "download.png"_spr, "Installed", InstalledModListSource::get(InstalledModListType::All), "installed-button" },

View file

@ -210,6 +210,8 @@ bool ModList::init(ModListSource* src, CCSize const& size) {
searchFiltersMenu->setContentWidth(size.width - m_searchInput->getScaledContentWidth() - 5);
searchFiltersMenu->setAnchorPoint({ 1, .5f });
searchFiltersMenu->setScale(.75f);
// Set higher prio to not let list items override touch
searchFiltersMenu->setTouchPriority(-150);
auto sortSpr = GeodeSquareSprite::createWithSpriteFrameName("GJ_sortIcon_001.png");
auto sortBtn = CCMenuItemSpriteExtra::create(