You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`enum class`|`SillyTier`| Defines how silly an option is |
44
+
|`struct`|`Option`| Represents a toggleable option |
45
+
|`class`|`HorribleOptionEvent`| Fired when an option is toggled |
46
+
|`class`|`HorribleOptionEventFilter`| Filters through option toggle events |
47
+
35
48
### Options
36
49
You can register and check any and as many options as you desire through this API.
37
50
@@ -53,7 +66,13 @@ $execute{
53
66
"Stuff!",
54
67
SillyTier::Medium
55
68
));
69
+
};
70
+
```
56
71
72
+
You can include optional fields `restart` and `platforms` as well! The array for `platforms` uses Geode's dynamic `PlatformID` class to identify the exact platform the player is running Geometry Dash on. By default, Horrible Ideas set every option to be compatible for `PlatformID::Desktop` and `PlatformID::Mobile`, essentially covering all platforms. However, you can get very specific about the exact platform you can run your own options on if absolutely necessary, though it's unlikely to be.
73
+
74
+
```cpp
75
+
$execute{
57
76
auto coolOption = Option(
58
77
"cool-things"_spr,
59
78
"Cool Things",
@@ -63,12 +82,12 @@ $execute{
63
82
false,
64
83
{
65
84
PlatformID::Android32,
66
-
PlatformID::iOS
85
+
PlatformID::X64
67
86
}
68
87
);
69
88
70
89
registerOption(coolOption);
71
-
}
90
+
};
72
91
```
73
92
74
93
This will automatically include your option in Horrible Ideas's pre-existing list of options, and will appear in the menu for the player whenever they open it.
@@ -135,4 +154,12 @@ class $modify(SomethingInterestingMenuLayer, MenuLayer) {
135
154
};
136
155
```
137
156
138
-
Happy modding!
157
+
### Watch Out!
158
+
Some common pitfalls include the following.
159
+
- Forgetting to use `_spr` when defining unique option ID
160
+
- Not returning `ListenerResult::Propagate` in event callbacks
161
+
- Registering options outside the `$execute` block
162
+
163
+
Always double-check your code to make sure it follows safe practices.
0 commit comments