sqlallstar Posted August 6, 2022 Share Posted August 6, 2022 This is my code. I have no idea what I am doing. using System.Drawing; using Unbroken.LaunchBox.Plugins; namespace LaunchboxPlugin { class ForumOpener : Unbroken.LaunchBox.Plugins.ISystemMenuItemPlugin { string ISystemMenuItemPlugin.Caption => "Launch LaunchboxForums"; Image ISystemMenuItemPlugin.IconImage => Image.FromFile("pirate.ico"); bool ISystemMenuItemPlugin.ShowInLaunchBox => true; bool ISystemMenuItemPlugin.ShowInBigBox => true; bool ISystemMenuItemPlugin.AllowInBigBoxWhenLocked => true; void ISystemMenuItemPlugin.OnSelected() { System.Diagnostics.Process.Start("https://forums.launchbox-app.com/"); } } Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted August 6, 2022 Share Posted August 6, 2022 Look at the LaunchBox debug Log file and see if it indicates any issues with it there. Also, you may want to make things "public". Quote Link to comment Share on other sites More sharing options...
sqlallstar Posted August 6, 2022 Author Share Posted August 6, 2022 I watched the video Jason did on plugin dev and it helped me do what I needed. I didn't understand it quite right , I can write TSQL but OOP is so much different. I ended up making something simple to test, and I will go from there. Thank you. using System.Windows.Forms; using Unbroken.LaunchBox.Plugins.Data; using System.Linq; using System.Diagnostics; namespace LaunchboxPlugins { public class DemoGameMenuItemPlugin : Unbroken.LaunchBox.Plugins.IGameMenuItemPlugin { public bool SupportsMultipleGames { get { return true; } } public string Caption { get { return "Search For Rom"; } } public System.Drawing.Image IconImage { get { return Properties.Resources.pirate_skull; } } public bool ShowInLaunchBox { get { return true; } } public bool ShowInBigBox { get { return false; } } public bool GetIsValidForGame(IGame selectedGame) { return !string.IsNullOrEmpty(selectedGame.Version); } public bool GetIsValidForGames(IGame[] selectedGames) { return false; } public void OnSelected(IGame selectedGame) { System.Diagnostics.Process.Start(new ProcessStartInfo { FileName = "https://www.google.com/search?q=rom+" + selectedGame.Title, UseShellExecute = true }); } public void OnSelected(IGame[] selectedGames) { } } } 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.