summaryrefslogtreecommitdiffstats
path: root/gui/fileselector.cpp
diff options
context:
space:
mode:
authorthat <github@that.at>2015-02-25 08:52:19 +0100
committerDees Troy <dees_troy@teamw.in>2015-03-05 04:46:10 +0100
commit0af779569095af43a2762843f40d2d5e88168bf9 (patch)
tree6fb324919992edc103f441303098ce1dedef03f9 /gui/fileselector.cpp
parentminuitwrp: fix crash issue, when the console use TTF font to display unicode font. (diff)
downloadandroid_bootable_recovery-0af779569095af43a2762843f40d2d5e88168bf9.tar
android_bootable_recovery-0af779569095af43a2762843f40d2d5e88168bf9.tar.gz
android_bootable_recovery-0af779569095af43a2762843f40d2d5e88168bf9.tar.bz2
android_bootable_recovery-0af779569095af43a2762843f40d2d5e88168bf9.tar.lz
android_bootable_recovery-0af779569095af43a2762843f40d2d5e88168bf9.tar.xz
android_bootable_recovery-0af779569095af43a2762843f40d2d5e88168bf9.tar.zst
android_bootable_recovery-0af779569095af43a2762843f40d2d5e88168bf9.zip
Diffstat (limited to 'gui/fileselector.cpp')
-rw-r--r--gui/fileselector.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/gui/fileselector.cpp b/gui/fileselector.cpp
index 8f6a7fa72..a97ff34b1 100644
--- a/gui/fileselector.cpp
+++ b/gui/fileselector.cpp
@@ -308,19 +308,23 @@ size_t GUIFileSelector::GetItemCount()
return folderSize + fileSize;
}
-int GUIFileSelector::GetListItem(size_t item_index, ImageResource*& icon, std::string &text)
+void GUIFileSelector::RenderItem(size_t itemindex, int yPos, bool selected)
{
size_t folderSize = mShowFolders ? mFolderList.size() : 0;
size_t fileSize = mShowFiles ? mFileList.size() : 0;
- if (item_index < folderSize) {
- text = mFolderList.at(item_index).fileName;
+ ImageResource* icon;
+ std::string text;
+
+ if (itemindex < folderSize) {
+ text = mFolderList.at(itemindex).fileName;
icon = mFolderIcon;
} else {
- text = mFileList.at(item_index - folderSize).fileName;
+ text = mFileList.at(itemindex - folderSize).fileName;
icon = mFileIcon;
}
- return 0;
+
+ RenderStdItem(yPos, selected, icon, text.c_str());
}
void GUIFileSelector::NotifySelect(size_t item_selected)