mirror of https://github.com/mgba-emu/mgba.git
Qt: Add patrons for October
This commit is contained in:
parent
a067bca332
commit
f4798f9f04
|
@ -0,0 +1,7 @@
|
|||
Trey Boyer
|
||||
Christopher Cole
|
||||
Philip Horton
|
||||
Lucy
|
||||
Joshua Minor
|
||||
Rohit Nirmal
|
||||
Yuri Kunde Schlesner
|
|
@ -9,6 +9,7 @@ extern "C" {
|
|||
#include "core/version.h"
|
||||
}
|
||||
|
||||
#include <QFile>
|
||||
#include <QPixmap>
|
||||
|
||||
using namespace QGBA;
|
||||
|
@ -28,16 +29,48 @@ AboutScreen::AboutScreen(QWidget* parent)
|
|||
tree = QLatin1String(projectVersion);
|
||||
}
|
||||
|
||||
QFile patronFile(":/res/patrons.txt");
|
||||
QStringList patronList;
|
||||
patronFile.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
while (true) {
|
||||
QByteArray line = patronFile.readLine();
|
||||
if (line.isEmpty()) {
|
||||
break;
|
||||
}
|
||||
patronList.append(QString::fromUtf8(line).trimmed());
|
||||
}
|
||||
|
||||
m_ui.projectName->setText(QLatin1String(projectName));
|
||||
m_ui.projectVersion->setText(QLatin1String(projectVersion));
|
||||
QString gitInfo = m_ui.gitInfo->text();
|
||||
gitInfo.replace("{gitBranch}", QLatin1String(gitBranch));
|
||||
gitInfo.replace("{gitCommit}", QLatin1String(gitCommit));
|
||||
m_ui.gitInfo->setText(gitInfo);
|
||||
QString description = m_ui.description->text();
|
||||
description.replace("{projectName}", QLatin1String(projectName));
|
||||
m_ui.description->setText(description);
|
||||
QString extraLinks = m_ui.extraLinks->text();
|
||||
extraLinks.replace("{gitBranch}", tree);
|
||||
m_ui.extraLinks->setText(extraLinks);
|
||||
|
||||
{
|
||||
QString gitInfo = m_ui.gitInfo->text();
|
||||
gitInfo.replace("{gitBranch}", QLatin1String(gitBranch));
|
||||
gitInfo.replace("{gitCommit}", QLatin1String(gitCommit));
|
||||
m_ui.gitInfo->setText(gitInfo);
|
||||
}
|
||||
|
||||
{
|
||||
QString description = m_ui.description->text();
|
||||
description.replace("{projectName}", QLatin1String(projectName));
|
||||
m_ui.description->setText(description);
|
||||
}
|
||||
|
||||
{
|
||||
QString extraLinks = m_ui.extraLinks->text();
|
||||
extraLinks.replace("{gitBranch}", tree);
|
||||
m_ui.extraLinks->setText(extraLinks);
|
||||
}
|
||||
|
||||
{
|
||||
QString patronsHeader = m_ui.patronsHeader->text();
|
||||
patronsHeader.replace("{projectName}", QLatin1String(projectName));
|
||||
m_ui.patronsHeader->setText(patronsHeader);
|
||||
}
|
||||
|
||||
{
|
||||
QString patrons = m_ui.patrons->text();
|
||||
patrons.replace("{patrons}", patronList.join(" • "));
|
||||
m_ui.patrons->setText(patrons);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>609</width>
|
||||
<height>272</height>
|
||||
<width>617</width>
|
||||
<height>341</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -17,6 +17,34 @@
|
|||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="extraLinks">
|
||||
<property name="text">
|
||||
<string><a href="http://mgba.io/">Website</a> • <a href="https://forums.mgba.io/">Forums / Support</a> • <a href="https://patreon.com/mgba">Donate</a> • <a href="https://github.com/mgba-emu/mgba/tree/{gitBranch}">Source</a></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="gitInfo">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Branch: <tt>{gitBranch}</tt><br/>Revision: <tt>{gitCommit}</tt></string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="projectName">
|
||||
<property name="font">
|
||||
|
@ -34,7 +62,20 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="4">
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="QLabel" name="patronsHeader">
|
||||
<property name="text">
|
||||
<string>{projectName} would like to thank the following patrons from Patreon:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="4">
|
||||
<widget class="QLabel" name="copyright">
|
||||
<property name="font">
|
||||
<font>
|
||||
|
@ -143,34 +184,19 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd.</string>
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="extraLinks">
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QLabel" name="patrons">
|
||||
<property name="text">
|
||||
<string><a href="http://mgba.io/">Website</a> • <a href="https://forums.mgba.io/">Forums / Support</a> • <a href="https://patreon.com/mgba">Donate</a> • <a href="https://github.com/mgba-emu/mgba/tree/{gitBranch}">Source</a></string>
|
||||
<string>{patrons}</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="gitInfo">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Branch: <tt>{gitBranch}</tt><br/>Revision: <tt>{gitCommit}</tt></string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
<qresource>
|
||||
<file>../../../res/mgba-1024.png</file>
|
||||
<file>../../../res/keymap.qpic</file>
|
||||
<file>../../../res/patrons.txt</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
Loading…
Reference in New Issue