{"id":34631004,"url":"https://github.com/alphalaneous/alphas-geode-utils","last_synced_at":"2026-03-05T23:51:39.588Z","repository":{"id":272827701,"uuid":"917881236","full_name":"Alphalaneous/Alphas-Geode-Utils","owner":"Alphalaneous","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-11T21:16:14.000Z","size":173,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-12T05:52:48.814Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Alphalaneous.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-16T20:22:24.000Z","updated_at":"2026-02-11T21:06:17.000Z","dependencies_parsed_at":"2026-02-15T03:01:07.712Z","dependency_job_id":null,"html_url":"https://github.com/Alphalaneous/Alphas-Geode-Utils","commit_stats":null,"previous_names":["alphalaneous/alphas-geode-utils"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/Alphalaneous/Alphas-Geode-Utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alphalaneous%2FAlphas-Geode-Utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alphalaneous%2FAlphas-Geode-Utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alphalaneous%2FAlphas-Geode-Utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alphalaneous%2FAlphas-Geode-Utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alphalaneous","download_url":"https://codeload.github.com/Alphalaneous/Alphas-Geode-Utils/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alphalaneous%2FAlphas-Geode-Utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29466925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T01:01:38.065Z","status":"online","status_checked_at":"2026-02-15T02:00:07.449Z","response_time":118,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-24T16:36:48.949Z","updated_at":"2026-02-15T03:02:06.277Z","avatar_url":"https://github.com/Alphalaneous.png","language":"C++","readme":"# Alpha's Geode Utils\n\nMiscellaneous Geode utils to make development easier:\n\n## Modifying any CCObject\n\nFamiliar modify syntax as Geode, supporting fields. `class $objectModify(SomeObject)` or `class $nodeModify(SomeNode)`\nYou can name the modified node/object the same way as well `class $objectModify(MySomeObject, SomeObject)` or `class $nodeModify(MySomeNode, SomeNode)`\n\n$nodeModify and $objectModify do the same thing, except $nodeModify is a base of CCNode while $objectModify is a base of CCObject\n\nThere is also $classModify which will use the base class you pass in instead of a generic CCNode or CCObject. `class $classModify(MyMenuLayer, MenuLayer)`\n\nTo use this, you will create a `void modify()` method within that class and inside of there you can change the node to your hearts content. You can use the fields struct just like in Geode to add fields if needed. \n\nTo edit the priority (lets say another mod modifies the same node using this) you can add `static int modifyPrio()` to the class which should return an integer value that is the priority you wish to set. \n\nInclude `ObjectModify.hpp` to access these macros.\n\n**Full Example modifying BetterInfo's CustomCreatorLayer:**\n\n```c++\nclass $nodeModify(MyCustomCreatorLayer, CustomCreatorLayer) {\n\n    static int modifyPrio() {\n        return 10;\n    }\n\n    struct Fields {\n        int m_number = 0;\n    };\n\n    void modify() {\n        \n        CCSprite* spr = CCSprite::createWithSpriteFrameName(\"GJ_playBtn_001.png\");\n        CCMenuItemSpriteExtra* btn = CCMenuItemSpriteExtra::create(spr, this, menu_selector(MyCustomCreatorLayer::onEpicButton));\n        btn-\u003esetID(\"epic-button\"_spr);\n\n        if (CCMenu* creatorButtonsMenu = typeinfo_cast\u003cCCMenu*\u003e(getChildByID(\"cvolton.betterinfo/creator-buttons-menu\"))) {\n            creatorButtonsMenu-\u003eaddChild(btn);\n            creatorButtonsMenu-\u003eupdateLayout();\n        }\n    }\n\n    void onEpicButton(CCObject* obj) {\n        log::info(\"m_number {}\", m_fields-\u003em_number);\n        m_fields-\u003em_number++;\n    }\n};\n```\n\nThere's also a useful utility for modifying all classes with a specific Base class. `class $baseModify(SomeClass)`\n\nIt works just like above:\n\n```cpp\nclass $baseModify(MyFLAlertLayer, FLAlertLayer) {\n\n    void modify() {\n        m_noElasticity = true;\n        m_mainLayer-\u003esetScale(0.5f);\n    }\n}\n```\n\n## General Utils\n\nInclude `Utils.hpp` to access these utils.\n\n### alpha::utils::cocos namespace:\n\nGetting sprites while ignoring Texture Loader fallback:\n`std::optional\u003ccocos2d::CCSprite*\u003e getSprite(const char* sprName)`\n`std::optional\u003ccocos2d::CCSprite*\u003e getSpriteByFrameName(const char* sprFrameName)`\n\nGetting a layer from the scene even during transition:\n`std::optional\u003ccocos2d::CCNode*\u003e getLayer()`\n`std::optional\u003ccocos2d::CCNode*\u003e getLayerByClassName(std::string className)`\n\nSetting a node color by hex code:\n`bool setColorByHex(cocos2d::CCRGBAProtocol* node, std::string colorHex)`\n\nChecking if a parent node contains a node anywhere in a tree:\n`bool hasNode(cocos2d::CCNode* child, cocos2d::CCNode* parent)`\n\nGetting a child by class name dynamically:\n`std::optional\u003ccocos2d::CCNode*\u003e getChildByClassName(cocos2d::CCNode* node, std::string name, int index = 0)`\n\nGetting an objects class name by template:\n`std::string_view getObjectName\u003cT\u003e()`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphalaneous%2Falphas-geode-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falphalaneous%2Falphas-geode-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphalaneous%2Falphas-geode-utils/lists"}