Skip to content

Commit 8defbe8

Browse files
authored
Merge pull request #19426 from hrydgard/store-update-2
Additional store UI update
2 parents b4384ce + ba9ee8c commit 8defbe8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+86
-72
lines changed

Common/UI/View.cpp

+15-3
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,13 @@ void TextView::GetContentDimensionsBySpec(const UIContext &dc, MeasureSpec horiz
10431043
if (bullet_) {
10441044
bounds.w -= bulletOffset;
10451045
}
1046-
dc.MeasureTextRect(small_ ? dc.theme->uiFontSmall : dc.theme->uiFont, 1.0f, 1.0f, text_, bounds, &w, &h, textAlign_);
1046+
const FontStyle *style = &dc.theme->uiFont;
1047+
if (small_) {
1048+
style = &dc.theme->uiFontSmall;
1049+
} else if (big_) {
1050+
style = &dc.theme->uiFontBig;
1051+
}
1052+
dc.MeasureTextRect(*style, 1.0f, 1.0f, text_, bounds, &w, &h, textAlign_);
10471053
w += pad_ * 2.0f;
10481054
h += pad_ * 2.0f;
10491055
if (bullet_) {
@@ -1074,7 +1080,13 @@ void TextView::Draw(UIContext &dc) {
10741080
style.background.color &= 0x7fffffff;
10751081
dc.FillRect(style.background, bounds_);
10761082
}
1077-
dc.SetFontStyle(small_ ? dc.theme->uiFontSmall : dc.theme->uiFont);
1083+
const FontStyle *style = &dc.theme->uiFont;
1084+
if (small_) {
1085+
style = &dc.theme->uiFontSmall;
1086+
} else if (big_) {
1087+
style = &dc.theme->uiFontBig;
1088+
}
1089+
dc.SetFontStyle(*style);
10781090

10791091
Bounds textBounds = bounds_;
10801092

@@ -1094,7 +1106,7 @@ void TextView::Draw(UIContext &dc) {
10941106
dc.DrawTextRect(text_, textBounds.Offset(1.0f + pad_, 1.0f + pad_), shadowColor, textAlign_);
10951107
}
10961108
dc.DrawTextRect(text_, textBounds.Offset(pad_, pad_), textColor, textAlign_);
1097-
if (small_) {
1109+
if (small_ || big_) {
10981110
// If we changed font style, reset it.
10991111
dc.SetFontStyle(dc.theme->uiFont);
11001112
}

Common/UI/View.h

+8-6
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ struct FontStyle {
9393
struct Theme {
9494
FontStyle uiFont;
9595
FontStyle uiFontSmall;
96-
FontStyle uiFontSmaller;
96+
FontStyle uiFontBig;
9797

9898
ImageID checkOn;
9999
ImageID checkOff;
@@ -982,10 +982,10 @@ class BorderView : public InertView {
982982
class TextView : public InertView {
983983
public:
984984
TextView(std::string_view text, LayoutParams *layoutParams = 0)
985-
: InertView(layoutParams), text_(text), textAlign_(0), textColor_(0xFFFFFFFF), small_(false), shadow_(false), focusable_(false), clip_(true) {}
985+
: InertView(layoutParams), text_(text), textAlign_(0), textColor_(0xFFFFFFFF), small_(false) {}
986986

987987
TextView(std::string_view text, int textAlign, bool small, LayoutParams *layoutParams = 0)
988-
: InertView(layoutParams), text_(text), textAlign_(textAlign), textColor_(0xFFFFFFFF), small_(small), shadow_(false), focusable_(false), clip_(true) {}
988+
: InertView(layoutParams), text_(text), textAlign_(textAlign), textColor_(0xFFFFFFFF), small_(small) {}
989989

990990
void GetContentDimensionsBySpec(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert, float &w, float &h) const override;
991991
void Draw(UIContext &dc) override;
@@ -994,6 +994,7 @@ class TextView : public InertView {
994994
const std::string &GetText() const { return text_; }
995995
std::string DescribeText() const override { return GetText(); }
996996
void SetSmall(bool small) { small_ = small; }
997+
void SetBig(bool big) { big_ = big; }
997998
void SetTextColor(uint32_t color) { textColor_ = color; hasTextColor_ = true; }
998999
void SetShadow(bool shadow) { shadow_ = shadow; }
9991000
void SetFocusable(bool focusable) { focusable_ = focusable; }
@@ -1009,9 +1010,10 @@ class TextView : public InertView {
10091010
uint32_t textColor_;
10101011
bool hasTextColor_ = false;
10111012
bool small_;
1012-
bool shadow_;
1013-
bool focusable_;
1014-
bool clip_;
1013+
bool big_ = false;
1014+
bool shadow_ = false;
1015+
bool focusable_ = false;
1016+
bool clip_ = true;
10151017
bool bullet_ = false;
10161018
float pad_ = 0.0f;
10171019
};

UI/Store.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ void ProductView::CreateViews() {
288288
if (!entry_.iconURL.empty()) {
289289
Add(new HttpImageFileView(&g_DownloadManager, ResolveUrl(StoreBaseUrl(), entry_.iconURL), IS_FIXED))->SetFixedSize(144, 88);
290290
}
291-
Add(new TextView(entry_.name));
291+
Add(new TextView(entry_.name))->SetBig(true);
292292
Add(new TextView(entry_.author));
293293

294294
auto st = GetI18NCategory(I18NCat::STORE);
@@ -313,7 +313,7 @@ void ProductView::CreateViews() {
313313
g_GameManager.UninstallGameOnThread(entry_.file);
314314
return UI::EVENT_DONE;
315315
});
316-
Add(new TextView(st->T("Installed")));
316+
// Add(new TextView(st->T("Installed"))); // Not really needed
317317
}
318318

319319
cancelButton_ = Add(new Button(di->T("Cancel")));
@@ -334,8 +334,8 @@ void ProductView::CreateViews() {
334334

335335
if (!entry_.license.empty()) {
336336
LinearLayout *horiz = Add(new LinearLayout(ORIENT_HORIZONTAL));
337-
horiz->Add(new TextView(StringFromFormat("%s: %s", st->T_cstr("License"), entry_.license.c_str())));
338-
horiz->Add(new Button(st->T("Details")))->OnClick.Add([this](UI::EventParams) {
337+
horiz->Add(new TextView(StringFromFormat("%s: %s", st->T_cstr("License"), entry_.license.c_str()), new LinearLayoutParams(0.0, G_VCENTER)));
338+
horiz->Add(new Button(di->T("More information..."), new LinearLayoutParams(0.0, G_VCENTER)))->OnClick.Add([this](UI::EventParams) {
339339
std::string url = StringFromFormat("https://www.ppsspp.org/docs/reference/homebrew-store-distribution/#%s", entry_.file.c_str());
340340
System_LaunchUrl(LaunchUrlType::BROWSER_URL, url.c_str());
341341
return UI::EVENT_DONE;

UI/Theme.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ void UpdateTheme(UIContext *ctx) {
197197
#if defined(USING_WIN_UI) || PPSSPP_PLATFORM(UWP) || defined(USING_QT_UI)
198198
ui_theme.uiFont = UI::FontStyle(FontID("UBUNTU24"), g_Config.sFont.c_str(), 22);
199199
ui_theme.uiFontSmall = UI::FontStyle(FontID("UBUNTU24"), g_Config.sFont.c_str(), 17);
200-
ui_theme.uiFontSmaller = UI::FontStyle(FontID("UBUNTU24"), g_Config.sFont.c_str(), 13);
200+
ui_theme.uiFontBig = UI::FontStyle(FontID("UBUNTU24"), g_Config.sFont.c_str(), 28);
201201
#else
202202
ui_theme.uiFont = UI::FontStyle(FontID("UBUNTU24"), "", 20);
203203
ui_theme.uiFontSmall = UI::FontStyle(FontID("UBUNTU24"), "", 15);
204-
ui_theme.uiFontSmaller = UI::FontStyle(FontID("UBUNTU24"), "", 12);
204+
ui_theme.uiFontBig = UI::FontStyle(FontID("UBUNTU24"), "", 26);
205205
#endif
206206

207207
ui_theme.checkOn = ImageID("I_CHECKEDBOX");

assets/lang/ar_AE.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1180,10 +1180,10 @@ Search term = Search term
11801180

11811181
[Store]
11821182
Connection Error = ‎خطأ في الإتصال
1183-
Details = Details
11841183
Install = ‎تثبيت
11851184
Installed = ‎مثبتة بالفعل
11861185
Launch Game = ‎إبدء اللعبة
1186+
License = License
11871187
Loading... = ‎تحميل...
11881188
MB = ‎ميجا
11891189
Size = ‎الحجم

assets/lang/az_AZ.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1172,10 +1172,10 @@ Search term = Search term
11721172

11731173
[Store]
11741174
Connection Error = Connection error
1175-
Details = Details
11761175
Install = Install
11771176
Installed = Installed
11781177
Launch Game = Launch game
1178+
License = License
11791179
Loading... = Loading...
11801180
MB = MB
11811181
Size = Size

assets/lang/bg_BG.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1172,10 +1172,10 @@ Search term = Search term
11721172

11731173
[Store]
11741174
Connection Error = Грешка при свързването
1175-
Details = Details
11761175
Install = Инсталирай
11771176
Installed = Вече е инсталирано
11781177
Launch Game = Launch game
1178+
License = License
11791179
Loading... = Зареждане...
11801180
MB = MB
11811181
Size = Големина

assets/lang/ca_ES.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1172,10 +1172,10 @@ Search term = Search term
11721172
11731173
[Store]
11741174
Connection Error = Error de connexió
1175-
Details = Details
11761175
Install = Instal·lar
11771176
Installed = Ja instal·lat
11781177
Launch Game = Iniciar joc
1178+
License = License
11791179
Loading... = Carregant...
11801180
MB = MB
11811181
Size = Mida

assets/lang/cz_CZ.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1172,10 +1172,10 @@ Search term = Search term
11721172

11731173
[Store]
11741174
Connection Error = Chyba připojení
1175-
Details = Details
11761175
Install = Nainstalovat
11771176
Installed = Již instalováno
11781177
Launch Game = Spustit hru
1178+
License = License
11791179
Loading... = Načítání...
11801180
MB = MB
11811181
Size = Velikost

assets/lang/da_DK.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1172,10 +1172,10 @@ Search term = Search term
11721172

11731173
[Store]
11741174
Connection Error = Forbindelsesfejl
1175-
Details = Details
11761175
Install = Installer
11771176
Installed = Allerede installeret
11781177
Launch Game = Start spil
1178+
License = License
11791179
Loading... = Henter...
11801180
MB = MB
11811181
Size = Størrelse

assets/lang/de_DE.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1172,10 +1172,10 @@ Search term = Suchbegriff
11721172
11731173
[Store]
11741174
Connection Error = Verbindungsfehler
1175-
Details = Details
11761175
Install = Installieren
11771176
Installed = Bereits installiert
11781177
Launch Game = Spiel starten
1178+
License = License
11791179
Loading... = Lade...
11801180
MB = MB
11811181
Size = Größe

assets/lang/dr_ID.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1172,10 +1172,10 @@ Search term = Search term
11721172
11731173
[Store]
11741174
Connection Error = Connection error
1175-
Details = Details
11761175
Install = Install
11771176
Installed = Installed
11781177
Launch Game = Launch game
1178+
License = License
11791179
Loading... = Loading...
11801180
MB = MB
11811181
Size = Size

assets/lang/en_US.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1188,10 +1188,10 @@ Untitled PSP game = Untitled PSP game
11881188

11891189
[Store]
11901190
Connection Error = Connection error
1191-
Details = Details
11921191
Install = Install
11931192
Installed = Installed
11941193
Launch Game = Launch game
1194+
License = License
11951195
Loading... = Loading...
11961196
MB = MB
11971197
Size = Size

assets/lang/es_ES.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -1173,15 +1173,15 @@ Search term = Buscar término
11731173
11741174
[Store]
11751175
Connection Error = Error de conexión
1176-
Details = Details
11771176
Install = Instalar
11781177
Installed = Ya instalado
11791178
Launch Game = Iniciar juego
1179+
License = Licencia
11801180
Loading... = Cargando...
11811181
MB = MB
11821182
Size = Tamaño
11831183
Uninstall = Desinstalar
1184-
Website = Website
1184+
Website = Sitio web
11851185
11861186
[SysInfo]
11871187
%0.2f Hz = %0.2f Hz

assets/lang/es_LA.ini

+9-9
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Locked achievements = Logros bloqueados
3737
Log bad memory accesses = Registrar malos accesos a la memoría
3838
Mastered %1 = Completaste %1
3939
Notifications = Notificaciones
40-
Recently unlocked achievements = Logros recientemente desbloqueados
40+
Recently unlocked achievements = Logros recientemente desbloqueados
4141
Reconnected to RetroAchievements. = Reconectado a RetroAchievements.
4242
Register on www.retroachievements.org = Registrate en www.retroachievements.org
4343
RetroAchievements are not available for this game = RetroAchievements no están disponibles para este juego
@@ -99,7 +99,7 @@ Calibrate Analog Stick = Calibrar análogo
9999
Calibrate = Calibrar
100100
Calibrated = Calibrado
101101
Calibration = Calibración
102-
Circular deadzone = Circular deadzone o Zona Inactiva circular
102+
Circular deadzone = Circular deadzone o Zona Inactiva circular
103103
Circular stick input = Entrada del stick circular
104104
Classic = Clásico
105105
Confine Mouse = Fijar el ratón al área de la ventana/pantalla
@@ -321,7 +321,7 @@ Log Dropped Frame Statistics = Registrar estadísticas de frames caídos
321321
Log Level = Nivel de registro
322322
Log View = Ver el registro
323323
Logging Channels = Canales de registro
324-
Multi-threaded rendering = Renderización Multi-threaded
324+
Multi-threaded rendering = Renderización Multi-threaded
325325
Next = Siguiente
326326
No block = No bloquear
327327
Off = Off
@@ -716,7 +716,7 @@ Autoconfigure = Autoconfigurar
716716
Autoconfigure for device = Autoconfigurar para dispositivo
717717
Bind All = Ocultar todo
718718
Clear All = Borrar todo
719-
Combo mappings are not enabled = Las asignaciones combinadas o combo mappings no están habilitadas
719+
Combo mappings are not enabled = Las asignaciones combinadas o combo mappings no están habilitadas
720720
Control modifiers = Control modifiers
721721
Default All = Restaurar
722722
Emulator controls = Emulator controls
@@ -1110,7 +1110,7 @@ Perfect Description = Perfecta emulación para este juego.
11101110
Plays = Jugable
11111111
Plays Description = Perfecta jugabilidad pero puede tener glitches.
11121112
ReportButton = Informar de error
1113-
Show disc CRC = Mostrar CRC del disco
1113+
Show disc CRC = Mostrar CRC del disco
11141114
Speed = Velocidad
11151115
Submit Feedback = Enviar comentario
11161116
SuggestionConfig = Ver reportes en la web para una buena configuración.
@@ -1174,15 +1174,15 @@ Search term = Buscar termino
11741174

11751175
[Store]
11761176
Connection Error = Error de conexión
1177-
Details = Details
11781177
Install = Instalar
11791178
Installed = Ya instalado
11801179
Launch Game = Lanzar juego
1180+
License = Licencia
11811181
Loading... = Cargando...
11821182
MB = MB
11831183
Size = Tamaño
11841184
Uninstall = Desinstalar
1185-
Website = Website
1185+
Website = Sitio web
11861186

11871187
[SysInfo]
11881188
%0.2f Hz = %0.2f Hz
@@ -1397,7 +1397,7 @@ Default = Por defecto
13971397
[UI Elements]
13981398
%1 button = %1 botón
13991399
%1 checkbox = %1 checkbox
1400-
%1 choice = %1 elección
1400+
%1 choice = %1 elección
14011401
%1 heading = %1 Encabezado o título
14021402
%1 radio button = %1 radio button
14031403
%1 text field = %1 campo de texto
@@ -1413,7 +1413,7 @@ New version of PPSSPP available = Nueva versión de PPSSPP disponible
14131413

14141414
[VR]
14151415
% of native FoV = % of native FoV
1416-
6DoF movement = movimiento 6DoF
1416+
6DoF movement = movimiento 6DoF
14171417
Distance to 2D menus and scenes = Distancia a menús y escenas 2D
14181418
Distance to 3D scenes when VR disabled = Distancia a escenas 3D cuando la realidad virtual está desactivada
14191419
Enable immersive mode = Enable immersive mode

assets/lang/fa_IR.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1172,10 +1172,10 @@ Search term = عبارت جستجو
11721172

11731173
[Store]
11741174
Connection Error = خطای اتصال
1175-
Details = Details
11761175
Install = نصب
11771176
Installed = نصب شده
11781177
Launch Game = اجرای بازی
1178+
License = License
11791179
Loading... = بارگیری...
11801180
MB = MB
11811181
Size = حجم

assets/lang/fi_FI.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1172,10 +1172,10 @@ Search term = Hakusana
11721172
11731173
[Store]
11741174
Connection Error = Yhteysvirhe
1175-
Details = Details
11761175
Install = Asenna
11771176
Installed = Jo asennettu
11781177
Launch Game = Käynnistä peli
1178+
License = License
11791179
Loading... = Ladataan...
11801180
MB = Mt
11811181
Size = Koko

assets/lang/fr_FR.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1163,10 +1163,10 @@ Search term = Search term
11631163

11641164
[Store]
11651165
Connection Error = Erreur de connexion
1166-
Details = Details
11671166
Install = Installer
11681167
Installed = Déjà installé
11691168
Launch Game = Lancer le jeu
1169+
License = License
11701170
Loading... = Chargement...
11711171
MB = Mo
11721172
Size = Taille

assets/lang/gl_ES.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1172,10 +1172,10 @@ Search term = Search term
11721172

11731173
[Store]
11741174
Connection Error = Erro de conexión
1175-
Details = Details
11761175
Install = Instalar
11771176
Installed = Xa instalado
11781177
Launch Game = Launch game
1178+
License = License
11791179
Loading... = Cargando...
11801180
MB = MB
11811181
Size = Tamaño

assets/lang/gr_EL.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1172,10 +1172,10 @@ Search term = Search term
11721172

11731173
[Store]
11741174
Connection Error = Σφάλμα σύνδεσης
1175-
Details = Details
11761175
Install = Εγκατάσταση
11771176
Installed = Ήδη εγκατεστημένο
11781177
Launch Game = Έναρξη παιχνιδιού
1178+
License = License
11791179
Loading... = Φόρτωση...
11801180
MB = MB
11811181
Size = Μέγεθος

0 commit comments

Comments
 (0)