| 119 | } |
| 120 | |
| 121 | void DropDownLayer::hideLayer() |
| 122 | { |
| 123 | //const auto& winSize = Director::getInstance()->getWinSize(); |
| 124 | |
| 125 | this->runAction(FadeTo::create(0.5, 0)); |
| 126 | this->_dropLayer->runAction( |
| 127 | Sequence::create( |
| 128 | EaseInOut::create(MoveTo::create(0.5f, {0, this->_dropLayer->getContentSize().height}), 2), |
| 129 | CallFunc::create([&]() |
| 130 | { |
| 131 | Director::getInstance()->getEventDispatcher()->removeEventListenersForTarget(this); |
| 132 | this->removeFromParent(); |
| 133 | }), |
| 134 | nullptr |
| 135 | ) |
| 136 | ); |
| 137 | } |
| 138 | |
| 139 | void DropDownLayer::hideBackButton() { |
| 140 | _backBtn->setEnabled(false); |