mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-01-11 19:39:09 +01:00
-added sort by button numbers for sourceflow. hold 'b' and press '+' to change from alpha to by button numbers and back.
This commit is contained in:
parent
d37b77e2d7
commit
4af2936db7
BIN
out/boot.dol
BIN
out/boot.dol
Binary file not shown.
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 3.3 MiB |
@ -1846,6 +1846,12 @@ bool CCoverFlow::_sortByWifiPlayers(CItem item1, CItem item2)
|
|||||||
return item1.hdr->wifi < item2.hdr->wifi;
|
return item1.hdr->wifi < item2.hdr->wifi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CCoverFlow::_sortByBtnNumbers(CItem item1, CItem item2)
|
||||||
|
{
|
||||||
|
if(item1.hdr->settings[0] == item2.hdr->settings[0]) return _sortByAlpha(item1, item2);
|
||||||
|
return item1.hdr->settings[0] < item2.hdr->settings[0];
|
||||||
|
}
|
||||||
|
|
||||||
bool CCoverFlow::start(const string &m_imgsDir)
|
bool CCoverFlow::start(const string &m_imgsDir)
|
||||||
{
|
{
|
||||||
if (m_items.empty()) return true;
|
if (m_items.empty()) return true;
|
||||||
@ -1863,6 +1869,8 @@ bool CCoverFlow::start(const string &m_imgsDir)
|
|||||||
sort(m_items.begin(), m_items.end(), CCoverFlow::_sortByPlayers);
|
sort(m_items.begin(), m_items.end(), CCoverFlow::_sortByPlayers);
|
||||||
else if (m_sorting == SORT_WIFIPLAYERS)
|
else if (m_sorting == SORT_WIFIPLAYERS)
|
||||||
sort(m_items.begin(), m_items.end(), CCoverFlow::_sortByWifiPlayers);
|
sort(m_items.begin(), m_items.end(), CCoverFlow::_sortByWifiPlayers);
|
||||||
|
else if (m_sorting == SORT_BTN_NUMBERS)
|
||||||
|
sort(m_items.begin(), m_items.end(), CCoverFlow::_sortByBtnNumbers);
|
||||||
|
|
||||||
// Load resident textures
|
// Load resident textures
|
||||||
if(!m_dvdskin_loaded)
|
if(!m_dvdskin_loaded)
|
||||||
@ -2254,7 +2262,7 @@ void CCoverFlow::_completeJump(void)
|
|||||||
|
|
||||||
void CCoverFlow::nextLetter(wchar_t *c)
|
void CCoverFlow::nextLetter(wchar_t *c)
|
||||||
{
|
{
|
||||||
if (m_covers == NULL)
|
if (m_covers == NULL || m_sorting == SORT_BTN_NUMBERS)
|
||||||
{
|
{
|
||||||
c[0] = L'\0';
|
c[0] = L'\0';
|
||||||
return;
|
return;
|
||||||
@ -2293,7 +2301,7 @@ void CCoverFlow::nextLetter(wchar_t *c)
|
|||||||
|
|
||||||
void CCoverFlow::prevLetter(wchar_t *c)
|
void CCoverFlow::prevLetter(wchar_t *c)
|
||||||
{
|
{
|
||||||
if (m_covers == NULL)
|
if (m_covers == NULL || m_sorting == SORT_BTN_NUMBERS)
|
||||||
{
|
{
|
||||||
c[0] = L'\0';
|
c[0] = L'\0';
|
||||||
return;
|
return;
|
||||||
|
@ -29,6 +29,7 @@ enum Sorting
|
|||||||
SORT_MAX,
|
SORT_MAX,
|
||||||
SORT_ESRB,
|
SORT_ESRB,
|
||||||
SORT_CONTROLLERS,
|
SORT_CONTROLLERS,
|
||||||
|
SORT_BTN_NUMBERS,
|
||||||
};
|
};
|
||||||
|
|
||||||
class CCoverFlow
|
class CCoverFlow
|
||||||
@ -357,6 +358,7 @@ private:
|
|||||||
static bool _sortByAlpha(CItem item1, CItem item2);
|
static bool _sortByAlpha(CItem item1, CItem item2);
|
||||||
static bool _sortByPlayers(CItem item1, CItem item2);
|
static bool _sortByPlayers(CItem item1, CItem item2);
|
||||||
static bool _sortByWifiPlayers(CItem item1, CItem item2);
|
static bool _sortByWifiPlayers(CItem item1, CItem item2);
|
||||||
|
static bool _sortByBtnNumbers(CItem item1, CItem item2);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void * _coverLoader(void *obj);
|
static void * _coverLoader(void *obj);
|
||||||
|
@ -596,15 +596,24 @@ int CMenu::main(void)
|
|||||||
MusicPlayer.Next();
|
MusicPlayer.Next();
|
||||||
}
|
}
|
||||||
/* change sorting with btn B and + */
|
/* change sorting with btn B and + */
|
||||||
else if(BTN_PLUS_PRESSED && !m_locked && !m_sourceflow && m_current_view < 8)
|
else if(BTN_PLUS_PRESSED && !m_locked && (m_current_view < 8 || m_sourceflow))// <8 excludes plugins and homebrew
|
||||||
{
|
{
|
||||||
bUsed = true;
|
bUsed = true;
|
||||||
u32 sort = 0;
|
u8 sort = 0;
|
||||||
|
if(m_sourceflow)
|
||||||
|
{
|
||||||
|
sort = m_cfg.getInt(SOURCEFLOW_DOMAIN, "sort", SORT_ALPHA);
|
||||||
|
if(sort == SORT_ALPHA)
|
||||||
|
sort = SORT_BTN_NUMBERS;
|
||||||
|
else
|
||||||
|
sort = SORT_ALPHA;
|
||||||
|
}
|
||||||
|
else
|
||||||
sort = loopNum((m_cfg.getInt(domain, "sort", 0)) + 1, SORT_MAX);
|
sort = loopNum((m_cfg.getInt(domain, "sort", 0)) + 1, SORT_MAX);
|
||||||
//if((m_current_view == COVERFLOW_HOMEBREW || m_current_view == COVERFLOW_PLUGIN) && sort > SORT_LASTPLAYED)
|
|
||||||
// sort = SORT_ALPHA;
|
|
||||||
m_cfg.setInt(domain, "sort", sort);
|
m_cfg.setInt(domain, "sort", sort);
|
||||||
|
/* set coverflow to new sorting */
|
||||||
_initCF();
|
_initCF();
|
||||||
|
/* set text to display */
|
||||||
wstringEx curSort ;
|
wstringEx curSort ;
|
||||||
if(sort == SORT_ALPHA)
|
if(sort == SORT_ALPHA)
|
||||||
curSort = m_loc.getWString(m_curLanguage, "alphabetically", L"Alphabetically");
|
curSort = m_loc.getWString(m_curLanguage, "alphabetically", L"Alphabetically");
|
||||||
@ -618,6 +627,8 @@ int CMenu::main(void)
|
|||||||
curSort = m_loc.getWString(m_curLanguage, "bywifiplayers", L"By Wifi Players");
|
curSort = m_loc.getWString(m_curLanguage, "bywifiplayers", L"By Wifi Players");
|
||||||
else if(sort == SORT_PLAYERS)
|
else if(sort == SORT_PLAYERS)
|
||||||
curSort = m_loc.getWString(m_curLanguage, "byplayers", L"By Players");
|
curSort = m_loc.getWString(m_curLanguage, "byplayers", L"By Players");
|
||||||
|
else if(sort == SORT_BTN_NUMBERS)
|
||||||
|
curSort = m_loc.getWString(m_curLanguage, "bybtnnumbers", L"By Button Numbers");
|
||||||
m_showtimer = 120;
|
m_showtimer = 120;
|
||||||
m_btnMgr.setText(m_mainLblNotice, curSort);
|
m_btnMgr.setText(m_mainLblNotice, curSort);
|
||||||
m_btnMgr.show(m_mainLblNotice);
|
m_btnMgr.show(m_mainLblNotice);
|
||||||
|
@ -21,6 +21,7 @@ bylastplayed=By Last Played
|
|||||||
byplaycount=By Play Count
|
byplaycount=By Play Count
|
||||||
byplayers=By Players
|
byplayers=By Players
|
||||||
bywifiplayers=By Wifi Players
|
bywifiplayers=By Wifi Players
|
||||||
|
bybtnnumbers=By Button Numbers
|
||||||
cat1=Select Categories
|
cat1=Select Categories
|
||||||
cat2=Clear
|
cat2=Clear
|
||||||
cd1=Back
|
cd1=Back
|
||||||
|
Loading…
x
Reference in New Issue
Block a user