mirror of
https://github.com/risingPhil/PokeMe64.git
synced 2026-04-24 23:17:12 -05:00
Add menu entry
This commit is contained in:
parent
2e5b51e5eb
commit
a5ea603529
|
|
@ -33,6 +33,7 @@ void goToGen1DistributionPokemonMenu(void* context, const void* param);
|
|||
void goToGen2DistributionPokemonMenu(void* context, const void* param);
|
||||
void goToGen2PCNYDistributionPokemonMenu(void* context, const void* param);
|
||||
void goToGen2DecorationMenu(void* context, const void* param);
|
||||
void goToPokeShopScene(void* context, const void* param);
|
||||
void goToBackupRestoreMenu(void* context, const void* param);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ enum class SceneType
|
|||
POKETRANSPORTER_GB_REF,
|
||||
SELECT_FILE,
|
||||
COPY_DATA,
|
||||
POKESHOP,
|
||||
ABOUT
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@ MenuItemData gen1MenuEntries[] = {
|
|||
.title = "Pokémon Moves",
|
||||
.onConfirmAction = goToGen1MovesMenu
|
||||
},
|
||||
{
|
||||
.title = "PokéShop",
|
||||
.onConfirmAction = goToPokeShopScene
|
||||
},
|
||||
{
|
||||
.title = "Gen 3 Transfer Info",
|
||||
.onConfirmAction = goToPokeTransporterGBRef
|
||||
|
|
@ -62,6 +66,10 @@ MenuItemData gen2MenuEntries[] = {
|
|||
.title = "Unlock Decoration",
|
||||
.onConfirmAction = goToGen2DecorationMenu
|
||||
},
|
||||
{
|
||||
.title = "PokéShop",
|
||||
.onConfirmAction = goToPokeShopScene
|
||||
},
|
||||
{
|
||||
.title = "Gen 3 Transfer Info",
|
||||
.onConfirmAction = goToPokeTransporterGBRef
|
||||
|
|
|
|||
|
|
@ -229,6 +229,18 @@ void goToGen2DecorationMenu(void* context, const void* param)
|
|||
scene->getDependencies().sceneManager.switchScene(SceneType::MENU, deleteMenuSceneContext, newSceneContext);
|
||||
}
|
||||
|
||||
void goToPokeShopScene(void* context, const void* param)
|
||||
{
|
||||
MenuScene* scene = static_cast<MenuScene*>(context);
|
||||
SceneManager& sceneManager = scene->getDependencies().sceneManager;
|
||||
auto newSceneContext = new MenuSceneContext{
|
||||
.menuEntries = NULL,
|
||||
.numMenuEntries = 0
|
||||
};
|
||||
|
||||
sceneManager.switchScene(SceneType::POKESHOP, deleteMenuSceneContext, newSceneContext);
|
||||
}
|
||||
|
||||
void goToBackupRestoreMenu(void* context, const void* param)
|
||||
{
|
||||
MenuScene* scene = static_cast<MenuScene*>(context);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include "scenes/DistributionPokemonListScene.h"
|
||||
#include "scenes/SelectFileScene.h"
|
||||
#include "scenes/DataCopyScene.h"
|
||||
#include "scenes/PokeShopScene.h"
|
||||
|
||||
#include <libdragon.h>
|
||||
|
||||
|
|
@ -148,6 +149,9 @@ void SceneManager::loadScene()
|
|||
case SceneType::COPY_DATA:
|
||||
scene_ = new DataCopyScene(sceneDeps_, newSceneContext_);
|
||||
break;
|
||||
case SceneType::POKESHOP:
|
||||
scene_ = new PokeShopScene(sceneDeps_, newSceneContext_);
|
||||
break;
|
||||
case SceneType::ABOUT:
|
||||
scene_ = new AboutScene(sceneDeps_, newSceneContext_);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user