mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-09 02:48:54 +00:00
(360) New Quick Menu
This commit is contained in:
parent
227f347e70
commit
48d589ffce
@ -11,20 +11,6 @@
|
||||
<Position>347.429474,184.843964,0.000000</Position>
|
||||
<ClassOverride>SSNESQuickMenu</ClassOverride>
|
||||
</Properties>
|
||||
<XuiButton>
|
||||
<Properties>
|
||||
<Id>XuiBtnLoadState</Id>
|
||||
<Width>488.312012</Width>
|
||||
<Height>38.000000</Height>
|
||||
<Position>38.127724,64.215515,0.000000</Position>
|
||||
<Pivot>245.362122,102.247192,0.000000</Pivot>
|
||||
<NavLeft>XuiBackButton</NavLeft>
|
||||
<NavRight>XuiBackButton</NavRight>
|
||||
<NavUp>XuiBtnReturnToGame</NavUp>
|
||||
<NavDown>XuiBtnSaveState</NavDown>
|
||||
<Text>Load State #0</Text>
|
||||
</Properties>
|
||||
</XuiButton>
|
||||
<XuiText>
|
||||
<Properties>
|
||||
<Id>XuiTxtTitle</Id>
|
||||
@ -38,84 +24,56 @@
|
||||
<TextStyle>21</TextStyle>
|
||||
</Properties>
|
||||
</XuiText>
|
||||
<XuiButton>
|
||||
<Properties>
|
||||
<Id>XuiBtnFrameAdvance</Id>
|
||||
<Width>488.312012</Width>
|
||||
<Height>38.000000</Height>
|
||||
<Position>38.127960,201.615982,0.000000</Position>
|
||||
<NavLeft>XuiBackButton</NavLeft>
|
||||
<NavRight>XuiBackButton</NavRight>
|
||||
<NavUp>XuiBtnFilteringShader</NavUp>
|
||||
<NavDown>XuiBtnReturnToGame</NavDown>
|
||||
<Text>Frame Advance</Text>
|
||||
</Properties>
|
||||
</XuiButton>
|
||||
<XuiButton>
|
||||
<Properties>
|
||||
<Id>XuiBtnReturnToGame</Id>
|
||||
<Width>488.312012</Width>
|
||||
<Height>38.000000</Height>
|
||||
<Position>38.327736,246.007980,0.000000</Position>
|
||||
<Pivot>245.162109,-84.153275,0.000000</Pivot>
|
||||
<NavLeft>XuiBackButton</NavLeft>
|
||||
<NavRight>XuiBackButton</NavRight>
|
||||
<NavUp>XuiBtnFrameAdvance</NavUp>
|
||||
<NavDown>XuiBtnLoadState</NavDown>
|
||||
<Text>Return to Game</Text>
|
||||
</Properties>
|
||||
</XuiButton>
|
||||
<XuiButton>
|
||||
<Properties>
|
||||
<Id>XuiBtnSaveState</Id>
|
||||
<Width>488.312012</Width>
|
||||
<Height>38.000000</Height>
|
||||
<Position>38.130001,111.655991,0.000000</Position>
|
||||
<NavLeft>XuiBackButton</NavLeft>
|
||||
<NavRight>XuiBackButton</NavRight>
|
||||
<NavUp>XuiBtnLoadState</NavUp>
|
||||
<NavDown>XuiBtnFilteringShader</NavDown>
|
||||
<Text>Save State #0</Text>
|
||||
</Properties>
|
||||
</XuiButton>
|
||||
<XuiButton>
|
||||
<Properties>
|
||||
<Id>XuiBtnFilteringShader</Id>
|
||||
<Width>488.312012</Width>
|
||||
<Height>38.000000</Height>
|
||||
<Position>38.130001,156.655991,0.000000</Position>
|
||||
<NavLeft>XuiBackButton</NavLeft>
|
||||
<NavRight>XuiBackButton</NavRight>
|
||||
<NavUp>XuiBtnSaveState</NavUp>
|
||||
<NavDown>XuiBtnFrameAdvance</NavDown>
|
||||
</Properties>
|
||||
</XuiButton>
|
||||
<XuiText>
|
||||
<Properties>
|
||||
<Id>XuiTxtTitle1</Id>
|
||||
<Width>45.024040</Width>
|
||||
<Height>40.000000</Height>
|
||||
<Position>493.581604,21.159988,0.000000</Position>
|
||||
<Text>1/2</Text>
|
||||
<TextColor>0xff0f0f0f</TextColor>
|
||||
<DropShadowColor>0x800f0f0f</DropShadowColor>
|
||||
<Font>Arial Unicode MS</Font>
|
||||
<TextStyle>21</TextStyle>
|
||||
</Properties>
|
||||
</XuiText>
|
||||
<XuiBackButton>
|
||||
<Properties>
|
||||
<Id>XuiBackButton</Id>
|
||||
<Width>208.632019</Width>
|
||||
<Height>36.000000</Height>
|
||||
<Position>356.670013,309.000000,0.000000</Position>
|
||||
<NavLeft>XuiBtnLoadState</NavLeft>
|
||||
<NavRight>XuiBtnLoadState</NavRight>
|
||||
<NavUp>XuiBtnReturnToGame</NavUp>
|
||||
<NavDown>XuiBtnLoadState</NavDown>
|
||||
<NavLeft>XuiQuickMenuList</NavLeft>
|
||||
<NavRight>XuiQuickMenuList</NavRight>
|
||||
<NavUp>XuiQuickMenuList</NavUp>
|
||||
<NavDown>XuiQuickMenuList</NavDown>
|
||||
<Text>Go back to menu</Text>
|
||||
<PressKey>22593</PressKey>
|
||||
</Properties>
|
||||
</XuiBackButton>
|
||||
<XuiCommonList>
|
||||
<Properties>
|
||||
<Id>XuiQuickMenuList</Id>
|
||||
<Width>492.000000</Width>
|
||||
<Height>232.720001</Height>
|
||||
<Position>44.880005,64.959991,0.000000</Position>
|
||||
<NavLeft>XuiBackButton</NavLeft>
|
||||
<NavRight>XuiBackButton</NavRight>
|
||||
<NavUp>XuiBackButton</NavUp>
|
||||
<NavDown>XuiBackButton</NavDown>
|
||||
<ItemsText>Load State
|
||||
Save State
|
||||
Hardware filtering:
|
||||
Aspect Ratio:
|
||||
Overscan:
|
||||
Orientation:
|
||||
Resize Mode
|
||||
Frame Advance
|
||||
Screenshot Mode
|
||||
Reset
|
||||
Return to Game
|
||||
Return to Dashboard
|
||||
</ItemsText>
|
||||
</Properties>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
</XuiCommonList>
|
||||
</XuiScene>
|
||||
</XuiCanvas>
|
||||
|
110
360/menu.cpp
110
360/menu.cpp
@ -39,6 +39,13 @@ static void return_to_game (void)
|
||||
g_console.mode_switch = MODE_EMULATION;
|
||||
}
|
||||
|
||||
static void return_to_dashboard (void)
|
||||
{
|
||||
g_console.menu_enable = false;
|
||||
g_console.mode_switch = MODE_EXIT;
|
||||
g_console.initialize_ssnes_enable = false;
|
||||
}
|
||||
|
||||
/* Register custom classes */
|
||||
HRESULT CSSNES::RegisterXuiClasses (void)
|
||||
{
|
||||
@ -92,17 +99,17 @@ HRESULT CSSNESFileBrowser::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static void set_filter_element(int index, CXuiControl * obj)
|
||||
static const wchar_t * set_filter_element(int index)
|
||||
{
|
||||
switch(index)
|
||||
{
|
||||
case FALSE:
|
||||
obj->SetText(L"Hardware filtering: Point filtering");
|
||||
break;
|
||||
return L"Hardware filtering: Point filtering";
|
||||
case TRUE:
|
||||
obj->SetText(L"Hardware filtering: Linear interpolation");
|
||||
break;
|
||||
return L"Hardware filtering: Linear interpolation";
|
||||
}
|
||||
|
||||
return L"";
|
||||
}
|
||||
|
||||
HRESULT CSSNESSettings::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
||||
@ -112,45 +119,86 @@ HRESULT CSSNESSettings::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
||||
GetChildById(L"XuiBackButton1", &m_back);
|
||||
GetChildById(L"XuiBtnHWFilter", &m_hw_filter);
|
||||
|
||||
set_filter_element(g_settings.video.smooth, &m_hw_filter);
|
||||
m_hw_filter.SetText(set_filter_element(g_settings.video.smooth));
|
||||
m_rewind_cb.SetCheck(g_settings.rewind_enable);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSSNESQuickMenu::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
||||
{
|
||||
GetChildById(L"XuiBtnLoadState", &m_loadstate);
|
||||
GetChildById(L"XuiBtnSaveState", &m_savestate);
|
||||
GetChildById(L"XuiBtnFilteringShader", &m_hw_filter);
|
||||
GetChildById(L"XuiBtnFrameAdvance", &m_frame_advance);
|
||||
GetChildById(L"XuiBtnReturnToGame", &m_return_to_game);
|
||||
GetChildById(L"XuiQuickMenuList", &m_quickmenulist);
|
||||
GetChildById(L"XuiBackButton", &m_back);
|
||||
|
||||
set_filter_element(g_settings.video.smooth, &m_hw_filter);
|
||||
m_quickmenulist.SetText(MENU_ITEM_HARDWARE_FILTERING, set_filter_element(g_settings.video.smooth));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSSNESQuickMenu::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled )
|
||||
{
|
||||
if ( hObjPressed == m_hw_filter)
|
||||
g_settings.video.smooth = !g_settings.video.smooth;
|
||||
else if ( hObjPressed == m_loadstate && g_console.emulator_initialized)
|
||||
int current_index;
|
||||
|
||||
if ( hObjPressed == m_quickmenulist)
|
||||
{
|
||||
ssnes_load_state();
|
||||
return_to_game();
|
||||
current_index = m_quickmenulist.GetCurSel();
|
||||
|
||||
switch(current_index)
|
||||
{
|
||||
case MENU_ITEM_LOAD_STATE:
|
||||
if (g_console.emulator_initialized)
|
||||
{
|
||||
ssnes_load_state();
|
||||
return_to_game();
|
||||
}
|
||||
break;
|
||||
case MENU_ITEM_SAVE_STATE:
|
||||
if (g_console.emulator_initialized)
|
||||
{
|
||||
ssnes_save_state();
|
||||
return_to_game();
|
||||
}
|
||||
break;
|
||||
case MENU_ITEM_HARDWARE_FILTERING:
|
||||
g_settings.video.smooth = !g_settings.video.smooth;
|
||||
m_quickmenulist.SetText(MENU_ITEM_HARDWARE_FILTERING, set_filter_element(g_settings.video.smooth));
|
||||
break;
|
||||
case MENU_ITEM_KEEP_ASPECT_RATIO:
|
||||
break;
|
||||
case MENU_ITEM_OVERSCAN_AMOUNT:
|
||||
break;
|
||||
case MENU_ITEM_ORIENTATION:
|
||||
break;
|
||||
case MENU_ITEM_RESIZE_MODE:
|
||||
break;
|
||||
case MENU_ITEM_FRAME_ADVANCE:
|
||||
if (g_console.emulator_initialized)
|
||||
{
|
||||
g_console.frame_advance_enable = true;
|
||||
g_console.menu_enable = false;
|
||||
g_console.mode_switch = MODE_EMULATION;
|
||||
}
|
||||
break;
|
||||
case MENU_ITEM_SCREENSHOT_MODE:
|
||||
break;
|
||||
case MENU_ITEM_RESET:
|
||||
if (g_console.emulator_initialized)
|
||||
{
|
||||
return_to_game();
|
||||
ssnes_game_reset();
|
||||
}
|
||||
break;
|
||||
case MENU_ITEM_RETURN_TO_GAME:
|
||||
if (g_console.emulator_initialized)
|
||||
return_to_game();
|
||||
break;
|
||||
case MENU_ITEM_RETURN_TO_DASHBOARD:
|
||||
return_to_dashboard();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ( hObjPressed == m_frame_advance && g_console.emulator_initialized)
|
||||
{
|
||||
g_console.frame_advance_enable = true;
|
||||
g_console.menu_enable = false;
|
||||
g_console.mode_switch = MODE_EMULATION;
|
||||
}
|
||||
else if ( hObjPressed == m_return_to_game && g_console.emulator_initialized)
|
||||
return_to_game();
|
||||
else if ( hObjPressed == m_back )
|
||||
|
||||
if ( hObjPressed == m_back )
|
||||
NavigateBack(app.hMainScene);
|
||||
|
||||
set_filter_element(g_settings.video.smooth, &m_hw_filter);
|
||||
bHandled = TRUE;
|
||||
return S_OK;
|
||||
}
|
||||
@ -223,11 +271,11 @@ HRESULT CSSNESSettings::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled )
|
||||
else if ( hObjPressed == m_hw_filter)
|
||||
{
|
||||
g_settings.video.smooth = !g_settings.video.smooth;
|
||||
m_hw_filter.SetText(set_filter_element(g_settings.video.smooth));
|
||||
}
|
||||
else if ( hObjPressed == m_back )
|
||||
NavigateBack(app.hMainScene);
|
||||
|
||||
set_filter_element(g_settings.video.smooth, &m_hw_filter);
|
||||
bHandled = TRUE;
|
||||
return S_OK;
|
||||
}
|
||||
@ -266,11 +314,7 @@ HRESULT CSSNESMain::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled )
|
||||
NavigateForward(app.hSSNESSettings);
|
||||
}
|
||||
else if ( hObjPressed == m_quit )
|
||||
{
|
||||
g_console.menu_enable = false;
|
||||
g_console.mode_switch = MODE_EXIT;
|
||||
g_console.initialize_ssnes_enable = false;
|
||||
}
|
||||
return_to_dashboard();
|
||||
|
||||
bHandled = TRUE;
|
||||
return S_OK;
|
||||
|
@ -79,11 +79,7 @@ public:
|
||||
class CSSNESQuickMenu: public CXuiSceneImpl
|
||||
{
|
||||
protected:
|
||||
CXuiControl m_loadstate;
|
||||
CXuiControl m_savestate;
|
||||
CXuiControl m_hw_filter;
|
||||
CXuiControl m_frame_advance;
|
||||
CXuiControl m_return_to_game;
|
||||
CXuiList m_quickmenulist;
|
||||
CXuiControl m_back;
|
||||
public:
|
||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||
|
@ -28,6 +28,7 @@ enum
|
||||
enum {
|
||||
MENU_ITEM_LOAD_STATE = 0,
|
||||
MENU_ITEM_SAVE_STATE,
|
||||
MENU_ITEM_HARDWARE_FILTERING,
|
||||
MENU_ITEM_KEEP_ASPECT_RATIO,
|
||||
MENU_ITEM_OVERSCAN_AMOUNT,
|
||||
MENU_ITEM_ORIENTATION,
|
||||
@ -36,7 +37,6 @@ enum {
|
||||
MENU_ITEM_SCREENSHOT_MODE,
|
||||
MENU_ITEM_RESET,
|
||||
MENU_ITEM_RETURN_TO_GAME,
|
||||
MENU_ITEM_RETURN_TO_MENU,
|
||||
MENU_ITEM_RETURN_TO_DASHBOARD
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user