Skip to content

Commit e69a973

Browse files
committed
feature request from user done :3
1 parent 9deb80f commit e69a973

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 1.3.0
2+
- Added option to disable default splashes.
3+
14
# 1.2.0
25
- 25 New Splashes!
36
- Splash label is now more like Minecraft.

mod.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"id": "alphii.gd-splash-text",
1010
"name": "Splash Text!",
11-
"version": "v1.2.0",
11+
"version": "v1.3.0",
1212
"developer": "Alphii",
1313
"description": "Minecraft-style splashes in the main menu!",
1414
"tags": ["enhancement", "offline"],
@@ -52,6 +52,13 @@
5252
"control": {
5353
"slider": true
5454
}
55-
}
55+
},
56+
"disable-default-splash": {
57+
"type": "bool",
58+
"name": "Disable Default Splashes",
59+
"platforms": ["win", "android", "mac"],
60+
"description": "Disabled the build-in splashes from appearing. Useful if you want only your custom splashes to appear. Requires restart.",
61+
"default": false
62+
}
5663
}
5764
}

src/MenuLayer.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ class $modify(ST_MenuLayer, MenuLayer)
2424
if (!m_fields->m_SplashRead)
2525
{
2626
m_fields->m_SplashRead = new SplashRead();
27-
if (!m_fields->m_SplashRead->loadFile(Mod::get()->getResourcesDir() / "splash.splash"))
28-
{
29-
log::error("Failed to load file {}", Mod::get()->getResourcesDir() / "splash.splash");
30-
}
27+
if (!Mod::get()->getSettingValue<bool>("disable-default-splash"))
28+
{
29+
if (!m_fields->m_SplashRead->loadFile(Mod::get()->getResourcesDir() / "splash.splash"))
30+
{
31+
log::error("Failed to load file {}", Mod::get()->getResourcesDir() / "splash.splash");
32+
}
33+
}
3134

3235
#ifndef GEODE_IS_IOS
3336
auto extraPath = Mod::get()->getSettingValue<std::filesystem::path>("extra-splash-file");

0 commit comments

Comments
 (0)