mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 21:27:44 +02:00
Start mcmod.info panel. Needs to be its own widget and included in legacy mod edit window, text labels need eliding
This commit is contained in:
@ -119,6 +119,18 @@ void Mod::ReadMCModInfo(QByteArray contents)
|
||||
m_name = firstObj.value("name").toString();
|
||||
m_version = firstObj.value("version").toString();
|
||||
m_homeurl = firstObj.value("url").toString();
|
||||
m_description = firstObj.value("description").toString();
|
||||
QJsonArray authors = firstObj.value("authors").toArray();
|
||||
if(authors.size() == 0) m_authors = "";
|
||||
else if(authors.size() >= 1)
|
||||
{
|
||||
m_authors = authors.at(0).toString();
|
||||
for(int i = 1; i < authors.size(); i++)
|
||||
{
|
||||
m_authors += ", " + authors.at(i).toString();
|
||||
}
|
||||
}
|
||||
m_credits = firstObj.value("credits").toString();
|
||||
return;
|
||||
}
|
||||
;
|
||||
|
18
logic/Mod.h
18
logic/Mod.h
@ -63,6 +63,21 @@ public:
|
||||
return m_homeurl;
|
||||
}
|
||||
|
||||
QString description() const
|
||||
{
|
||||
return m_description;
|
||||
}
|
||||
|
||||
QString authors() const
|
||||
{
|
||||
return m_authors;
|
||||
}
|
||||
|
||||
QString credits() const
|
||||
{
|
||||
return m_credits;
|
||||
}
|
||||
|
||||
// delete all the files of this mod
|
||||
bool destroy();
|
||||
// replace this mod with a copy of the other
|
||||
@ -99,6 +114,9 @@ protected:
|
||||
QString m_version;
|
||||
QString m_mcversion;
|
||||
QString m_homeurl;
|
||||
QString m_description;
|
||||
QString m_authors;
|
||||
QString m_credits;
|
||||
|
||||
ModType m_type;
|
||||
};
|
||||
|
Reference in New Issue
Block a user