mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 00:49:47 +00:00
(360) Added settings XUI - navigation not yet working
This commit is contained in:
parent
42b101b024
commit
e6f2aa81f7
@ -9,7 +9,7 @@
|
||||
<Width>410.000000</Width>
|
||||
<Height>251.000000</Height>
|
||||
<Position>439.013489,260.875977,0.000000</Position>
|
||||
<ClassOverride>MyMainScene</ClassOverride>
|
||||
<ClassOverride>SSNESMain</ClassOverride>
|
||||
</Properties>
|
||||
<XuiButton>
|
||||
<Properties>
|
||||
|
57
360/media/ssnes_settings.xui
Normal file
57
360/media/ssnes_settings.xui
Normal file
@ -0,0 +1,57 @@
|
||||
<XuiCanvas version="000c">
|
||||
<Properties>
|
||||
<Width>1280.000000</Width>
|
||||
<Height>720.000000</Height>
|
||||
</Properties>
|
||||
<XuiTabScene>
|
||||
<Properties>
|
||||
<Id>XuiTabScene1</Id>
|
||||
<Width>499.856018</Width>
|
||||
<Height>289.015991</Height>
|
||||
<Position>392.000000,226.112015,0.000000</Position>
|
||||
<ClassOverride>SSNESSettings</ClassOverride>
|
||||
<TabCount>2</TabCount>
|
||||
</Properties>
|
||||
<XuiText>
|
||||
<Properties>
|
||||
<Id>XuiTxtSettings</Id>
|
||||
<Width>240.000000</Width>
|
||||
<Height>40.000000</Height>
|
||||
<Position>25.816010,19.903992,0.000000</Position>
|
||||
<Text>Settings</Text>
|
||||
<TextColor>0xff0f0f0f</TextColor>
|
||||
<DropShadowColor>0x800f0f0f</DropShadowColor>
|
||||
<TextStyle>20</TextStyle>
|
||||
</Properties>
|
||||
</XuiText>
|
||||
<XuiBackButton>
|
||||
<Properties>
|
||||
<Id>XuiBackButton1</Id>
|
||||
<Width>208.632019</Width>
|
||||
<Height>36.000000</Height>
|
||||
<Position>297.919983,239.880005,0.000000</Position>
|
||||
<NavLeft>XuiButton1</NavLeft>
|
||||
<Text>Go back to menu</Text>
|
||||
<PressKey>22593</PressKey>
|
||||
</Properties>
|
||||
</XuiBackButton>
|
||||
<XuiButton>
|
||||
<Properties>
|
||||
<Id>XuiBtnRewind</Id>
|
||||
<Width>215.000000</Width>
|
||||
<Height>38.000000</Height>
|
||||
<Position>24.447998,58.447998,0.000000</Position>
|
||||
<NavRight>XuiBackButton1</NavRight>
|
||||
<Text>Rewind</Text>
|
||||
</Properties>
|
||||
</XuiButton>
|
||||
<XuiCheckbox>
|
||||
<Properties>
|
||||
<Id>XuiCheckbox1</Id>
|
||||
<Width>56.304016</Width>
|
||||
<Height>50.000000</Height>
|
||||
<Position>252.000000,58.000000,0.000000</Position>
|
||||
</Properties>
|
||||
</XuiCheckbox>
|
||||
</XuiTabScene>
|
||||
</XuiCanvas>
|
45
360/menu.cpp
45
360/menu.cpp
@ -33,18 +33,28 @@ uint32_t menu_is_running;
|
||||
/* Register custom classes */
|
||||
HRESULT CSSNES::RegisterXuiClasses (void)
|
||||
{
|
||||
CMyMainScene::Register();
|
||||
CSSNESMain::Register();
|
||||
CSSNESSettings::Register();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/* Unregister custom classes */
|
||||
HRESULT CSSNES::UnregisterXuiClasses (void)
|
||||
{
|
||||
CMyMainScene::Unregister();
|
||||
CSSNESMain::Unregister();
|
||||
CSSNESSettings::Unregister();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMyMainScene::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
||||
HRESULT CSSNESSettings::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
||||
{
|
||||
GetChildById(L"XuiBtnRewind", &m_rewind);
|
||||
GetChildById(L"XuiBackButton1", &m_back);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSSNESMain::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
||||
{
|
||||
GetChildById(L"XuiBtnRomBrowser", &m_filebrowser);
|
||||
GetChildById(L"XuiBtnSettings", &m_settings);
|
||||
@ -68,14 +78,41 @@ HRESULT CMyMainScene::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMyMainScene::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled )
|
||||
HRESULT CSSNESSettings::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled )
|
||||
{
|
||||
if ( hObjPressed == m_rewind )
|
||||
{
|
||||
}
|
||||
else if (hObjPressed == m_back )
|
||||
{
|
||||
}
|
||||
|
||||
bHandled = TRUE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSSNESMain::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled )
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
if ( hObjPressed == m_filebrowser )
|
||||
{
|
||||
menu_is_running = false;
|
||||
mode_switch = MODE_EMULATION;
|
||||
init_ssnes = 1;
|
||||
}
|
||||
else if ( hObjPressed == m_settings )
|
||||
{
|
||||
HXUIOBJ hSSNESSettings;
|
||||
hr = XuiSceneCreate(L"file://game:/media/", L"ssnes_settings.xur", NULL, &hSSNESSettings );
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
SSNES_ERR("Failed to load scene.\n");
|
||||
}
|
||||
|
||||
NavigateForward(hSSNESSettings);
|
||||
}
|
||||
else if ( hObjPressed == m_quit )
|
||||
{
|
||||
menu_is_running = false;
|
||||
|
21
360/menu.h
21
360/menu.h
@ -13,7 +13,7 @@ protected:
|
||||
virtual HRESULT UnregisterXuiClasses();
|
||||
};
|
||||
|
||||
class CMyMainScene: public CXuiSceneImpl
|
||||
class CSSNESMain: public CXuiSceneImpl
|
||||
{
|
||||
protected:
|
||||
CXuiControl m_filebrowser;
|
||||
@ -30,7 +30,24 @@ public:
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CMyMainScene, L"MyMainScene", XUI_CLASS_SCENE)
|
||||
XUI_IMPLEMENT_CLASS(CSSNESMain, L"SSNESMain", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
class CSSNESSettings: public CXuiSceneImpl
|
||||
{
|
||||
protected:
|
||||
CXuiControl m_rewind;
|
||||
CXuiControl m_back;
|
||||
public:
|
||||
HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled );
|
||||
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled );
|
||||
|
||||
XUI_BEGIN_MSG_MAP()
|
||||
XUI_ON_XM_INIT( OnInit)
|
||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||
XUI_END_MSG_MAP();
|
||||
|
||||
XUI_IMPLEMENT_CLASS(CSSNESSettings, L"SSNESSettings", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
int menu_init (void);
|
||||
|
@ -299,6 +299,7 @@
|
||||
<ClCompile Include="..\..\ups.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\360\menu.h" />
|
||||
<ClInclude Include="..\..\360\msvc_compat.h" />
|
||||
<ClInclude Include="..\..\360\xdk360_audio.h" />
|
||||
<ClInclude Include="..\..\audio\hermite.h" />
|
||||
@ -388,6 +389,23 @@
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)ssnes_main.xui" "$(OutDir)media\ssnes_main.xur"</Command>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\360\media\ssnes_settings.xui">
|
||||
<FileType>Document</FileType>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)ssnes_settings.xui" "$(OutDir)media\ssnes_settings.xur"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)ssnes_settings.xui" "$(OutDir)media\ssnes_settings.xur"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Profile|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)ssnes_settings.xui" "$(OutDir)media\ssnes_settings.xur"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Profile_FastCap|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)ssnes_settings.xui" "$(OutDir)media\ssnes_settings.xur"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)ssnes_settings.xui" "$(OutDir)media\ssnes_settings.xur"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)ssnes_settings.xui" "$(OutDir)media\ssnes_settings.xur"</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">$(OutDir)media\ssnes_settings.xur;</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">$(OutDir)media\ssnes_settings.xur;</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Profile|Xbox 360'">$(OutDir)media\ssnes_settings.xur;</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Profile_FastCap|Xbox 360'">$(OutDir)media\ssnes_settings.xur;</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">$(OutDir)media\ssnes_settings.xur;</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">$(OutDir)media\ssnes_settings.xur;</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
@ -202,6 +202,9 @@
|
||||
<ClInclude Include="..\..\conf\config_file.h">
|
||||
<Filter>Header Files\conf</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\360\menu.h">
|
||||
<Filter>Header Files\360</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\360\media\ssnes.ttf">
|
||||
@ -216,5 +219,8 @@
|
||||
<CustomBuild Include="..\..\360\media\ssnes_main.xui">
|
||||
<Filter>Source Files\media</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\360\media\ssnes_settings.xui">
|
||||
<Filter>Source Files\media</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user