diff --git a/RetroFE/Source/Collection/CollectionInfo.cpp b/RetroFE/Source/Collection/CollectionInfo.cpp index 45cb16c..d40cae0 100644 --- a/RetroFE/Source/Collection/CollectionInfo.cpp +++ b/RetroFE/Source/Collection/CollectionInfo.cpp @@ -177,9 +177,10 @@ bool CollectionInfo::itemIsLess(Item *lhs, Item *rhs) { if(lhs->leaf && !rhs->leaf) return true; if(!lhs->leaf && rhs->leaf) return false; - if(!lhs->collectionInfo->menusort && lhs->leaf && rhs->leaf) return false; if(lhs->collectionInfo->subsSplit && lhs->collectionInfo != rhs->collectionInfo) return lhs->collectionInfo->lowercaseName() < rhs->collectionInfo->lowercaseName(); + if(!lhs->collectionInfo->menusort && !lhs->leaf && !rhs->leaf) + return false; return lhs->lowercaseFullTitle() < rhs->lowercaseFullTitle(); } diff --git a/RetroFE/Source/Graphics/Component/ScrollingList.cpp b/RetroFE/Source/Graphics/Component/ScrollingList.cpp index 40ea538..33283bd 100644 --- a/RetroFE/Source/Graphics/Component/ScrollingList.cpp +++ b/RetroFE/Source/Graphics/Component/ScrollingList.cpp @@ -406,6 +406,24 @@ void ScrollingList::subChange( bool increment ) } +void ScrollingList::cfwLetterSubUp( ) +{ + if (Utils::toLower( collectionName ) != items_->at( (itemIndex_+selectedOffsetIndex_ ) % items_->size( ) )->collectionInfo->lowercaseName( )) + subChange( true ); + else + letterChange( true ); +} + + +void ScrollingList::cfwLetterSubDown( ) +{ + if (Utils::toLower( collectionName ) != items_->at( (itemIndex_+selectedOffsetIndex_ ) % items_->size( ) )->collectionInfo->lowercaseName( )) + subChange( false ); + else + letterChange( false ); +} + + void ScrollingList::allocateGraphicsMemory( ) { Component::allocateGraphicsMemory( ); diff --git a/RetroFE/Source/Graphics/Component/ScrollingList.h b/RetroFE/Source/Graphics/Component/ScrollingList.h index f86b75e..8a64b66 100644 --- a/RetroFE/Source/Graphics/Component/ScrollingList.h +++ b/RetroFE/Source/Graphics/Component/ScrollingList.h @@ -74,6 +74,8 @@ public: void subUp( ); void subDown( ); void subChange( bool increment ); + void cfwLetterSubUp( ); + void cfwLetterSubDown( ); void random( ); bool isIdle( ); unsigned int getScrollOffsetIndex( ); diff --git a/RetroFE/Source/Graphics/Page.cpp b/RetroFE/Source/Graphics/Page.cpp index 082d231..2691597 100644 --- a/RetroFE/Source/Graphics/Page.cpp +++ b/RetroFE/Source/Graphics/Page.cpp @@ -734,6 +734,26 @@ void Page::subScroll(ScrollDirection direction) } +void Page::cfwLetterSubScroll(ScrollDirection direction) +{ + for(std::vector::iterator it = activeMenu_.begin(); it != activeMenu_.end(); it++) + { + ScrollingList *menu = *it; + if(menu) + { + if(direction == ScrollDirectionForward) + { + menu->cfwLetterSubDown(); + } + if(direction == ScrollDirectionBack) + { + menu->cfwLetterSubUp(); + } + } + } +} + + unsigned int Page::getCollectionSize() { if(!(activeMenu_.size() > 0 && activeMenu_[0])) return 0; diff --git a/RetroFE/Source/Graphics/Page.h b/RetroFE/Source/Graphics/Page.h index c908954..5310167 100644 --- a/RetroFE/Source/Graphics/Page.h +++ b/RetroFE/Source/Graphics/Page.h @@ -67,6 +67,7 @@ public: void pageScroll(ScrollDirection direction); void letterScroll(ScrollDirection direction); void subScroll(ScrollDirection direction); + void cfwLetterSubScroll(ScrollDirection direction); unsigned int getCollectionSize(); unsigned int getSelectedIndex(); void selectRandom(); diff --git a/RetroFE/Source/RetroFE.cpp b/RetroFE/Source/RetroFE.cpp index 6756d1c..7c92092 100644 --- a/RetroFE/Source/RetroFE.cpp +++ b/RetroFE/Source/RetroFE.cpp @@ -1021,10 +1021,10 @@ RetroFE::RETROFE_STATE RetroFE::processUserInput( Page *page ) if (input_.keystate(UserInput::KeyCodeLetterUp)) { attract_.reset( ); - bool letterSub; - config_.getProperty( "letterSub", letterSub ); - if (letterSub && page->hasSubs()) - page->subScroll(Page::ScrollDirectionBack); + bool cfwLetterSub; + config_.getProperty( "cfwLetterSub", cfwLetterSub ); + if (cfwLetterSub && page->hasSubs()) + page->cfwLetterSubScroll(Page::ScrollDirectionBack); else page->letterScroll(Page::ScrollDirectionBack); state = RETROFE_MENUJUMP_REQUEST; @@ -1032,10 +1032,10 @@ RetroFE::RETROFE_STATE RetroFE::processUserInput( Page *page ) if (input_.keystate(UserInput::KeyCodeLetterDown)) { attract_.reset( ); - bool letterSub; - config_.getProperty( "letterSub", letterSub ); - if (letterSub && page->hasSubs()) - page->subScroll(Page::ScrollDirectionForward); + bool cfwLetterSub; + config_.getProperty( "cfwLetterSub", cfwLetterSub ); + if (cfwLetterSub && page->hasSubs()) + page->cfwLetterSubScroll(Page::ScrollDirectionForward); else page->letterScroll(Page::ScrollDirectionForward); state = RETROFE_MENUJUMP_REQUEST; @@ -1046,13 +1046,13 @@ RetroFE::RETROFE_STATE RetroFE::processUserInput( Page *page ) page->favPlaylist( ); state = RETROFE_PLAYLIST_REQUEST; } - if ( input_.newKeyPressed(UserInput::KeyCodeNextPlaylist) ) + if ( input_.keystate(UserInput::KeyCodeNextPlaylist) ) { attract_.reset( ); page->nextPlaylist( ); state = RETROFE_PLAYLIST_REQUEST; } - if ( input_.newKeyPressed(UserInput::KeyCodePrevPlaylist) ) + if ( input_.keystate(UserInput::KeyCodePrevPlaylist) ) { attract_.reset( ); page->prevPlaylist( ); @@ -1227,14 +1227,11 @@ CollectionInfo *RetroFE::getCollection(std::string collectionName) } closedir( dp ); + collection->sortItems( ); + bool menuSort = true; config_.getProperty( "collections." + collectionName + ".list.menuSort", menuSort ); - if ( menuSort ) - { - collection->sortItems( ); - } - MenuParser mp; mp.buildMenuItems( collection, menuSort); diff --git a/RetroFE/Source/Version.cpp b/RetroFE/Source/Version.cpp index 3d2e242..1b02fe4 100644 --- a/RetroFE/Source/Version.cpp +++ b/RetroFE/Source/Version.cpp @@ -21,7 +21,7 @@ std::string retrofe_version_major = "0"; std::string retrofe_version_minor = "8"; -std::string retrofe_version_build = "25"; +std::string retrofe_version_build = "26"; std::string Version::getString( )