Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 committed Jan 30, 2024
1 parent d2fa522 commit b7aa481
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tutorials/touchpriority.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `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're not using `geode::Popup<>` class and directly subclassing `FLAlertLayer` instead, you should call `FLAlertLayer::init(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.

0 comments on commit b7aa481

Please sign in to comment.