mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Updated Resource Pack Formats
superseeds #4242 also this adds support for min_format and max_format and the major.minor versioning. Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
98c3129424
commit
d3f8dfe65c
7 changed files with 309 additions and 115 deletions
|
|
@ -69,17 +69,8 @@ QVariant ResourcePackFolderModel::data(const QModelIndex& index, int role) const
|
|||
return rowBackground(row);
|
||||
case Qt::DisplayRole: {
|
||||
if (column == PackFormatColumn) {
|
||||
auto& resource = at(row);
|
||||
auto pack_format = resource.packFormat();
|
||||
if (pack_format == 0)
|
||||
return tr("Unrecognized");
|
||||
|
||||
auto version_bounds = resource.compatibleVersions();
|
||||
if (version_bounds.first.toString().isEmpty())
|
||||
return QString::number(pack_format);
|
||||
|
||||
return QString("%1 (%2 - %3)")
|
||||
.arg(QString::number(pack_format), version_bounds.first.toString(), version_bounds.second.toString());
|
||||
const auto& resource = at(row);
|
||||
return resource.packFormatStr();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue