2012-04-21 21:13:50 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2012-02-09 01:36:09 +00:00
|
|
|
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
|
|
|
|
* Copyright (C) 2011-2012 - Daniel De Matteis
|
|
|
|
*
|
2012-04-21 21:13:50 +00:00
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
2012-02-09 01:36:09 +00:00
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
2012-04-21 21:13:50 +00:00
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
2012-02-09 01:36:09 +00:00
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
2012-04-21 21:31:57 +00:00
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
2012-02-09 01:36:09 +00:00
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2012-01-22 00:43:54 +00:00
|
|
|
#ifndef _MENU_XUI_H_
|
|
|
|
#define _MENU_XUI_H_
|
|
|
|
|
|
|
|
#include <xui.h>
|
|
|
|
#include <xuiapp.h>
|
|
|
|
|
2012-03-08 22:29:18 +00:00
|
|
|
enum
|
|
|
|
{
|
2012-04-14 03:36:54 +00:00
|
|
|
SETTING_EMU_REWIND_ENABLED = 0,
|
|
|
|
SETTING_GAMMA_CORRECTION_ENABLED,
|
|
|
|
SETTING_HARDWARE_FILTERING
|
2012-03-08 22:29:18 +00:00
|
|
|
};
|
|
|
|
|
2012-04-21 21:13:50 +00:00
|
|
|
class CRetroArch : public CXuiModule
|
2012-01-22 00:43:54 +00:00
|
|
|
{
|
2012-02-08 15:10:01 +00:00
|
|
|
public:
|
2012-04-14 03:36:54 +00:00
|
|
|
HXUIOBJ hMainScene;
|
|
|
|
HXUIOBJ hFileBrowser;
|
|
|
|
HXUIOBJ hCoreBrowser;
|
|
|
|
HXUIOBJ hQuickMenu;
|
|
|
|
HXUIOBJ hSSNESSettings;
|
2012-01-22 00:43:54 +00:00
|
|
|
protected:
|
2012-04-14 03:36:54 +00:00
|
|
|
/* Override so that Cssnes can register classes */
|
|
|
|
virtual HRESULT RegisterXuiClasses();
|
|
|
|
/* Override so that Cssnes can unregister classes */
|
|
|
|
virtual HRESULT UnregisterXuiClasses();
|
2012-01-22 00:43:54 +00:00
|
|
|
};
|
|
|
|
|
2012-01-24 05:55:27 +00:00
|
|
|
class CSSNESMain: public CXuiSceneImpl
|
2012-01-22 00:43:54 +00:00
|
|
|
{
|
2012-01-23 23:02:02 +00:00
|
|
|
protected:
|
2012-04-14 03:36:54 +00:00
|
|
|
CXuiControl m_filebrowser;
|
|
|
|
CXuiControl m_quick_menu;
|
|
|
|
CXuiControl m_controls;
|
|
|
|
CXuiControl m_settings;
|
|
|
|
CXuiControl m_change_libsnes_core;
|
|
|
|
CXuiControl m_quit;
|
|
|
|
CXuiTextElement m_title;
|
|
|
|
CXuiTextElement m_core;
|
2012-01-22 00:43:54 +00:00
|
|
|
public:
|
2012-04-14 03:36:54 +00:00
|
|
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
|
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
2012-01-23 23:02:02 +00:00
|
|
|
|
2012-04-14 03:36:54 +00:00
|
|
|
XUI_BEGIN_MSG_MAP()
|
|
|
|
XUI_ON_XM_INIT( OnInit)
|
|
|
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
|
|
|
XUI_END_MSG_MAP();
|
2012-01-23 23:02:02 +00:00
|
|
|
|
2012-04-14 03:36:54 +00:00
|
|
|
XUI_IMPLEMENT_CLASS(CSSNESMain, L"SSNESMain", XUI_CLASS_SCENE)
|
2012-01-24 05:55:27 +00:00
|
|
|
};
|
|
|
|
|
2012-02-04 19:33:51 +00:00
|
|
|
class CSSNESFileBrowser: public CXuiSceneImpl
|
|
|
|
{
|
|
|
|
protected:
|
2012-04-14 03:36:54 +00:00
|
|
|
CXuiList m_romlist;
|
|
|
|
CXuiControl m_back;
|
|
|
|
CXuiControl m_dir_game;
|
|
|
|
CXuiControl m_dir_cache;
|
|
|
|
CXuiTextElement m_rompathtitle;
|
2012-02-04 19:33:51 +00:00
|
|
|
public:
|
2012-04-14 03:36:54 +00:00
|
|
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
|
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
2012-02-04 19:33:51 +00:00
|
|
|
|
2012-04-14 03:36:54 +00:00
|
|
|
XUI_BEGIN_MSG_MAP()
|
|
|
|
XUI_ON_XM_INIT( OnInit)
|
|
|
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
|
|
|
XUI_END_MSG_MAP();
|
2012-02-04 19:33:51 +00:00
|
|
|
|
2012-04-14 03:36:54 +00:00
|
|
|
XUI_IMPLEMENT_CLASS(CSSNESFileBrowser, L"SSNESFileBrowser", XUI_CLASS_SCENE)
|
2012-02-04 19:33:51 +00:00
|
|
|
};
|
|
|
|
|
2012-03-05 12:06:24 +00:00
|
|
|
class CSSNESCoreBrowser: public CXuiSceneImpl
|
|
|
|
{
|
|
|
|
protected:
|
2012-04-14 03:36:54 +00:00
|
|
|
CXuiList m_romlist;
|
|
|
|
CXuiControl m_back;
|
|
|
|
CXuiTextElement m_rompathtitle;
|
2012-03-05 12:06:24 +00:00
|
|
|
public:
|
2012-04-14 03:36:54 +00:00
|
|
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
|
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
2012-03-05 12:06:24 +00:00
|
|
|
|
2012-04-14 03:36:54 +00:00
|
|
|
XUI_BEGIN_MSG_MAP()
|
|
|
|
XUI_ON_XM_INIT( OnInit)
|
|
|
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
|
|
|
XUI_END_MSG_MAP();
|
2012-03-05 12:06:24 +00:00
|
|
|
|
2012-04-14 03:36:54 +00:00
|
|
|
XUI_IMPLEMENT_CLASS(CSSNESCoreBrowser, L"SSNESCoreBrowser", XUI_CLASS_SCENE)
|
2012-03-05 12:06:24 +00:00
|
|
|
};
|
|
|
|
|
2012-02-14 01:41:35 +00:00
|
|
|
class CSSNESQuickMenu: public CXuiSceneImpl
|
|
|
|
{
|
|
|
|
protected:
|
2012-04-14 03:36:54 +00:00
|
|
|
CXuiList m_quickmenulist;
|
|
|
|
CXuiControl m_back;
|
2012-02-14 01:41:35 +00:00
|
|
|
public:
|
2012-04-14 03:36:54 +00:00
|
|
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
|
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
2012-02-14 01:41:35 +00:00
|
|
|
|
2012-04-14 03:36:54 +00:00
|
|
|
XUI_BEGIN_MSG_MAP()
|
|
|
|
XUI_ON_XM_INIT( OnInit)
|
|
|
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
|
|
|
XUI_END_MSG_MAP();
|
2012-02-14 01:41:35 +00:00
|
|
|
|
2012-04-14 03:36:54 +00:00
|
|
|
XUI_IMPLEMENT_CLASS(CSSNESQuickMenu, L"SSNESQuickMenu", XUI_CLASS_SCENE)
|
2012-02-14 01:41:35 +00:00
|
|
|
};
|
|
|
|
|
2012-01-24 05:55:27 +00:00
|
|
|
class CSSNESSettings: public CXuiSceneImpl
|
|
|
|
{
|
|
|
|
protected:
|
2012-04-14 03:36:54 +00:00
|
|
|
CXuiList m_settingslist;
|
|
|
|
CXuiControl m_back;
|
2012-01-24 05:55:27 +00:00
|
|
|
public:
|
2012-04-14 03:36:54 +00:00
|
|
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
|
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
2012-01-24 05:55:27 +00:00
|
|
|
|
2012-04-14 03:36:54 +00:00
|
|
|
XUI_BEGIN_MSG_MAP()
|
|
|
|
XUI_ON_XM_INIT( OnInit)
|
|
|
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
|
|
|
XUI_END_MSG_MAP();
|
2012-01-24 05:55:27 +00:00
|
|
|
|
2012-04-14 03:36:54 +00:00
|
|
|
XUI_IMPLEMENT_CLASS(CSSNESSettings, L"SSNESSettings", XUI_CLASS_SCENE)
|
2012-01-22 00:43:54 +00:00
|
|
|
};
|
|
|
|
|
2012-01-22 21:45:32 +00:00
|
|
|
int menu_init (void);
|
2012-04-17 03:35:25 +00:00
|
|
|
void menu_deinit (void);
|
2012-01-22 21:45:32 +00:00
|
|
|
void menu_loop (void);
|
2012-01-22 20:47:34 +00:00
|
|
|
|
2012-04-21 21:13:50 +00:00
|
|
|
extern CRetroArch app;
|
2012-01-22 00:43:54 +00:00
|
|
|
|
|
|
|
#endif
|