narrat 2.10.1 → 2.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,7 +40,22 @@ export declare type NarratPluginObject<T> = {
40
40
  customStores?: CustomStores;
41
41
  customMenuButtons?: CustomMenuButton[];
42
42
  customMenuTabs?: CustomMenuTab[];
43
+ startMenuButtons?: CustomStartMenuButton[];
43
44
  };
45
+ /**
46
+ * Custom buttons that get added to the start menu (where the New Game etc buttons are)
47
+ * Action option is to provide a function to run on click
48
+ * popupComponent option is to provide a component to display in a modal window on click (for custom pieces of UI)
49
+ */
50
+ export interface CustomStartMenuButton {
51
+ id: string;
52
+ text: string;
53
+ action?: () => void;
54
+ popupComponent?: {
55
+ name: string;
56
+ component: any;
57
+ };
58
+ }
44
59
  declare function registerPlugin<T>(plugin: NarratPluginObject<T>): void;
45
60
  declare function addCommand<T>(command: CommandPlugin<T>): void;
46
61
  export { CommandRunner };