void FreeImages(void) { int i; for (i=0; i<numimages; i++) { DeallocateImage(imagelist[i]); } ResetImages(); }
void CAddMusicAlbum::OnCommandCharSelector(SallyAPI::GUI::CGUIBaseObject* reporter) { std::string temp = reporter->GetText(); if (temp.length() <= 0) return; char searchForChar = temp[0]; // go to the top if (searchForChar == '*') { ResetImages(); UpdateImages(); return; } int newPosition = 0; std::vector<CAlbum*>::iterator iter = m_vAlbumList.begin(); while (iter != m_vAlbumList.end()) { CAlbum* item = *iter; temp = item->GetArtist(); if (temp.length() > 0) { temp = SallyAPI::String::StringHelper::StringToUpper(temp); char c = temp[0]; if (searchForChar == c) { // found!!!! newPosition = newPosition / m_iRows; m_iStartPicture = newPosition; UpdateImages(); return; } if (((c > searchForChar) && ((c >= 48 && c <= 57) || (c >= 65 && c <= 90) || (c >= 97 && c <= 122))) || (((searchForChar == 48 && searchForChar == 57)) && ((c >= 32 && c <= 47) || (c >= 58 && c <= 64) || (c >= 91 && c <= 96) || (c >= 123 && c <= 126)))) { // ok, we already at the next char newPosition = newPosition / m_iRows; m_iStartPicture = newPosition; UpdateImages(); return; } } ++newPosition; ++iter; } // not found... go to the last one newPosition = newPosition / m_iRows; m_iStartPicture = newPosition; UpdateImages(); }
void CAddMusicAlbum::OnCommandUpdateFilter() { std::string artist = m_pArtistFilter->GetText(); std::string album = m_pAlbumFilter->GetText(); std::string genre = m_pGenreFilter->GetText(); DeleteLoadedCovers(); m_pZoomBackground->Visible(false); m_pAlbumBackground->Visible(false); m_iStartPicture = 0; ResetImages(); UpdateImages(); CMediaDatabase::GetAlbumsFromDatabase(dynamic_cast<SallyAPI::GUI::CAppBase*> (m_pParent), &m_vAlbumList, artist, album, genre); m_tImageLoader.Start(); }
void InitTextures(void) { InitNoise(); ResetImages(); }