Manually Switch from One Preset Array to Another?

Sorry, yes, solution summary is:

At the top of the prop, just below the #define title line (i.e. the third line of actual code) paste this:

//  Toggle switch between blade arrays manually.
//  This goes in the prop file, but not in the prop class.
//  If using normal BladeID, this whole section must be commented out!

struct FakeBladeID {
   static int return_value;
   float id() { return return_value; }
   static void toggle() {
     return_value = NO_BLADE - return_value;
   }
};
int FakeBladeID::return_value = 0;
#undef BLADE_ID_CLASS_INTERNAL
#define BLADE_ID_CLASS_INTERNAL FakeBladeID
#undef BLADE_ID_CLASS
#define BLADE_ID_CLASS FakeBladeID

Then further down the prop amongst the regular button controls, paste this:

case EVENTID(BUTTON_POWER, EVENT_THIRD_SAVED_CLICK_SHORT, MODE_OFF):
      FakeBladeID::toggle();
      FindBladeAgain();
      SaberBase::DoBladeDetect(true);
   return true;

Works a treat and I actually only yesterday used it on an install that had multiple fonts each with light side and dark side variants. :slight_smile:

3 Likes