28#include "ResourceManager.h"
29#include "Pac-Man_Evolution.h"
41Sint32 Menu::processEvent(
const Sint32 idWidget,
const Sint32 iValue)
43 Panel* pPanel = Main::Instance().IGUIMgr().getPanel(ResourceManager::Instance().get(RM_PANEL_MENU));
44 Main& mC64 = Main::Instance();
45 Sint32 iRet = PME_LOOP;
51 mC64.ISoundMgr().get(ResourceManager::Instance().get(RM_SND_CLICKOK))->play();
55 mC64.ISoundMgr().get(ResourceManager::Instance().get(RM_SND_CLICKOK))->play();
56 iRet = PME_GAME_STANDARD;
58 case ID_EVOLUTIONGAME:
59 mC64.ISoundMgr().get(ResourceManager::Instance().get(RM_SND_CLICKOK))->play();
60 iRet = PME_GAME_EVOLUTION;
62 case ID_WORKBENCHGAME:
63 mC64.ISoundMgr().get(ResourceManager::Instance().get(RM_SND_CLICKOK))->play();
64 iRet = PME_GAME_WORKBENCH;
67 mC64.ISoundMgr().get(ResourceManager::Instance().get(RM_SND_CLICKOK))->play();
76Sint32 Menu::render(Sint32 iMode)
79 Sint32 iSW = 0, iSH = 0;
80 Screen* pScreen = Main::Instance().IConfigMgr().get();
81 if(pScreen !=
nullptr) pScreen->getSize(&iSW, &iSH);
84 Image* pImage = Main::Instance().IImageMgr().get(ResourceManager::Instance().get(RM_IMG_MENU));
87 rDst.w = pImage->getSurface()->w;
88 rDst.h = pImage->getSurface()->h;
89 rDst.x = (iSW - rDst.w) / 2;
90 rDst.y = (iSH - rDst.h) / 2;
91 pImage->render(0,
nullptr, &rDst);