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