Skip to content

Commit

Permalink
Add downloads column for ConsoleUI
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Mar 22, 2024
1 parent a50c334 commit 8b92014
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ConsoleUI/ModListScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ public ModListScreen(GameInstanceManager mgr, RepositoryDataManager repoData, Re
Width = 20,
Renderer = m => registry.LatestCompatibleGameVersion(game.KnownVersions, m.identifier)?.ToString() ?? "",
Comparer = (a, b) => registry.LatestCompatibleGameVersion(game.KnownVersions, a.identifier).CompareTo(registry.LatestCompatibleGameVersion(game.KnownVersions, b.identifier))
}, new ConsoleListBoxColumn<CkanModule>() {
Header = Properties.Resources.ModListDownloadsHeader,
Width = 12,
Renderer = m => repoData.GetDownloadCount(registry.Repositories.Values, m.identifier)
?.ToString()
?? "",
Comparer = (a, b) => (repoData.GetDownloadCount(registry.Repositories.Values, a.identifier) ?? 0)
.CompareTo(repoData.GetDownloadCount(registry.Repositories.Values, b.identifier) ?? 0),
}
},
1, 0, ListSortDirection.Descending,
Expand Down
3 changes: 3 additions & 0 deletions ConsoleUI/Properties/Resources.fr-FR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,9 @@ Si vous le retirez, CKAN ne pourra pas le réinstaller.</value>
<data name="ModListMaxGameVersionHeader" xml:space="preserve">
<value>Version de jeu max</value>
</data>
<data name="ModListDownloadsHeader" xml:space="preserve">
<value>Nombre de téléchargements</value>
</data>
<data name="ModListSearchFocusedGhostText" xml:space="preserve">
<value>&lt;Taper pour faire une recherche&gt;</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions ConsoleUI/Properties/Resources.it-IT.resx
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,9 @@ Se la disinstalli, CKAN non sarà in grado di reinstallarla.</value>
<data name="ModListMaxGameVersionHeader" xml:space="preserve">
<value>Versione massima del gioco</value>
</data>
<data name="ModListDownloadsHeader" xml:space="preserve">
<value>Download</value>
</data>
<data name="ModListSearchFocusedGhostText" xml:space="preserve">
<value>&lt;Digita per cercare&gt;</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions ConsoleUI/Properties/Resources.pl-PL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,9 @@ Jeśli go odinstalujesz, CKAN nie będzie mógł go ponownie zainstalować.</val
<data name="ModListMaxGameVersionHeader" xml:space="preserve">
<value>Maksymalna wersja gry</value>
</data>
<data name="ModListDownloadsHeader" xml:space="preserve">
<value>Ilość pobrań</value>
</data>
<data name="ModListSearchFocusedGhostText" xml:space="preserve">
<value>&lt;Wyszukaj&gt;</value>
</data>
Expand Down
1 change: 1 addition & 0 deletions ConsoleUI/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ If you uninstall it, CKAN will not be able to re-install it.</value></data>
<data name="ModListNameHeader" xml:space="preserve"><value>Name</value></data>
<data name="ModListVersionHeader" xml:space="preserve"><value>Version</value></data>
<data name="ModListMaxGameVersionHeader" xml:space="preserve"><value>Max game version</value></data>
<data name="ModListDownloadsHeader" xml:space="preserve"><value>Downloads</value></data>
<data name="ModListSearchFocusedGhostText" xml:space="preserve"><value>&lt;Type to search&gt;</value></data>
<data name="ModListSearchUnfocusedGhostText" xml:space="preserve"><value>&lt;Ctrl+F to search&gt;</value></data>
<data name="ModListCount" xml:space="preserve"><value>{0} mods</value></data>
Expand Down
3 changes: 3 additions & 0 deletions ConsoleUI/Properties/Resources.ru-RU.resx
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,9 @@
<data name="ModListMaxGameVersionHeader" xml:space="preserve">
<value>Макс.вер.</value>
</data>
<data name="ModListDownloadsHeader" xml:space="preserve">
<value>Загрузки</value>
</data>
<data name="ModListSearchFocusedGhostText" xml:space="preserve">
<value>&lt;Введите текст для поиска...&gt;</value>
</data>
Expand Down

0 comments on commit 8b92014

Please sign in to comment.