Vio Posted July 25, 2023 Share Posted July 25, 2023 As per the title, what is the easiest way to add a button to the interface that leads to a webpage? Posted for posterity's sake. Thanks! Link to comment Share on other sites More sharing options...
2 AccurateNoodle Posted July 27, 2023 Share Posted July 27, 2023 Step 1: You would need to modify the client's source to do this, adding a button to your main menu (Intersect.Client.Interface.Menu.MainMenu.cs), like so:   private readonly Button mWebsiteButton; mWebsiteButton = new Button(mMenuWindow, "WebsiteButton"); mWebsiteButton.SetText(Strings.MainMenu.Website); mWebsiteButton.Clicked += WebsiteButton_Clicked;   _______________________________________________________________________________________________________   Step 2: Then, also in (Intersect.Client.Interface.Menu.MainMenu.cs), add a button event, something like:   private void WebsiteButton_Click(object sender, EventArgs e) { // Launch browser to ascensiongamedev... System.Diagnostics.Process.Start("http://www.ascensiongamedev.com"); }   _______________________________________________________________________________________________________   Step 3: Lastly, in (Intersect.Client.Localisation.Strings.cs , find "public partial struct MainMenu") add the JsonProperty:   [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public static LocalizedString Website = @"Website";   _______________________________________________________________________________________________________  Feel free to modify and customize the new button under "WebsiteButton": { , this piece of code will be in your client's resources (yourClient\resources\gui\layouts\menu\MenuWindow.json)  Sadly, you need source modifications to add a new button, so if you have some coding knowledge, load up visual studio and follow the steps above. If not, sorry that I couldn't help you Vio, Blinkuz, Seshy and 2 others 4 1 Link to comment Share on other sites More sharing options...
Question
Vio
As per the title, what is the easiest way to add a button to the interface that leads to a webpage? Posted for posterity's sake. Thanks!
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now