diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadObject.h b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadObject.h index 014e4ba..6699e27 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadObject.h +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadObject.h @@ -23,6 +23,9 @@ // The data for hte page that was loaded @property (nullable, strong, nonatomic) NSDictionary *pageJSON; +// Contains the button map +@property (nullable, nonatomic, strong, readonly) NSDictionary *buttonMap; + // the modules that are needed @property (nullable, strong, nonatomic) NSDictionary *modulesJSON; diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadObject.m b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadObject.m index 388f911..f48bdf5 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadObject.m +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadObject.m @@ -22,6 +22,10 @@ return self; } +- (NSDictionary *) buttonMap { + return [self.pageJSON dictionaryForKey:@"ButtonMap"]; +} + - (nullable instancetype)initWithRequestParameters:(nullable MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegate:(nullable NSObject*)delegate { if (self = [self initWithDelegate:delegate]) { self.requestParameters = requestParameters;