mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-06 09:46:26 +02:00
UI: Reorganize Game Info dialog popup + localization
This commit is contained in:
parent
bd08a111a8
commit
717851985e
4 changed files with 317 additions and 234 deletions
|
@ -1,34 +1,26 @@
|
|||
using Gommon;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ava.Utilities.AppLibrary;
|
||||
|
||||
namespace Ryujinx.Ava.UI.ViewModels
|
||||
{
|
||||
public class ApplicationDataViewModel : BaseModel
|
||||
{
|
||||
private const string FormatVersion = "Current Version: {0}";
|
||||
private const string FormatDeveloper = "Developed by {0}";
|
||||
|
||||
private const string FormatExtension = "Game type: {0}";
|
||||
private const string FormatLastPlayed = "Last played: {0}";
|
||||
private const string FormatPlayTime = "Play time: {0}";
|
||||
private const string FormatSize = "Size: {0}";
|
||||
|
||||
private const string FormatHostedGames = "Hosted Games: {0}";
|
||||
private const string FormatPlayerCount = "Online Players: {0}";
|
||||
|
||||
public ApplicationData AppData { get; }
|
||||
|
||||
public ApplicationDataViewModel(ApplicationData appData) => AppData = appData;
|
||||
|
||||
public string FormattedVersion => FormatVersion.Format(AppData.Version);
|
||||
public string FormattedDeveloper => FormatDeveloper.Format(AppData.Developer);
|
||||
public string FormattedVersion => LocaleManager.Instance[LocaleKeys.GameListHeaderVersion].Format(AppData.Version);
|
||||
public string FormattedDeveloper => LocaleManager.Instance[LocaleKeys.GameListHeaderDeveloper].Format(AppData.Developer);
|
||||
|
||||
public string FormattedFileExtension => FormatExtension.Format(AppData.FileExtension);
|
||||
public string FormattedLastPlayed => FormatLastPlayed.Format(AppData.LastPlayedString);
|
||||
public string FormattedPlayTime => FormatPlayTime.Format(AppData.TimePlayedString);
|
||||
public string FormattedFileSize => FormatSize.Format(AppData.FileSizeString);
|
||||
public string FormattedFileExtension => LocaleManager.Instance[LocaleKeys.GameListHeaderFileExtension].Format(AppData.FileExtension);
|
||||
public string FormattedLastPlayed => LocaleManager.Instance[LocaleKeys.GameListHeaderLastPlayed].Format(AppData.LastPlayedString);
|
||||
public string FormattedPlayTime => LocaleManager.Instance[LocaleKeys.GameListHeaderTimePlayed].Format(AppData.TimePlayedString);
|
||||
public string FormattedFileSize => LocaleManager.Instance[LocaleKeys.GameListHeaderFileSize].Format(AppData.FileSizeString);
|
||||
|
||||
public string FormattedLdnInfo =>
|
||||
$"{FormatHostedGames.Format(AppData.GameCount)}\n{FormatPlayerCount.Format(AppData.PlayerCount)}";
|
||||
$"{LocaleManager.Instance[LocaleKeys.GameListHeaderHostedGames].Format(AppData.GameCount)}" +
|
||||
$"\n" +
|
||||
$"{LocaleManager.Instance[LocaleKeys.GameListHeaderPlayerCount].Format(AppData.PlayerCount)}";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue