mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-28 16:53:40 +01:00
Store: Make description focusable.
Descriptions aren't that long currently, but this allows for longer descriptions with controller/keyboard scrolling.
This commit is contained in:
1 parent
32f0c19e7c
commit
69ef21a65c
1 file changed
+8
-5
+8
-5
@@ -270,13 +270,16 @@ void ProductView::CreateViews() {
|
||||
cancelButton_->SetVisibility(isDownloading ? V_VISIBLE : V_GONE);
|
||||
|
||||
// Add star rating, comments etc?
|
||||
Add(new TextView(entry_.description, ALIGN_LEFT | FLAG_WRAP_TEXT, false));
|
||||
|
||||
// Draw each line separately so focusing can scroll.
|
||||
std::vector<std::string> lines;
|
||||
SplitString(entry_.description, '\n', lines);
|
||||
for (auto &line : lines) {
|
||||
Add(new TextView(line, ALIGN_LEFT | FLAG_WRAP_TEXT, false))->SetFocusable(true);
|
||||
}
|
||||
|
||||
float size = entry_.size / (1024.f * 1024.f);
|
||||
char temp[256];
|
||||
sprintf(temp, "%s: %.2f %s", st->T("Size"), size, st->T("MB"));
|
||||
|
||||
Add(new TextView(temp));
|
||||
Add(new TextView(StringFromFormat("%s: %.2f %s", st->T("Size"), size, st->T("MB"))));
|
||||
}
|
||||
|
||||
void ProductView::Update() {
|
||||
|
||||
Reference in new issue
Block a user