Allow Gamemodes to interrupt flow on file creation

This commit is contained in:
jdflyer
2026-08-07 18:46:52 -07:00
parent ce6850acd3
commit 8be95d3aa3
6 changed files with 115 additions and 12 deletions
+19
View File
@@ -29,6 +29,7 @@
#include "dusk/menu_pointer.h"
#include "helpers/string.hpp"
#include "dusk/mods/svc/save.hpp"
#include "dusk/gamemode.hpp"
namespace {
constexpr u8 pointer_target(u8 group, u8 index) noexcept {
@@ -1313,6 +1314,24 @@ void dFile_select_c::selectDataNameMove() {
bool isNameMove = nameMoveAnm();
bool isModoruTxtDisp = modoruTxtDispAnm();
#ifdef TARGET_PC
const dusk::gamemode::Gamemode* gamemode = dusk::gamemode::getGamemodeManager().getCurrentGamemode();
if (gamemode) {
if (isHeaderTxtChange == true && isFileRecScale == true && isModoruTxtDisp == true) {
bool gamemodeFlowClosed = gamemode->invokeOnNewSaveSelectFunction(this);
if (mGamemodeSaveStartBuildUi == true) {
mGamemodeSaveStartBuildUi = false;
}
if (!gamemodeFlowClosed) {
return;
}
}else {
return;
}
}
mGamemodeSaveStartBuildUi = true;
#endif
if (isHeaderTxtChange == true && isFileRecScale == true && isNameMove == true &&
isModoruTxtDisp == true)
{