From ef2cf74e100cfe08aea24a0fc52bea67cb77866a Mon Sep 17 00:00:00 2001 From: mat <26722564+matcool@users.noreply.github.com> Date: Sat, 23 Nov 2024 16:34:49 -0300 Subject: [PATCH] change doc links, add section abt getChildOfType --- tutorials/migrate-v4.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tutorials/migrate-v4.md b/tutorials/migrate-v4.md index b324352..f7aee6d 100644 --- a/tutorials/migrate-v4.md +++ b/tutorials/migrate-v4.md @@ -1,6 +1,7 @@ # Migrating from Geode v3.x to v4.0 ## Changes to `Result` +[Link to the full docs](https://github.com/geode-sdk/result?tab=readme-ov-file#result) * Result type has been rewritten from scratch, and it is now shared with many parts of the Geode codebase (Geode itself, TulipHook and matjson). * Many methods removed or renamed: * `value()` -> `unwrap()` @@ -56,8 +57,14 @@ static Result> parse(std::string const&, std::string * No longer in cocos2d namespace * Can now be found in `Geode/ui/Layout.hpp` +## Changes to `getChildOfType` +* Deprecated in 3.9.0, and now removed, use `CCNode::getChildByType(int index)` instead: +* `getChildOfType(node, 1)` -> `node->getChildByType(1)` +* You can use this regex pattern to quickly find and replace: + * `getChildOfType<(.+?)>\((.+?),\s*(.+?)\)` and replace with `$2->getChildByType<$1>($3)` + ## Changes to `matjson` -[Link to the full docs](https://github.com/geode-sdk/json) +[Link to the full docs](https://github.com/geode-sdk/json?tab=readme-ov-file#matjson) * Entire library rewritten to use `geode::Result` * See result section for tips on how to use Geode's Result class * Methods are now camel case to fit with rest of Geode's codebase