mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 21:36:26 +00:00
(360) Added XUI logic (test)
This commit is contained in:
parent
458abe3611
commit
8c672bc613
24
360/menu.cpp
24
360/menu.cpp
@ -39,6 +39,28 @@ HRESULT CSSNES::UnregisterXuiClasses (void)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMyMainScene::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
||||
{
|
||||
GetChildById(L"XuiBtnRomBrowser", &m_filebrowser);
|
||||
GetChildByid(L"XuiBtnSettings", &m_settings);
|
||||
GetChildById(L"XuiBtnQuit", &m_quit);
|
||||
GetChildById(L"XuiTxtTitle", &m_title);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMyMainScene::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled )
|
||||
{
|
||||
|
||||
if ( hObjPressed == m_filebrowser )
|
||||
{
|
||||
menu_is_running = false;
|
||||
}
|
||||
|
||||
bHandled = TRUE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
int menu_init (void)
|
||||
{
|
||||
HRESULT hr;
|
||||
@ -96,4 +118,4 @@ void menu_loop(void)
|
||||
/* Present the frame */
|
||||
vid->xdk360_render_device->Present(NULL, NULL, NULL, NULL);
|
||||
}while(menu_is_running);
|
||||
}
|
||||
}
|
||||
|
12
360/menu.h
12
360/menu.h
@ -15,7 +15,19 @@ protected:
|
||||
|
||||
class CMyMainScene: public CXuiSceneImpl
|
||||
{
|
||||
protected:
|
||||
CXuiControl m_filebrowser;
|
||||
CxuiControl m_settings;
|
||||
CXuiControl m_quit;
|
||||
CxuiTextElemet m_title;
|
||||
public:
|
||||
HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled );
|
||||
|
||||
XUI_BEGIN_MSG_MAP()
|
||||
XUI_ON_XM_INIT( OnInit)
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CMyMainScene, L"MyMainScene", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user