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