mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-27 01:45:35 -05:00
replace uses of touch priority and registerWithTouchDispatcher
This commit is contained in:
parent
e00b3a6a7f
commit
f78969ca83
7 changed files with 7 additions and 14 deletions
|
@ -33,8 +33,7 @@ namespace geode {
|
||||||
m_buttonMenu->setZOrder(100);
|
m_buttonMenu->setZOrder(100);
|
||||||
m_mainLayer->addChild(m_buttonMenu);
|
m_mainLayer->addChild(m_buttonMenu);
|
||||||
|
|
||||||
cocos2d::CCDirector::sharedDirector()->getTouchDispatcher()->incrementForcePrio(2);
|
this->setTouchEnabled(true);
|
||||||
this->registerWithTouchDispatcher();
|
|
||||||
|
|
||||||
auto closeSpr = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
|
auto closeSpr = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
|
||||||
closeSpr->setScale(.8f);
|
closeSpr->setScale(.8f);
|
||||||
|
|
|
@ -51,8 +51,7 @@ namespace geode {
|
||||||
|
|
||||||
this->updateLabel();
|
this->updateLabel();
|
||||||
|
|
||||||
cocos2d::CCDirector::sharedDirector()->getTouchDispatcher()->incrementForcePrio(2);
|
this->setTouchEnabled(true);
|
||||||
this->registerWithTouchDispatcher();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,8 +91,7 @@ bool ModInfoPopup::init(ModInfo const& info, ModListLayer* list) {
|
||||||
versionLabel->setColor({0, 255, 0});
|
versionLabel->setColor({0, 255, 0});
|
||||||
m_mainLayer->addChild(versionLabel);
|
m_mainLayer->addChild(versionLabel);
|
||||||
|
|
||||||
CCDirector::sharedDirector()->getTouchDispatcher()->incrementForcePrio(2);
|
this->setTouchEnabled(true);
|
||||||
this->registerWithTouchDispatcher();
|
|
||||||
|
|
||||||
m_detailsArea = MDTextArea::create(
|
m_detailsArea = MDTextArea::create(
|
||||||
(info.details() ? info.details().value() : "### No description provided."),
|
(info.details() ? info.details().value() : "### No description provided."),
|
||||||
|
|
|
@ -107,8 +107,7 @@ protected:
|
||||||
);
|
);
|
||||||
m_menu->addChild(m_resetBtn);
|
m_menu->addChild(m_resetBtn);
|
||||||
|
|
||||||
CCDirector::sharedDirector()->getTouchDispatcher()->incrementForcePrio(2);
|
m_menu->setTouchEnabled(true);
|
||||||
m_menu->registerWithTouchDispatcher();
|
|
||||||
|
|
||||||
if (!this->setup(setting, width)) return false;
|
if (!this->setup(setting, width)) return false;
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,7 @@ bool ModSettingsPopup::setup(Mod* mod) {
|
||||||
|
|
||||||
auto layer = ScrollLayer::create(layerSize);
|
auto layer = ScrollLayer::create(layerSize);
|
||||||
layer->setPosition(winSize / 2 - layerSize / 2);
|
layer->setPosition(winSize / 2 - layerSize / 2);
|
||||||
|
layer->setTouchEnabled(true);
|
||||||
CCDirector::sharedDirector()->getTouchDispatcher()->incrementForcePrio(2);
|
|
||||||
layer->registerWithTouchDispatcher();
|
|
||||||
|
|
||||||
float totalHeight = .0f;
|
float totalHeight = .0f;
|
||||||
std::vector<CCNode*> rendered;
|
std::vector<CCNode*> rendered;
|
||||||
|
|
|
@ -128,8 +128,7 @@ bool MDTextArea::init(std::string const& str, CCSize const& size) {
|
||||||
m_content->setZOrder(2);
|
m_content->setZOrder(2);
|
||||||
m_scrollLayer->m_contentLayer->addChild(m_content);
|
m_scrollLayer->m_contentLayer->addChild(m_content);
|
||||||
|
|
||||||
CCDirector::sharedDirector()->getTouchDispatcher()->incrementForcePrio(2);
|
m_scrollLayer->setTouchEnabled(true);
|
||||||
m_scrollLayer->registerWithTouchDispatcher();
|
|
||||||
|
|
||||||
this->addChild(m_scrollLayer);
|
this->addChild(m_scrollLayer);
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,7 @@ bool Scrollbar::init(CCScrollLayerExt* target) {
|
||||||
this->addChild(m_track);
|
this->addChild(m_track);
|
||||||
this->addChild(m_thumb);
|
this->addChild(m_thumb);
|
||||||
|
|
||||||
this->registerWithTouchDispatcher();
|
this->setTouchEnabled(true);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue