mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 04:20:28 +00:00
(360) Move class definitions to rmenu_xui.cpp instead of header
This commit is contained in:
parent
18769094e6
commit
13de2c5acd
@ -18,6 +18,8 @@
|
||||
#include <crtdefs.h>
|
||||
#include <tchar.h>
|
||||
#include <xtl.h>
|
||||
#include <xui.h>
|
||||
#include <xuiapp.h>
|
||||
|
||||
#include "rmenu_xui.h"
|
||||
|
||||
@ -46,6 +48,152 @@ enum {
|
||||
MENU_XUI_ITEM_QUIT_RARCH,
|
||||
};
|
||||
|
||||
class CRetroArch : public CXuiModule
|
||||
{
|
||||
public:
|
||||
HXUIOBJ hMainScene;
|
||||
HXUIOBJ hControlsMenu;
|
||||
HXUIOBJ hFileBrowser;
|
||||
HXUIOBJ hCoreBrowser;
|
||||
HXUIOBJ hShaderBrowser;
|
||||
HXUIOBJ hQuickMenu;
|
||||
HXUIOBJ hRetroArchSettings;
|
||||
protected:
|
||||
virtual HRESULT RegisterXuiClasses();
|
||||
virtual HRESULT UnregisterXuiClasses();
|
||||
};
|
||||
|
||||
class CRetroArchMain: public CXuiSceneImpl
|
||||
{
|
||||
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;
|
||||
CXuiControl m_logoimage;
|
||||
public:
|
||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
||||
|
||||
XUI_BEGIN_MSG_MAP()
|
||||
XUI_ON_XM_INIT( OnInit)
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CRetroArchMain, L"RetroArchMain", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
class CRetroArchFileBrowser: public CXuiSceneImpl
|
||||
{
|
||||
protected:
|
||||
CXuiControl m_back;
|
||||
CXuiControl m_dir_game;
|
||||
public:
|
||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
||||
|
||||
XUI_BEGIN_MSG_MAP()
|
||||
XUI_ON_XM_INIT( OnInit)
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CRetroArchFileBrowser, L"RetroArchFileBrowser", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
class CRetroArchCoreBrowser: public CXuiSceneImpl
|
||||
{
|
||||
protected:
|
||||
CXuiControl m_back;
|
||||
public:
|
||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
||||
|
||||
XUI_BEGIN_MSG_MAP()
|
||||
XUI_ON_XM_INIT( OnInit)
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CRetroArchCoreBrowser, L"RetroArchCoreBrowser", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
class CRetroArchShaderBrowser: public CXuiSceneImpl
|
||||
{
|
||||
protected:
|
||||
CXuiControl m_back;
|
||||
public:
|
||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
||||
|
||||
XUI_BEGIN_MSG_MAP()
|
||||
XUI_ON_XM_INIT( OnInit)
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CRetroArchShaderBrowser, L"RetroArchShaderBrowser", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
class CRetroArchQuickMenu: public CXuiSceneImpl
|
||||
{
|
||||
protected:
|
||||
CXuiList m_quickmenulist;
|
||||
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)
|
||||
XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate )
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CRetroArchQuickMenu, L"RetroArchQuickMenu", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
class CRetroArchSettings: public CXuiSceneImpl
|
||||
{
|
||||
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)
|
||||
XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate )
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CRetroArchSettings, L"RetroArchSettings", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
class CRetroArchControls: public CXuiSceneImpl
|
||||
{
|
||||
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)
|
||||
XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate )
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CRetroArchControls, L"RetroArchControls", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
CRetroArch app;
|
||||
CXuiList m_list;
|
||||
CXuiTextElement m_list_path;
|
||||
@ -1383,3 +1531,10 @@ deinit:
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool menu_iterate_xui(void)
|
||||
{
|
||||
app.Render();
|
||||
XuiTimersRun();
|
||||
return true;
|
||||
}
|
@ -17,9 +17,6 @@
|
||||
#ifndef _RMENU_XUI_H_
|
||||
#define _RMENU_XUI_H_
|
||||
|
||||
#include <xui.h>
|
||||
#include <xuiapp.h>
|
||||
|
||||
enum
|
||||
{
|
||||
SETTING_EMU_REWIND_ENABLED = 0,
|
||||
@ -68,150 +65,6 @@ enum
|
||||
INPUT_LOOP_FILEBROWSER
|
||||
};
|
||||
|
||||
class CRetroArch : public CXuiModule
|
||||
{
|
||||
public:
|
||||
HXUIOBJ hMainScene;
|
||||
HXUIOBJ hControlsMenu;
|
||||
HXUIOBJ hFileBrowser;
|
||||
HXUIOBJ hCoreBrowser;
|
||||
HXUIOBJ hShaderBrowser;
|
||||
HXUIOBJ hQuickMenu;
|
||||
HXUIOBJ hRetroArchSettings;
|
||||
protected:
|
||||
virtual HRESULT RegisterXuiClasses();
|
||||
virtual HRESULT UnregisterXuiClasses();
|
||||
};
|
||||
|
||||
class CRetroArchMain: public CXuiSceneImpl
|
||||
{
|
||||
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;
|
||||
CXuiControl m_logoimage;
|
||||
public:
|
||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
||||
|
||||
XUI_BEGIN_MSG_MAP()
|
||||
XUI_ON_XM_INIT( OnInit)
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CRetroArchMain, L"RetroArchMain", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
class CRetroArchFileBrowser: public CXuiSceneImpl
|
||||
{
|
||||
protected:
|
||||
CXuiControl m_back;
|
||||
CXuiControl m_dir_game;
|
||||
public:
|
||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
||||
|
||||
XUI_BEGIN_MSG_MAP()
|
||||
XUI_ON_XM_INIT( OnInit)
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CRetroArchFileBrowser, L"RetroArchFileBrowser", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
class CRetroArchCoreBrowser: public CXuiSceneImpl
|
||||
{
|
||||
protected:
|
||||
CXuiControl m_back;
|
||||
public:
|
||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
||||
|
||||
XUI_BEGIN_MSG_MAP()
|
||||
XUI_ON_XM_INIT( OnInit)
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CRetroArchCoreBrowser, L"RetroArchCoreBrowser", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
class CRetroArchShaderBrowser: public CXuiSceneImpl
|
||||
{
|
||||
protected:
|
||||
CXuiControl m_back;
|
||||
public:
|
||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
||||
|
||||
XUI_BEGIN_MSG_MAP()
|
||||
XUI_ON_XM_INIT( OnInit)
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CRetroArchShaderBrowser, L"RetroArchShaderBrowser", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
class CRetroArchQuickMenu: public CXuiSceneImpl
|
||||
{
|
||||
protected:
|
||||
CXuiList m_quickmenulist;
|
||||
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)
|
||||
XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate )
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CRetroArchQuickMenu, L"RetroArchQuickMenu", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
class CRetroArchSettings: public CXuiSceneImpl
|
||||
{
|
||||
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)
|
||||
XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate )
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CRetroArchSettings, L"RetroArchSettings", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
class CRetroArchControls: public CXuiSceneImpl
|
||||
{
|
||||
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)
|
||||
XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate )
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CRetroArchControls, L"RetroArchControls", XUI_CLASS_SCENE)
|
||||
};
|
||||
bool menu_iterate_xui(void);
|
||||
|
||||
#endif
|
||||
|
@ -40,7 +40,6 @@
|
||||
unsigned font_x, font_y;
|
||||
#elif defined(_XBOX360)
|
||||
#include "../frontend/menu/rmenu_xui.h"
|
||||
extern CRetroArch app;
|
||||
const DWORD g_MapLinearToSrgbGpuFormat[] =
|
||||
{
|
||||
GPUTEXTUREFORMAT_1_REVERSE,
|
||||
@ -892,8 +891,7 @@ static bool xdk_d3d_frame(void *data, const void *frame,
|
||||
if (lifecycle_mode_state & (1ULL << MODE_MENU_DRAW))
|
||||
{
|
||||
#ifdef _XBOX360
|
||||
app.Render();
|
||||
XuiTimersRun();
|
||||
menu_iterate_xui();
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user