diff --git a/tutorials/touchpriority.md b/tutorials/touchpriority.md index 9355f66..a4d31d8 100644 --- a/tutorials/touchpriority.md +++ b/tutorials/touchpriority.md @@ -1,6 +1,6 @@ # Touch Priority -You probably had this issue of "Why does my button not wowrk?" whenever you added a button into a popup before. If not, consider yourself lucky. This tutorial will cover how Geometry Dash handles touch priority, and how you should use it. +You probably had this issue of "Why does my button not work?" whenever you added a button into a popup before. If not, consider yourself lucky. This tutorial will cover how Geometry Dash handles touch priority, and how you should use it. ## What is touch priority? @@ -34,6 +34,6 @@ If your popup subclasses `geode::Popup<>`, the registering and unregistering is If you're adding new touch layers after the initiation has been done, you can again call `geode::cocos::handleTouchPriority` for redoing the touch priorities for the new layers. -If you're not using `geode::Popup<>` class and directly subclassing `FLAlertLayer` instead, you should call `CCTouchDispatcher::registerForcePrio` inside your init. The `FLAlertLayer::registerWithTouchDispatcher` handles the delegate, and `~FLAlertLayer` handles unregistering of the force priority. +If you're not using `geode::Popup<>` class and directly subclassing `FLAlertLayer` instead, you should call `FLAlertLayer::int(int opacity)` inside your init. This will handle the registering of the force priority, along with creating the `m_mainLayer`. The `FLAlertLayer::registerWithTouchDispatcher` handles the delegate, and `~FLAlertLayer` handles unregistering of the force priority. If you don't want to use the geode utility and set the priorities manually, you can call `CCLayer::setTouchPriority`/`CCMenu::setHandlerPriority` on your layer with the `CCTouchDispatcher::getTargetPrio` value. \ No newline at end of file