mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-07-03 22:44:32 +00:00
don't delete all tiles when closing map load name prompt without actually loading a map
This commit is contained in:
parent
b63d27b7b5
commit
5dccefffc0
2 changed files with 17 additions and 10 deletions
|
@ -1846,7 +1846,7 @@ void SceneEditor::rotateElement2()
|
|||
placer->rotation.z += 360;
|
||||
}
|
||||
|
||||
void SceneEditor::loadSceneByName()
|
||||
bool SceneEditor::loadSceneByName()
|
||||
{
|
||||
std::string s = dsq->getUserInputString("Enter Name of Map to Load");
|
||||
if (!s.empty())
|
||||
|
@ -1854,7 +1854,9 @@ void SceneEditor::loadSceneByName()
|
|||
game->noSceneTransitionFadeout = true;
|
||||
game->fullTilesetReload = true;
|
||||
game->transitionToScene(s);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void SceneEditor::reloadScene()
|
||||
|
@ -1869,22 +1871,27 @@ void SceneEditor::reloadScene()
|
|||
|
||||
void SceneEditor::loadScene()
|
||||
{
|
||||
bool reload;
|
||||
if (core->getShiftState())
|
||||
{
|
||||
loadSceneByName();
|
||||
reload = loadSceneByName();
|
||||
}
|
||||
else
|
||||
{
|
||||
reloadScene();
|
||||
reload = true;
|
||||
}
|
||||
|
||||
// HACK: reload stuff when (re-) loading a map this way
|
||||
particleManager->loadParticleBank(dsq->particleBank1, dsq->particleBank2);
|
||||
Shot::loadShotBank(dsq->shotBank1, dsq->shotBank2);
|
||||
game->loadEntityTypeList();
|
||||
dsq->loadTileEffects();
|
||||
dsq->continuity.loadSongBank();
|
||||
dsq->loadStringBank();
|
||||
if(reload)
|
||||
{
|
||||
// HACK: reload stuff when (re-) loading a map this way
|
||||
particleManager->loadParticleBank(dsq->particleBank1, dsq->particleBank2);
|
||||
Shot::loadShotBank(dsq->shotBank1, dsq->shotBank2);
|
||||
game->loadEntityTypeList();
|
||||
dsq->loadTileEffects();
|
||||
dsq->continuity.loadSongBank();
|
||||
dsq->loadStringBank();
|
||||
}
|
||||
}
|
||||
|
||||
void SceneEditor::saveScene()
|
||||
|
|
|
@ -217,7 +217,7 @@ protected:
|
|||
|
||||
void addMainMenuItem(const std::string &label, int bid);
|
||||
|
||||
void loadSceneByName();
|
||||
bool loadSceneByName();
|
||||
void reloadScene();
|
||||
|
||||
void mouseButtonLeft();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue