| |||||||
| Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here. |
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Portal Member Join Date: Aug 2004 Location: Fribourg (CH)
Posts: 314
Thanks: 0
Thanked 1 Time in 1 Post
| Hi, Try to do my first plugin (called "myGames" btw :-) ). I'm able to get the configuration and my own MainMenu button (thanks to Joe for the great tutorial). What I don't get is: How can I catch the "clicked" event of "my" MainMenu button? I understand that I need a class that implements GUIWINDOW and override the OnMessage handler, but nothing happens if I click my button... Can anyone help me getting to the right trail? Maybe just a "read file x and see part y" :-) Thanks! Cheers, Daniel |
| | |
| | #2 (permalink) |
| Portal Member Join Date: Apr 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
| I have a suggestion for you. When I wrote my first plugin I simply looked in the cvs source, picked a plugin, in my case My Recepies, and started to change it inoto the plugin I wanted to make. In that way you're sure that you're going to get a working plugin. Then when you change something, test it often so that when it stops working you know exactly what changes made it stop working. Anyway, this worked for me, maybe it could for you too. |
| | |
| | #3 (permalink) |
| Portal Member Join Date: Aug 2004 Location: Fribourg (CH)
Posts: 314
Thanks: 0
Thanked 1 Time in 1 Post
| Thanks snorre, That's what I'm trying to do, but I wanted to do a own plugin, so I started a project and copied some MyPrograms files into it. As I'm a C# rookie (but a hopefully decent Delphi/SQL coder ) I need to do some "heavy copy-pastin'" to get things going....Maybe somebody can show me a minimal plugin that handles the onClick event of the main menu button? But maybe I'll "morph" myRecipies into a prototype plugin to make tests.... this should be a bit easier! Cheers, Daniel |
| | |
| | #4 (permalink) |
| Portal Member Join Date: Aug 2004 Location: Fribourg (CH)
Posts: 314
Thanks: 0
Thanked 1 Time in 1 Post
| ok guys, found out how to do it!! GREAT! in case there are other coders that look for this: 1) add a new constant to the "Window" enumeration - (file GUIWindow.cs) 2) use this constant as an ID in the SetupForm and in the GUIWindow implementation of the plugin (see GetID in GUIPrograms constructor for an example). So I went a small step forward..... cool! Cheers, Daniel |
| | |
| | #5 (permalink) |
| Guest
Posts: n/a
| It is probably a better solution to overide the GetID function in GUIWindow. I altered the code below for my plugin: public override int GetID { get { return 750; } set { base.GetID = value; } } You have probably worked this out but will be helpful for other prospective developers. |
|
![]() |
| Bookmarks |
| Tags |
| pluginrookie, question |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| IPTV@UT Plugin | moiristo | Plugins | 116 | 2008-10-06 22:32 |
| Gathering topical infos about plugins (To: authors & use | tomtom21000 | Plugins | 2 | 2006-02-05 00:20 |
| noob question - writing a plugin in VB | ghackett | Plugins | 3 | 2005-12-02 18:01 |
| Plugin example doesnt show in list | Anonymous | Plugins | 5 | 2005-08-13 12:12 |