2012-02-09 02:36:09 +01:00
|
|
|
/* SSNES - A Super Nintendo Entertainment System (SNES) Emulator frontend for libsnes.
|
|
|
|
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
|
|
|
|
* Copyright (C) 2011-2012 - Daniel De Matteis
|
|
|
|
*
|
|
|
|
* Some code herein may be based on code found in BSNES.
|
|
|
|
*
|
|
|
|
* SSNES is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* SSNES is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with SSNES.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2012-01-22 01:43:54 +01:00
|
|
|
#ifndef _MENU_XUI_H_
|
|
|
|
#define _MENU_XUI_H_
|
|
|
|
|
|
|
|
#include <xui.h>
|
|
|
|
#include <xuiapp.h>
|
|
|
|
|
|
|
|
class CSSNES : public CXuiModule
|
|
|
|
{
|
2012-02-08 16:10:01 +01:00
|
|
|
public:
|
|
|
|
HXUIOBJ hMainScene;
|
|
|
|
HXUIOBJ hFileBrowser;
|
|
|
|
HXUIOBJ hSSNESSettings;
|
2012-01-22 01:43:54 +01:00
|
|
|
protected:
|
|
|
|
/* Override so that Cssnes can register classes */
|
|
|
|
virtual HRESULT RegisterXuiClasses();
|
|
|
|
/* Override so that Cssnes can unregister classes */
|
|
|
|
virtual HRESULT UnregisterXuiClasses();
|
|
|
|
};
|
|
|
|
|
2012-01-24 06:55:27 +01:00
|
|
|
class CSSNESMain: public CXuiSceneImpl
|
2012-01-22 01:43:54 +01:00
|
|
|
{
|
2012-01-24 00:02:02 +01:00
|
|
|
protected:
|
|
|
|
CXuiControl m_filebrowser;
|
2012-01-24 00:29:03 +01:00
|
|
|
CXuiControl m_settings;
|
2012-01-24 00:02:02 +01:00
|
|
|
CXuiControl m_quit;
|
2012-01-24 00:29:03 +01:00
|
|
|
CXuiTextElement m_title;
|
2012-01-24 06:11:01 +01:00
|
|
|
CXuiTextElement m_core;
|
2012-01-22 01:43:54 +01:00
|
|
|
public:
|
2012-02-13 00:05:23 +01:00
|
|
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
|
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
2012-01-24 00:02:02 +01:00
|
|
|
|
|
|
|
XUI_BEGIN_MSG_MAP()
|
|
|
|
XUI_ON_XM_INIT( OnInit)
|
|
|
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
|
|
|
XUI_END_MSG_MAP();
|
|
|
|
|
2012-01-24 06:55:27 +01:00
|
|
|
XUI_IMPLEMENT_CLASS(CSSNESMain, L"SSNESMain", XUI_CLASS_SCENE)
|
|
|
|
};
|
|
|
|
|
2012-02-04 20:33:51 +01:00
|
|
|
class CSSNESFileBrowser: public CXuiSceneImpl
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
CXuiList m_romlist;
|
2012-02-05 00:25:57 +01:00
|
|
|
CXuiControl m_back;
|
2012-02-04 23:40:11 +01:00
|
|
|
CXuiTextElement m_rompathtitle;
|
2012-02-04 20:33:51 +01:00
|
|
|
public:
|
2012-02-13 00:05:23 +01:00
|
|
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
|
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
2012-02-04 20:33:51 +01:00
|
|
|
|
|
|
|
XUI_BEGIN_MSG_MAP()
|
|
|
|
XUI_ON_XM_INIT( OnInit)
|
|
|
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
|
|
|
XUI_END_MSG_MAP();
|
|
|
|
|
|
|
|
XUI_IMPLEMENT_CLASS(CSSNESFileBrowser, L"SSNESFileBrowser", XUI_CLASS_SCENE)
|
|
|
|
};
|
|
|
|
|
2012-01-24 06:55:27 +01:00
|
|
|
class CSSNESSettings: public CXuiSceneImpl
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
CXuiControl m_rewind;
|
2012-02-03 11:32:31 +01:00
|
|
|
CXuiCheckbox m_rewind_cb;
|
2012-02-10 17:17:44 +01:00
|
|
|
CXuiControl m_hw_filter;
|
2012-02-03 11:32:31 +01:00
|
|
|
CXuiControl m_back;
|
2012-01-24 06:55:27 +01:00
|
|
|
public:
|
2012-02-13 00:05:23 +01:00
|
|
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
|
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
2012-01-24 06:55:27 +01:00
|
|
|
|
|
|
|
XUI_BEGIN_MSG_MAP()
|
|
|
|
XUI_ON_XM_INIT( OnInit)
|
|
|
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
|
|
|
XUI_END_MSG_MAP();
|
|
|
|
|
2012-01-25 07:19:07 +01:00
|
|
|
XUI_IMPLEMENT_CLASS(CSSNESSettings, L"SSNESSettings", XUI_CLASS_TABSCENE)
|
2012-01-22 01:43:54 +01:00
|
|
|
};
|
|
|
|
|
2012-01-22 22:45:32 +01:00
|
|
|
int menu_init (void);
|
|
|
|
void menu_loop (void);
|
2012-01-22 21:47:34 +01:00
|
|
|
|
|
|
|
extern CSSNES app;
|
2012-01-22 01:43:54 +01:00
|
|
|
|
|
|
|
#endif
|