37 lines
1.1 KiB
C++
37 lines
1.1 KiB
C++
#pragma once
|
|
|
|
// local includes
|
|
#include "menudisplay.h"
|
|
#include "utils.h"
|
|
#include "menuitem.h"
|
|
#include "actions/switchscreenaction.h"
|
|
#include "icons/back.h"
|
|
#include "texts.h"
|
|
|
|
// forward declares
|
|
namespace {
|
|
class StarfieldDisplay;
|
|
class PingPongDisplay;
|
|
class SpiroDisplay;
|
|
class GameOfLifeDisplay;
|
|
class MainMenu;
|
|
} // namespace
|
|
|
|
namespace {
|
|
class DemosMenu :
|
|
public MenuDisplay,
|
|
public StaticText<TEXT_DEMOS>,
|
|
public BackActionInterface<SwitchScreenAction<MainMenu>>
|
|
{
|
|
public:
|
|
DemosMenu()
|
|
{
|
|
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_STARFIELD>, SwitchScreenAction<StarfieldDisplay>>>();
|
|
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_PINGPONG>, SwitchScreenAction<PingPongDisplay>>>();
|
|
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SPIRO>, SwitchScreenAction<SpiroDisplay>>>();
|
|
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GAMEOFLIFE>, SwitchScreenAction<GameOfLifeDisplay>>>();
|
|
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<MainMenu>, StaticMenuItemIcon<&icons::back>>>();
|
|
}
|
|
};
|
|
} // namespace
|