From 724aa01293ab88825d3abbc5358b8dff3ba9e2df Mon Sep 17 00:00:00 2001 From: Cvolton Date: Wed, 27 Nov 2024 00:32:50 +0100 Subject: [PATCH] add readme attempt --- about.md | 45 +++++---------------------------------------- 1 file changed, 5 insertions(+), 40 deletions(-) diff --git a/about.md b/about.md index 9d4078e..6c1e752 100644 --- a/about.md +++ b/about.md @@ -2,44 +2,9 @@ Adds node IDs to layers for other mods to base their UI on, for preserving mod compatibility. See the [Github repository](https://github.com/geode-sdk/NodeIDs) for contributing. -Has IDs for: +## Why is this needed? +Back in the ancient times we had to get objects by their indices - whenever you wanted to get the play button in the main menu, you had to know it was the 3rd button added there. -- CommentCell -- CreatorLayer -- CustomizeObjectLayer (Windows and Android only) -- ChallengeNode -- ChallengesPage -- CharacterColorPage -- DailyLevelNode -- DailyLevelPage -- EditLevelLayer -- EditorPauseLayer -- EditorUI -- FLAlertLayer -- GauntletNode -- GauntletSelectLayer -- GJCommentListLayer -- GJDropDownLayer -- GJGarageLayer -- GJListLayer -- GJScoreCell -- InfoLayer -- LeaderboardsLayer -- LevelAreaInnerLayer -- LevelBrowserLayer -- LevelCell -- LevelEditorLayer -- LevelInfoLayer -- LevelLeaderboard -- LevelPage -- LevelSearchLayer -- LevelSelectLayer -- MoreOptionsLayer -- OptionsLayer -- PauseLayer -- PlayLayer -- ProfilePage -- RewardsPage -- SecretRewardsLayer -- SetGroupIDLayer -- UILayer +At first this approach seemed to work well, but then several issues were found - what if a mod adds its own button before all others? What if it removes a button RobTop added? Now the 3rd button might be something completely different! + +Geode provides a solution - Node IDs. Now you don't need to bother with numbers at all! Instead you grab "play-button" and you're always guaranteed to get the correct button, even if some other mod completely reorganizes the main menu. \ No newline at end of file