From 996794134f5be28ebb9862ba3c4d0c5198673600 Mon Sep 17 00:00:00 2001 From: TwinAphex51224 Date: Sun, 5 Feb 2012 00:25:57 +0100 Subject: [PATCH] (360) Give menu screens some more real estate (480p lowest res) --- 360/main.c | 2 +- 360/media/ssnes_filebrowser.xui | 45 ++++++++++++++++++++++++++++----- 360/media/ssnes_main.xui | 24 +++++++++--------- 360/media/ssnes_settings.xui | 8 +++--- 360/menu.cpp | 31 +++++++++++++++++------ 360/menu.h | 1 + 6 files changed, 80 insertions(+), 31 deletions(-) diff --git a/360/main.c b/360/main.c index 0c9949e03b..3389a7d85b 100644 --- a/360/main.c +++ b/360/main.c @@ -223,7 +223,7 @@ begin_loop: args.verbose = g_extern.verbose; args.sram_path = NULL; args.state_path = NULL; - args.config_path = NULL; + args.rom_path = g_console.rom_path; int init_ret = ssnes_main_init_wrap(&args); diff --git a/360/media/ssnes_filebrowser.xui b/360/media/ssnes_filebrowser.xui index 7308ca57aa..5f35f571a3 100644 --- a/360/media/ssnes_filebrowser.xui +++ b/360/media/ssnes_filebrowser.xui @@ -6,9 +6,9 @@ XuiSceneFileBrowser -410.000000 -251.000000 -439.013489,260.875977,0.000000 +575.888062 +336.017609 +353.995880,209.035965,0.000000 SSNESFileBrowser @@ -27,9 +27,13 @@ XuiRomList -362.400024 -118.960022 +536.582458 +170.800018 22.799980,81.600006,0.000000 +XuiBackButton1 +XuiBackButton1 +XuiBackButton1 +XuiBackButton1 @@ -43,13 +47,42 @@ 0.000000,10.000000,0.000000 + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + XuiBackButton1 219.000000 36.000000 -168.679993,202.600006,0.000000 +338.715210,281.396820,0.000000 +XuiRomList +XuiRomList +XuiRomList +XuiRomList +Go back to menu 22593 diff --git a/360/media/ssnes_main.xui b/360/media/ssnes_main.xui index 5e9f905f55..cb790dcb93 100644 --- a/360/media/ssnes_main.xui +++ b/360/media/ssnes_main.xui @@ -6,17 +6,17 @@ XuiScene1 -410.000000 -251.000000 -439.013489,260.875977,0.000000 +584.528076 +363.320007 +347.429474,184.843964,0.000000 SSNESMain XuiBtnRomBrowser -215.000000 +481.112000 38.000000 -79.599976,55.000000,0.000000 +43.887970,58.455994,0.000000 XuiBtnQuit XuiBtnSettings ROM Browser @@ -27,7 +27,7 @@ XuiTxtTitle 240.000000 40.000000 -85.053619,15.399994,0.000000 +49.341614,15.399994,0.000000 SSNES 360 0xff0f0f0f 0x800f0f0f @@ -38,9 +38,9 @@ XuiBtnSettings -215.000000 +481.112000 38.000000 -79.599976,106.399994,0.000000 +43.887970,109.855988,0.000000 XuiBtnRomBrowser XuiBtnQuit Settings @@ -49,9 +49,9 @@ XuiBtnQuit -215.000000 +481.112000 38.000000 -79.799988,155.399994,0.000000 +44.087982,158.855988,0.000000 XuiBtnSettings XuiBtnRomBrowser Quit @@ -62,7 +62,7 @@ XuiLblCore 124.000000 28.000000 -16.000000,209.200012,0.000000 +12.544006,319.792023,0.000000 Libsnes core: @@ -71,7 +71,7 @@ XuiTxtCoreText 224.399963 34.000000 -138.400024,208.799988,0.000000 +134.944031,319.391998,0.000000 0xff0f0f0f 0x800f0f0f Arial Unicode MS diff --git a/360/media/ssnes_settings.xui b/360/media/ssnes_settings.xui index 68bca5a9a5..99f7586e1c 100644 --- a/360/media/ssnes_settings.xui +++ b/360/media/ssnes_settings.xui @@ -6,9 +6,9 @@ XuiTabScene1 -499.856018 -289.015991 -392.000000,226.112015,0.000000 +586.256042 +363.320007 +345.343994,188.096008,0.000000 SSNESSettings XuiBtnRewind @@ -29,7 +29,7 @@ XuiBackButton1 208.632019 36.000000 -297.919983,239.880005,0.000000 +356.671997,309.000031,0.000000 XuiBackButton XuiBtnRewind XuiBackButton1 diff --git a/360/menu.cpp b/360/menu.cpp index 0670f2a988..3e079d7648 100644 --- a/360/menu.cpp +++ b/360/menu.cpp @@ -56,6 +56,7 @@ HRESULT CSSNES::UnregisterXuiClasses (void) HRESULT CSSNESFileBrowser::OnInit(XUIMessageInit * pInitData, BOOL& bHandled) { GetChildById(L"XuiRomList", &m_romlist); + GetChildById(L"XuiBackButton1", &m_back); GetChildById(L"XuiTxtRomPath", &m_rompathtitle); filebrowser_parse_directory(&browser, "game:\\roms\\", ssnes_console_get_rom_ext()); @@ -111,15 +112,29 @@ HRESULT CSSNESMain::OnInit(XUIMessageInit * pInitData, BOOL& bHandled) HRESULT CSSNESFileBrowser::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled ) { - int index = m_romlist.GetCurSel(); - if(browser.cur[index].d_type != FILE_ATTRIBUTE_DIRECTORY) + if(hObjPressed == m_romlist) { - memset(strbuffer, 0, sizeof(strbuffer)); - wcstombs(strbuffer, (const wchar_t *)m_romlist.GetText(index), sizeof(strbuffer)); - sprintf(g_console.rom_path, "game:\\roms\\%s", strbuffer); - g_console.menu_enable = false; - g_console.mode_switch = MODE_EMULATION; - init_ssnes = 1; + int index = m_romlist.GetCurSel(); + if(browser.cur[index].d_type != FILE_ATTRIBUTE_DIRECTORY) + { + memset(strbuffer, 0, sizeof(strbuffer)); + wcstombs(strbuffer, (const wchar_t *)m_romlist.GetText(index), sizeof(strbuffer)); + sprintf(g_console.rom_path, "game:\\roms\\%s", strbuffer); + g_console.menu_enable = false; + g_console.mode_switch = MODE_EMULATION; + init_ssnes = 1; + } + } + else if(hObjPressed == m_back) + { + HRESULT hr = XuiSceneNavigateBack(hSSNESSettings, hMainScene, XUSER_INDEX_FOCUS); + + if (FAILED(hr)) + { + SSNES_ERR("Failed to load scene.\n"); + } + + NavigateBack(hMainScene); } bHandled = TRUE; diff --git a/360/menu.h b/360/menu.h index 071da459e1..bf0e31f06c 100644 --- a/360/menu.h +++ b/360/menu.h @@ -37,6 +37,7 @@ class CSSNESFileBrowser: public CXuiSceneImpl { protected: CXuiList m_romlist; + CXuiControl m_back; CXuiTextElement m_rompathtitle; public: HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled );