Here's mine. It's being used on my not released insim(which by the way doesn't look it will be used but anyway). Some things:
1. It's in C#. I use it on InSim.NET
2. It may be not optimised, i'd like to hear improvements.
3. It features Groups. You can use "" for no group or "Bananas" and then you can DeleteGroupButtons(UCID, "Bananas")!
4. Uses custom OnClickManagerButton and OnTextReceiveManagerButton. These are the callbacks you need.
1.Rename the extension to .cs
2.Just include it in your project and use the functions.
3.How to install to use the callbacks:
void OnButtonTextReceive(InSim insim, IS_BTT BTT)
{
try
{
if (BTT.Text.Length == 0) return;
string ButtonName = GetButtonName(BTT.ClickID, BTT.UCID);
if (ButtonName != "Invalid")
{
OnTextReceiveManagerButton(BTT.UCID, ButtonName, BTT.Text);
return;
}
}
catch (Exception EX) { LogTextToFile("packetError", "BTT - " + EX.Message); }
}
void OnButtonClick(InSim insim, IS_BTC BTC)
{
try
{
string ButtonName = GetButtonName(BTC.ClickID, BTC.UCID);
if (ButtonName != "Invalid")
{
OnClickManagerButton(BTC.UCID, ButtonName);
return;
}
}
catch (Exception EX) { LogTextToFile("packetError", "BTC - " + EX.Message); }
}