2019-09-02 12:03:57 -04:00
|
|
|
|
using Gtk;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
2019-11-28 23:32:51 -05:00
|
|
|
|
using GUI = Gtk.Builder.ObjectAttribute;
|
2019-09-02 12:03:57 -04:00
|
|
|
|
|
2019-11-28 23:32:51 -05:00
|
|
|
|
namespace Ryujinx.Ui
|
|
|
|
|
{
|
2019-09-02 12:03:57 -04:00
|
|
|
|
public class AboutWindow : Window
|
|
|
|
|
{
|
2019-11-28 23:32:51 -05:00
|
|
|
|
#pragma warning disable CS0649
|
|
|
|
|
#pragma warning disable IDE0044
|
2019-09-02 12:03:57 -04:00
|
|
|
|
[GUI] Label _versionText;
|
|
|
|
|
[GUI] Image _ryujinxLogo;
|
|
|
|
|
[GUI] Image _patreonLogo;
|
|
|
|
|
[GUI] Image _gitHubLogo;
|
|
|
|
|
[GUI] Image _discordLogo;
|
|
|
|
|
[GUI] Image _twitterLogo;
|
2019-11-28 23:32:51 -05:00
|
|
|
|
#pragma warning restore CS0649
|
|
|
|
|
#pragma warning restore IDE0044
|
2019-09-02 12:03:57 -04:00
|
|
|
|
|
|
|
|
|
public AboutWindow() : this(new Builder("Ryujinx.Ui.AboutWindow.glade")) { }
|
|
|
|
|
|
|
|
|
|
private AboutWindow(Builder builder) : base(builder.GetObject("_aboutWin").Handle)
|
|
|
|
|
{
|
|
|
|
|
builder.Autoconnect(this);
|
|
|
|
|
|
2020-05-02 22:00:53 -04:00
|
|
|
|
this.Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.Icon.png");
|
2019-11-28 23:32:51 -05:00
|
|
|
|
_ryujinxLogo.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.Icon.png" , 100, 100);
|
2019-09-02 12:03:57 -04:00
|
|
|
|
_patreonLogo.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.PatreonLogo.png", 30 , 30 );
|
|
|
|
|
_gitHubLogo.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.GitHubLogo.png" , 30 , 30 );
|
|
|
|
|
_discordLogo.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.DiscordLogo.png", 30 , 30 );
|
|
|
|
|
_twitterLogo.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.TwitterLogo.png", 30 , 30 );
|
|
|
|
|
|
2020-02-12 08:35:39 -05:00
|
|
|
|
_versionText.Text = Program.Version;
|
2019-09-02 12:03:57 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//Events
|
2019-11-28 23:32:51 -05:00
|
|
|
|
private void RyujinxButton_Pressed(object sender, ButtonPressEventArgs args)
|
2019-09-02 12:03:57 -04:00
|
|
|
|
{
|
2020-09-01 05:09:42 -04:00
|
|
|
|
UrlHelper.OpenUrl("https://ryujinx.org");
|
2019-09-02 12:03:57 -04:00
|
|
|
|
}
|
|
|
|
|
|
2019-11-28 23:32:51 -05:00
|
|
|
|
private void PatreonButton_Pressed(object sender, ButtonPressEventArgs args)
|
2019-09-02 12:03:57 -04:00
|
|
|
|
{
|
2020-09-01 05:09:42 -04:00
|
|
|
|
UrlHelper.OpenUrl("https://www.patreon.com/ryujinx");
|
2019-09-02 12:03:57 -04:00
|
|
|
|
}
|
|
|
|
|
|
2019-11-28 23:32:51 -05:00
|
|
|
|
private void GitHubButton_Pressed(object sender, ButtonPressEventArgs args)
|
2019-09-02 12:03:57 -04:00
|
|
|
|
{
|
2020-09-01 05:09:42 -04:00
|
|
|
|
UrlHelper.OpenUrl("https://github.com/Ryujinx/Ryujinx");
|
2019-09-02 12:03:57 -04:00
|
|
|
|
}
|
|
|
|
|
|
2019-11-28 23:32:51 -05:00
|
|
|
|
private void DiscordButton_Pressed(object sender, ButtonPressEventArgs args)
|
2019-09-02 12:03:57 -04:00
|
|
|
|
{
|
2020-09-01 05:09:42 -04:00
|
|
|
|
UrlHelper.OpenUrl("https://discordapp.com/invite/N2FmfVc");
|
2019-09-02 12:03:57 -04:00
|
|
|
|
}
|
|
|
|
|
|
2019-11-28 23:32:51 -05:00
|
|
|
|
private void TwitterButton_Pressed(object sender, ButtonPressEventArgs args)
|
2019-09-02 12:03:57 -04:00
|
|
|
|
{
|
2020-09-01 05:09:42 -04:00
|
|
|
|
UrlHelper.OpenUrl("https://twitter.com/RyujinxEmu");
|
2019-09-02 12:03:57 -04:00
|
|
|
|
}
|
|
|
|
|
|
2019-11-28 23:32:51 -05:00
|
|
|
|
private void ContributorsButton_Pressed(object sender, ButtonPressEventArgs args)
|
2019-09-02 12:03:57 -04:00
|
|
|
|
{
|
2020-09-01 05:09:42 -04:00
|
|
|
|
UrlHelper.OpenUrl("https://github.com/Ryujinx/Ryujinx/graphs/contributors?type=a");
|
2019-09-02 12:03:57 -04:00
|
|
|
|
}
|
|
|
|
|
|
2019-11-28 23:32:51 -05:00
|
|
|
|
private void CloseToggle_Activated(object sender, EventArgs args)
|
2019-09-02 12:03:57 -04:00
|
|
|
|
{
|
2019-11-28 23:32:51 -05:00
|
|
|
|
Dispose();
|
2019-09-02 12:03:57 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|