No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
24 changed files with 644 additions and 261 deletions
-
26CMakeLists.txt
-
173src/CMakeLists.txt
-
2src/Eden/Interface/GraphicsDeviceInterface.cpp
-
33src/Eden/Interface/MainWindowInterface.cpp
-
8src/Eden/Interface/MainWindowInterface.h
-
2src/Eden/Interface/MetaObjectHelper.h
-
27src/Eden/Interface/QMLSetting.cpp
-
4src/Eden/Interface/SettingsInterface.cpp
-
84src/Eden/Main/AboutDialog.qml
-
3src/Eden/Main/CMakeLists.txt
-
142src/Eden/Main/DepsDialog.qml
-
9src/Eden/Main/GameCarousel.qml
-
83src/Eden/Main/Main.qml
-
1src/Eden/Models/CMakeLists.txt
-
50src/Eden/Models/DependencyModel.cpp
-
29src/Eden/Models/DependencyModel.h
-
57src/Eden/Native/CMakeLists.txt
-
5src/Eden/Native/EdenApplication.cpp
-
10src/Eden/Native/main.cpp
-
1src/qt_common/CMakeLists.txt
-
4src/qt_common/externals/cpmfile.json
-
7src/qt_common/qt_constants.h
-
137src/yuzu/CMakeLists.txt
-
8src/yuzu/main_window.cpp
@ -0,0 +1,84 @@ |
|||||
|
import QtQuick |
||||
|
import QtQuick.Layouts |
||||
|
import QtQuick.Controls |
||||
|
|
||||
|
import Carboxyl.Contour |
||||
|
|
||||
|
NativeDialog { |
||||
|
title: qsTr("About Eden") |
||||
|
|
||||
|
width: 700 |
||||
|
height: 400 |
||||
|
|
||||
|
standardButtons: Dialog.Ok |
||||
|
|
||||
|
Image { |
||||
|
id: img |
||||
|
anchors { |
||||
|
left: parent.left |
||||
|
verticalCenter: parent.verticalCenter |
||||
|
|
||||
|
margins: 10 |
||||
|
} |
||||
|
|
||||
|
source: "qrc:/icons/default/256x256/eden.png" |
||||
|
width: 200 |
||||
|
height: 200 |
||||
|
} |
||||
|
|
||||
|
ColumnLayout { |
||||
|
anchors { |
||||
|
left: img.right |
||||
|
top: parent.top |
||||
|
bottom: parent.bottom |
||||
|
right: parent.right |
||||
|
|
||||
|
margins: 10 |
||||
|
} |
||||
|
|
||||
|
Label { |
||||
|
font.pixelSize: 28 |
||||
|
text: qsTr("Eden") |
||||
|
} |
||||
|
|
||||
|
Label { |
||||
|
font.pixelSize: 14 |
||||
|
text: TitleManager.title |
||||
|
} |
||||
|
|
||||
|
Label { |
||||
|
text: qsTr("Eden is an experimental open-source emulator for the Nintendo Switch licensed under the \ |
||||
|
GPLv3.0+, based on the Yuzu emulator project, which ended development back in March 2024.\n\n\ |
||||
|
This software should not be used to play games you have not legally obtained.") |
||||
|
wrapMode: Text.WordWrap |
||||
|
Layout.fillWidth: true |
||||
|
Layout.fillHeight: true |
||||
|
font.pointSize: 12 |
||||
|
} |
||||
|
|
||||
|
Label { |
||||
|
text: '<a href="https://eden-emulator.github.io/" style="text-decoration: underline; color:#039be5;">Website</a> | ' |
||||
|
+ '<a href="https://git.eden-emu.dev" style="text-decoration: underline; color:#039be5;">Source Code</a> | ' |
||||
|
+ '<a href="https://git.eden-emu.dev/eden-emu/eden/activity/contributors" style="text-decoration: underline; color:#039be5;">Contributors</a> | ' |
||||
|
+ '<a href="https://discord.gg/HstXbPch7X" style="text-decoration: underline; color:#039be5;">Discord</a> | ' |
||||
|
+ '<a href="https://rvlt.gg/qKgFEAbH" style="text-decoration: underline; color:#039be5;">Revolt</a> | ' |
||||
|
+ '<a href="https://nitter.poast.org/edenemuofficial" style="text-decoration: underline; color:#039be5;">Twitter</a> | ' |
||||
|
+ '<a href="https://git.eden-emu.dev/eden-emu/eden/src/branch/master/LICENSE.txt" style="text-decoration: underline; color:#039be5;">License</a>' |
||||
|
textFormat: Text.RichText |
||||
|
wrapMode: Text.WordWrap |
||||
|
Layout.fillWidth: true |
||||
|
onLinkActivated: link => Qt.openUrlExternally(link) |
||||
|
|
||||
|
MouseArea { |
||||
|
anchors.fill: parent |
||||
|
acceptedButtons: Qt.NoButton |
||||
|
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
Label { |
||||
|
text: '"Nintendo Switch" is a trademark of Nintendo. Eden is not affiliated with Nintendo in any way.' |
||||
|
font.pixelSize: 9 |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,142 @@ |
|||||
|
import QtQuick |
||||
|
import QtQuick.Layouts |
||||
|
import QtQuick.Controls |
||||
|
|
||||
|
import Carboxyl.Contour |
||||
|
|
||||
|
NativeDialog { |
||||
|
title: qsTr("Eden Dependencies") |
||||
|
|
||||
|
width: 700 |
||||
|
height: 600 |
||||
|
|
||||
|
standardButtons: Dialog.Ok |
||||
|
|
||||
|
Image { |
||||
|
id: img |
||||
|
anchors { |
||||
|
left: parent.left |
||||
|
verticalCenter: parent.verticalCenter |
||||
|
|
||||
|
margins: 10 |
||||
|
} |
||||
|
|
||||
|
source: "qrc:/icons/default/256x256/eden.png" |
||||
|
width: 200 |
||||
|
height: 200 |
||||
|
} |
||||
|
|
||||
|
ColumnLayout { |
||||
|
anchors { |
||||
|
left: img.right |
||||
|
top: parent.top |
||||
|
bottom: parent.bottom |
||||
|
right: parent.right |
||||
|
|
||||
|
margins: 10 |
||||
|
} |
||||
|
|
||||
|
Label { |
||||
|
font.pixelSize: 28 |
||||
|
text: qsTr("Eden Dependencies") |
||||
|
} |
||||
|
|
||||
|
Label { |
||||
|
font.pixelSize: 14 |
||||
|
text: qsTr("The projects that make Eden possible") |
||||
|
} |
||||
|
|
||||
|
HorizontalHeaderView { |
||||
|
syncView: tableView |
||||
|
clip: true |
||||
|
|
||||
|
delegate: Rectangle { |
||||
|
required property string display |
||||
|
|
||||
|
implicitWidth: scroll.width / 2 - 5 |
||||
|
implicitHeight: 30 |
||||
|
|
||||
|
color: palette.alternateBase |
||||
|
|
||||
|
border { |
||||
|
color: palette.mid |
||||
|
width: 1 |
||||
|
} |
||||
|
|
||||
|
Component.onCompleted: console.log(display, row) |
||||
|
|
||||
|
Label { |
||||
|
text: display |
||||
|
anchors.fill: parent |
||||
|
|
||||
|
verticalAlignment: Text.AlignVCenter |
||||
|
horizontalAlignment: Text.AlignHCenter |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
ScrollView { |
||||
|
id: scroll |
||||
|
|
||||
|
Layout.fillHeight: true |
||||
|
Layout.fillWidth: true |
||||
|
|
||||
|
TableView { |
||||
|
id: tableView |
||||
|
alternatingRows: true |
||||
|
|
||||
|
model: DependencyModel |
||||
|
|
||||
|
boundsBehavior: Flickable.StopAtBounds |
||||
|
clip: true |
||||
|
|
||||
|
Component.onCompleted: console.log(itemAtCell(Qt.point(1, 1))) |
||||
|
|
||||
|
delegate: Rectangle { |
||||
|
required property string display |
||||
|
required property int row |
||||
|
|
||||
|
implicitWidth: scroll.width / 2 - 5 |
||||
|
implicitHeight: 30 |
||||
|
|
||||
|
color: row % 2 == 0 ? palette.base : palette.alternateBase |
||||
|
border { |
||||
|
color: palette.mid |
||||
|
width: 1 |
||||
|
} |
||||
|
|
||||
|
Component.onCompleted: console.log(display, row) |
||||
|
|
||||
|
Label { |
||||
|
text: display |
||||
|
anchors.fill: parent |
||||
|
anchors.leftMargin: 10 |
||||
|
|
||||
|
verticalAlignment: Text.AlignVCenter |
||||
|
textFormat: Text.RichText |
||||
|
|
||||
|
onLinkActivated: link => Qt.openUrlExternally(link) |
||||
|
|
||||
|
MouseArea { |
||||
|
anchors.fill: parent |
||||
|
acceptedButtons: Qt.NoButton |
||||
|
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
WheelHandler { |
||||
|
target: scroll |
||||
|
onWheel: event => { |
||||
|
const sensitivity = 1 / 1500 |
||||
|
scroll.ScrollBar.vertical.position -= event.angleDelta.y * sensitivity |
||||
|
scroll.ScrollBar.vertical.position = Math.max( |
||||
|
Math.min( |
||||
|
scroll.ScrollBar.vertical.position, |
||||
|
1.0 - scroll.ScrollBar.vertical.size), 0.0) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,50 @@ |
|||||
|
#include <qnamespace.h>
|
||||
|
#include "DependencyModel.h"
|
||||
|
|
||||
|
#include "dep_hashes.h"
|
||||
|
|
||||
|
DependencyModel::DependencyModel(QObject* parent) : QAbstractTableModel(parent) { |
||||
|
for (size_t i = 0; i < Common::dep_hashes.size(); ++i) { |
||||
|
QString name = QString::fromLocal8Bit(Common::dep_names.at(i)); |
||||
|
QString version = QString::fromLocal8Bit(Common::dep_hashes.at(i)); |
||||
|
QString url = QString::fromLocal8Bit(Common::dep_urls.at(i)); |
||||
|
|
||||
|
m_data.append(Dependency{name, version, url}); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
QVariant DependencyModel::headerData(int section, Qt::Orientation orientation, int role) const { |
||||
|
if (orientation == Qt::Vertical) |
||||
|
return QString(); |
||||
|
|
||||
|
switch (section) { |
||||
|
case 0: |
||||
|
return tr("Dependency"); |
||||
|
case 1: |
||||
|
default: |
||||
|
return tr("Version"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
int DependencyModel::rowCount(const QModelIndex& parent) const { |
||||
|
return m_data.size(); |
||||
|
} |
||||
|
|
||||
|
int DependencyModel::columnCount(const QModelIndex& parent) const { |
||||
|
return 2; |
||||
|
} |
||||
|
|
||||
|
QVariant DependencyModel::data(const QModelIndex& index, int role) const { |
||||
|
if (!index.isValid() || role != Qt::DisplayRole) |
||||
|
return QVariant(); |
||||
|
|
||||
|
Dependency d = m_data[index.row()]; |
||||
|
|
||||
|
switch (index.column()) { |
||||
|
case 0: |
||||
|
return QStringLiteral("<a href=%1>%2</a>").arg(d.url, d.name); |
||||
|
case 1: |
||||
|
default: |
||||
|
return d.version; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,29 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include <QAbstractTableModel> |
||||
|
|
||||
|
struct Dependency { |
||||
|
QString name; |
||||
|
QString version; |
||||
|
QString url; |
||||
|
}; |
||||
|
|
||||
|
class DependencyModel : public QAbstractTableModel { |
||||
|
Q_OBJECT |
||||
|
|
||||
|
public: |
||||
|
explicit DependencyModel(QObject* parent = nullptr); |
||||
|
|
||||
|
// Header: |
||||
|
QVariant headerData(int section, Qt::Orientation orientation, |
||||
|
int role = Qt::DisplayRole) const override; |
||||
|
|
||||
|
// Basic functionality: |
||||
|
int rowCount(const QModelIndex& parent = QModelIndex()) const override; |
||||
|
int columnCount(const QModelIndex& parent = QModelIndex()) const override; |
||||
|
|
||||
|
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; |
||||
|
|
||||
|
private: |
||||
|
QList<Dependency> m_data; |
||||
|
}; |
||||
@ -0,0 +1,7 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
namespace QtCommon::Constants { |
||||
|
static constexpr const char* modPage = "https://github.com/eden-emulator/yuzu-mod-archive"; |
||||
|
static constexpr const char* quickstartPage = "https://yuzu-mirror.github.io/help/quickstart/"; |
||||
|
static constexpr const char* helpPage = "https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/user"; |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue