https://github.com/omgrod/geodify
https://github.com/omgrod/geodify
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/omgrod/geodify
- Owner: OmgRod
- Created: 2024-06-29T10:43:13.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-11-12T21:37:14.000Z (over 1 year ago)
- Last Synced: 2024-11-12T22:29:14.892Z (over 1 year ago)
- Language: C++
- Size: 360 KB
- Stars: 1
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
Awesome Lists containing this project
README
# Geodify
A mod made to to change most menus' backgrounds to the Geode one

## Building
To build this mod, follow one of the methods below:
### VS Code
> [!NOTE]
> You will also need to install Python3 (tested with 3.11) to be able to build this mod. You may download it at
1. Open the project in VS Code.
2. Install the necessary dependencies (if not already done).
3. Select the appropriate build kit for your platform. You can do this by navigating to the "CMake Tools" tab in the bottom left and selecting "Select a Kit".
4. Choose the correct kit for your environment (e.g., macOS, Windows, etc.).
5. After selecting the kit, you can build the project by clicking "Build" in the "CMake" tab or by using the terminal command:
```bash
cmake --build .
```
This will compile the mod and generate the necessary files.
### GitHub Actions
1. Push your changes to GitHub.
2. Open the repository and navigate to the Actions tab.
3. Select the workflow called "Build Geode Mod".
4. Choose the latest commit.
5. After the build is complete, download the generated artifacts from the build step to get the built mod files.
## Adding Layers
### Geometry Dash
To add a custom background layer to a **Geometry Dash** menu, follow the example below. This demonstrates how to add a background layer in `CreatorLayer`.
```cpp
#include "../../SwelvyBG.hpp"
#include
#include
using namespace geode::prelude;
// This way is the new way to register a layer tag from v2.4.1+!
// ADD_TAG is gd-LayerNameThing
ADD_TAG("gd-CreatorLayer");
class $modify(MyCreatorLayer, CreatorLayer) {
bool init() {
if (!CreatorLayer::init()) {
return false;
}
if (Mod::get()->getSettingValue("show-creator")){
if (auto bg = this->getChildByID("background")){
bg->setVisible(false);
}
auto swelvyBG = SwelvyBG::create();
swelvyBG->setZOrder(-2);
this->addChild(swelvyBG);
}
return true;
}
};
```
### External Mods
For external mods that modify the background of a specific menu, you can use the following example. This shows how to hook into `GlobedLevelListLayer` to add a custom background.
```cpp
#include
#include "../../SwelvyBG.hpp"
#include
using namespace geode::prelude;
// This way is the new way to register a layer tag from v2.4.1+!
// ADD_TAG is ModID-LayerNameThing
ADD_TAG("dankmeme.globed2-GlobedLevelListLayer");
SET_SWELVY(GlobedLevelListLayer /* Layer Name */, "dankmeme.globed2/GlobedLevelListLayer" /* Setting name - please keep in this format */, "background" /* Background Node ID */);
```
If the layer you're attempting to hook doesnt have an ID for its background, use `SET_SWELVY_SPRITE`.
```cpp
#include
#include "../../SwelvyBG.hpp"
#include
using namespace geode::prelude;
// This way is the new way to register a layer tag from v2.4.1+!
// ADD_TAG is ModID-LayerNameThing
ADD_TAG("dankmeme.globed2-GlobedLevelListLayer");
SET_SWELVY_SPRITE(GlobedLevelListLayer /* Layer Name */, "dankmeme.globed2/GlobedLevelListLayer" /* Setting name - please keep in this format */);
```
This way is new from v2.0.0+!
### Registering Layers
1. Add the mod to `src/Tags.hpp`
> [!IMPORTANT]
> You should only do this if the layer you are adding is for a new mod that isn't yet in Geodify.
> [!NOTE]
> As of writing this, the relevant code is the modData list
> e.g: { "Mod Name", "Devs", "ID" },