I am trying to create a DOFLinx plugin for BigBox. I aim to show LEDs animation, change marquee (game and platform) on DMDs, based on events from BigBox.
To do that, I need to react to platform change, game selection change, and also Up/Down/Right/Left/Enter events (to display animations for those).
I see 2 possibilities :
- Use IBigBoxThemeElementPlugin interface
- Use ISystemEventsPlugin interface
ISystemEventsPlugin interface works : when I launch launchbox or bigbox, with the plugin in Launchbox/plugins folder, I can attach the debugger and add breakpoints in my methods and see what is happening. I can use OnEventRaised, then fetch current platform (GetSelectedPlatform()) and game (GetAllSelectedGames()). But I'm halfway where I want to be : I cannot react to up/down and other events.
Unfortunately, I cannot seem to be able to implement IBigBoxThemeElementPlugin interface. I mean, when I attach the debugger and add breakpoints to OnSelectionChanged or OnUp/OnDown, I never reach the code.
What am I doing wrong? Do I have to modify the theme also?
Thanks!
// Reference documentation : https://pluginapi.launchbox-app.com/html/4cf923f7-940c-5735-83de-04107a6ae0e6.htm
namespace DOFConnect
{
using Unbroken.LaunchBox.Plugins;
using Unbroken.LaunchBox.Plugins.Data;
public abstract class BigBoxThemeElement : IBigBoxThemeElementPlugin
{
public void OnSelectionChanged(FilterType filterType, string filterValue, IPlatform platform, IPlatformCategory category, IPlaylist playlist, IGame game)
{
// This is never reached
string gameName = game.Title;
string platformName = platform.Name;
string gamePlatform = game.Platform;
}
public bool OnDown(bool held)
{
// This is never reached
bool isHeld = held;
return isHeld;
}
public abstract bool OnEnter();
public abstract bool OnEscape();
public abstract bool OnLeft(bool held);
public abstract bool OnPageDown();
public abstract bool OnPageUp();
public abstract bool OnRight(bool held);
public abstract bool OnUp(bool held);
}
}