2012-04-21 21:13:50 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2013-01-01 00:37:37 +00:00
|
|
|
* Copyright (C) 2010-2013 - Hans-Kristian Arntzen
|
|
|
|
* Copyright (C) 2011-2013 - Daniel De Matteis
|
2012-02-09 01:36:09 +00:00
|
|
|
*
|
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,
|
2012-05-28 21:19:40 +00:00
|
|
|
SETTING_EMU_SHOW_INFO_MSG,
|
2012-11-22 04:32:58 +00:00
|
|
|
SETTING_EMU_SHOW_DEBUG_INFO_MSG,
|
2012-05-28 21:19:40 +00:00
|
|
|
SETTING_EMU_MENUS,
|
2012-04-14 03:36:54 +00:00
|
|
|
SETTING_GAMMA_CORRECTION_ENABLED,
|
2012-05-21 16:01:51 +00:00
|
|
|
SETTING_SHADER,
|
|
|
|
SETTING_SHADER_2,
|
2012-05-08 02:22:53 +00:00
|
|
|
SETTING_HW_TEXTURE_FILTER,
|
|
|
|
SETTING_HW_TEXTURE_FILTER_2,
|
2012-05-24 09:34:10 +00:00
|
|
|
SETTING_SCALE_ENABLED,
|
2012-08-19 20:53:01 +00:00
|
|
|
SETTING_SCALE_FACTOR,
|
|
|
|
SETTING_ZIP_EXTRACT,
|
2012-03-08 22:29:18 +00:00
|
|
|
};
|
|
|
|
|
2012-05-23 06:37:31 +00:00
|
|
|
enum
|
|
|
|
{
|
2012-05-29 13:25:39 +00:00
|
|
|
SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_B = 0,
|
|
|
|
SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_Y,
|
|
|
|
SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_SELECT,
|
|
|
|
SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_START,
|
|
|
|
SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_UP,
|
|
|
|
SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_DOWN,
|
|
|
|
SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_LEFT,
|
|
|
|
SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_RIGHT,
|
|
|
|
SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_A,
|
|
|
|
SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_X,
|
|
|
|
SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_L,
|
|
|
|
SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_R,
|
|
|
|
SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_L2,
|
|
|
|
SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_R2,
|
|
|
|
SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_L3,
|
|
|
|
SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_R3,
|
2012-08-22 11:44:02 +00:00
|
|
|
SETTING_CONTROLS_DPAD_EMULATION,
|
2012-05-29 13:25:39 +00:00
|
|
|
SETTING_CONTROLS_DEFAULT_ALL
|
2012-05-23 06:37:31 +00:00
|
|
|
};
|
|
|
|
|
2012-05-22 00:19:40 +00:00
|
|
|
enum
|
|
|
|
{
|
2012-08-22 01:56:57 +00:00
|
|
|
INPUT_LOOP_NONE = 0,
|
2012-05-22 00:19:40 +00:00
|
|
|
INPUT_LOOP_MENU,
|
2012-08-22 01:56:57 +00:00
|
|
|
INPUT_LOOP_RESIZE_MODE,
|
|
|
|
INPUT_LOOP_FILEBROWSER
|
2012-05-22 00:19:40 +00:00
|
|
|
};
|
|
|
|
|
2012-04-21 21:13:50 +00:00
|
|
|
class CRetroArch : public CXuiModule
|
2012-01-22 00:43:54 +00:00
|
|
|
{
|
2012-05-29 13:25:39 +00:00
|
|
|
public:
|
|
|
|
HXUIOBJ hMainScene;
|
|
|
|
HXUIOBJ hControlsMenu;
|
|
|
|
HXUIOBJ hFileBrowser;
|
|
|
|
HXUIOBJ hCoreBrowser;
|
|
|
|
HXUIOBJ hShaderBrowser;
|
|
|
|
HXUIOBJ hQuickMenu;
|
|
|
|
HXUIOBJ hRetroArchSettings;
|
|
|
|
protected:
|
|
|
|
virtual HRESULT RegisterXuiClasses();
|
|
|
|
virtual HRESULT UnregisterXuiClasses();
|
2012-01-22 00:43:54 +00:00
|
|
|
};
|
|
|
|
|
2012-04-21 22:14:18 +00:00
|
|
|
class CRetroArchMain: public CXuiSceneImpl
|
2012-01-22 00:43:54 +00:00
|
|
|
{
|
2012-05-29 13:25:39 +00:00
|
|
|
protected:
|
|
|
|
CXuiControl m_filebrowser;
|
|
|
|
CXuiControl m_quick_menu;
|
|
|
|
CXuiControl m_controls;
|
|
|
|
CXuiControl m_settings;
|
|
|
|
CXuiControl m_change_libretro_core;
|
|
|
|
CXuiControl m_quit;
|
|
|
|
CXuiTextElement m_title;
|
|
|
|
CXuiTextElement m_core;
|
2013-01-09 06:27:05 +00:00
|
|
|
CXuiControl m_logoimage;
|
2012-05-29 13:25:39 +00:00
|
|
|
public:
|
|
|
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
|
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
|
|
|
|
|
|
|
XUI_BEGIN_MSG_MAP()
|
|
|
|
XUI_ON_XM_INIT( OnInit)
|
2012-05-29 17:00:13 +00:00
|
|
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
2013-01-09 06:27:05 +00:00
|
|
|
XUI_END_MSG_MAP();
|
2012-05-29 13:25:39 +00:00
|
|
|
|
|
|
|
XUI_IMPLEMENT_CLASS(CRetroArchMain, L"RetroArchMain", XUI_CLASS_SCENE)
|
2012-01-24 05:55:27 +00:00
|
|
|
};
|
|
|
|
|
2012-04-21 22:14:18 +00:00
|
|
|
class CRetroArchFileBrowser: public CXuiSceneImpl
|
2012-02-04 19:33:51 +00:00
|
|
|
{
|
2012-05-29 13:25:39 +00:00
|
|
|
protected:
|
|
|
|
CXuiList m_romlist;
|
|
|
|
CXuiControl m_back;
|
|
|
|
CXuiControl m_dir_game;
|
|
|
|
CXuiControl m_dir_cache;
|
|
|
|
CXuiTextElement m_rompathtitle;
|
|
|
|
public:
|
|
|
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
|
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
|
|
|
|
|
|
|
XUI_BEGIN_MSG_MAP()
|
|
|
|
XUI_ON_XM_INIT( OnInit)
|
2012-05-29 17:00:13 +00:00
|
|
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
2013-01-09 06:27:05 +00:00
|
|
|
XUI_END_MSG_MAP();
|
2012-05-29 13:25:39 +00:00
|
|
|
|
|
|
|
XUI_IMPLEMENT_CLASS(CRetroArchFileBrowser, L"RetroArchFileBrowser", XUI_CLASS_SCENE)
|
2012-02-04 19:33:51 +00:00
|
|
|
};
|
|
|
|
|
2012-04-21 22:14:18 +00:00
|
|
|
class CRetroArchCoreBrowser: public CXuiSceneImpl
|
2012-03-05 12:06:24 +00:00
|
|
|
{
|
2012-05-29 13:25:39 +00:00
|
|
|
protected:
|
|
|
|
CXuiList m_romlist;
|
|
|
|
CXuiControl m_back;
|
|
|
|
CXuiTextElement m_rompathtitle;
|
|
|
|
public:
|
|
|
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
|
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
|
|
|
|
|
|
|
XUI_BEGIN_MSG_MAP()
|
2013-01-09 06:27:05 +00:00
|
|
|
XUI_ON_XM_INIT( OnInit)
|
|
|
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
|
|
|
XUI_END_MSG_MAP();
|
2012-05-29 13:25:39 +00:00
|
|
|
|
|
|
|
XUI_IMPLEMENT_CLASS(CRetroArchCoreBrowser, L"RetroArchCoreBrowser", XUI_CLASS_SCENE)
|
2012-03-05 12:06:24 +00:00
|
|
|
};
|
2012-05-21 16:01:51 +00:00
|
|
|
|
|
|
|
class CRetroArchShaderBrowser: public CXuiSceneImpl
|
|
|
|
{
|
2012-05-29 13:25:39 +00:00
|
|
|
protected:
|
|
|
|
CXuiList m_shaderlist;
|
|
|
|
CXuiControl m_back;
|
|
|
|
CXuiTextElement m_shaderpathtitle;
|
|
|
|
public:
|
|
|
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
|
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
|
|
|
|
|
|
|
XUI_BEGIN_MSG_MAP()
|
|
|
|
XUI_ON_XM_INIT( OnInit)
|
2012-05-29 17:00:13 +00:00
|
|
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
2013-01-09 06:27:05 +00:00
|
|
|
XUI_END_MSG_MAP();
|
2012-05-29 13:25:39 +00:00
|
|
|
|
|
|
|
XUI_IMPLEMENT_CLASS(CRetroArchShaderBrowser, L"RetroArchShaderBrowser", XUI_CLASS_SCENE)
|
2012-05-21 16:01:51 +00:00
|
|
|
};
|
2012-03-05 12:06:24 +00:00
|
|
|
|
2012-04-21 22:14:18 +00:00
|
|
|
class CRetroArchQuickMenu: public CXuiSceneImpl
|
2012-02-14 01:41:35 +00:00
|
|
|
{
|
2012-05-29 13:25:39 +00:00
|
|
|
protected:
|
|
|
|
CXuiList m_quickmenulist;
|
|
|
|
CXuiControl m_back;
|
|
|
|
public:
|
|
|
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
|
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
2012-05-29 17:00:13 +00:00
|
|
|
HRESULT OnControlNavigate(XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled);
|
2012-05-29 13:25:39 +00:00
|
|
|
|
|
|
|
XUI_BEGIN_MSG_MAP()
|
|
|
|
XUI_ON_XM_INIT( OnInit)
|
2012-05-29 17:00:13 +00:00
|
|
|
XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate )
|
|
|
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
2013-01-09 06:27:05 +00:00
|
|
|
XUI_END_MSG_MAP();
|
2012-05-29 13:25:39 +00:00
|
|
|
|
|
|
|
XUI_IMPLEMENT_CLASS(CRetroArchQuickMenu, L"RetroArchQuickMenu", XUI_CLASS_SCENE)
|
2012-02-14 01:41:35 +00:00
|
|
|
};
|
|
|
|
|
2012-04-21 22:14:18 +00:00
|
|
|
class CRetroArchSettings: public CXuiSceneImpl
|
2012-01-24 05:55:27 +00:00
|
|
|
{
|
2012-05-29 13:25:39 +00:00
|
|
|
protected:
|
|
|
|
CXuiList m_settingslist;
|
|
|
|
CXuiControl m_back;
|
|
|
|
public:
|
|
|
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
|
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
|
|
|
HRESULT OnControlNavigate(XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled);
|
|
|
|
|
|
|
|
XUI_BEGIN_MSG_MAP()
|
|
|
|
XUI_ON_XM_INIT( OnInit)
|
2012-05-29 17:00:13 +00:00
|
|
|
XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate )
|
|
|
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
2013-01-09 06:27:05 +00:00
|
|
|
XUI_END_MSG_MAP();
|
2012-05-29 13:25:39 +00:00
|
|
|
|
|
|
|
XUI_IMPLEMENT_CLASS(CRetroArchSettings, L"RetroArchSettings", XUI_CLASS_SCENE)
|
2012-01-22 00:43:54 +00:00
|
|
|
};
|
|
|
|
|
2012-05-23 06:37:31 +00:00
|
|
|
class CRetroArchControls: public CXuiSceneImpl
|
|
|
|
{
|
2012-05-29 13:25:39 +00:00
|
|
|
protected:
|
|
|
|
CXuiList m_controlslist;
|
|
|
|
CXuiControl m_back;
|
|
|
|
CXuiSlider m_controlnoslider;
|
|
|
|
public:
|
|
|
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
|
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
|
|
|
HRESULT OnControlNavigate(XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled);
|
|
|
|
|
|
|
|
XUI_BEGIN_MSG_MAP()
|
|
|
|
XUI_ON_XM_INIT( OnInit)
|
2012-05-29 17:00:13 +00:00
|
|
|
XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate )
|
|
|
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
2013-01-09 06:27:05 +00:00
|
|
|
XUI_END_MSG_MAP();
|
2012-05-29 13:25:39 +00:00
|
|
|
|
|
|
|
XUI_IMPLEMENT_CLASS(CRetroArchControls, L"RetroArchControls", XUI_CLASS_SCENE)
|
2012-05-23 06:37:31 +00:00
|
|
|
};
|
|
|
|
|
2012-01-22 00:43:54 +00:00
|
|
|
#endif
|