@workadventure/iframe-api-typings 1.16.7 → 1.16.8
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.
|
@@ -709,6 +709,25 @@ export declare const isIframeEventWrapper: z.ZodUnion<[z.ZodObject<{
|
|
|
709
709
|
data: {
|
|
710
710
|
name: string;
|
|
711
711
|
};
|
|
712
|
+
}>, z.ZodObject<{
|
|
713
|
+
type: z.ZodLiteral<"openMenu">;
|
|
714
|
+
data: z.ZodObject<{
|
|
715
|
+
name: z.ZodString;
|
|
716
|
+
}, "strip", z.ZodTypeAny, {
|
|
717
|
+
name: string;
|
|
718
|
+
}, {
|
|
719
|
+
name: string;
|
|
720
|
+
}>;
|
|
721
|
+
}, "strip", z.ZodTypeAny, {
|
|
722
|
+
type: "openMenu";
|
|
723
|
+
data: {
|
|
724
|
+
name: string;
|
|
725
|
+
};
|
|
726
|
+
}, {
|
|
727
|
+
type: "openMenu";
|
|
728
|
+
data: {
|
|
729
|
+
name: string;
|
|
730
|
+
};
|
|
712
731
|
}>, z.ZodObject<{
|
|
713
732
|
type: z.ZodLiteral<"setTiles">;
|
|
714
733
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -44,3 +44,14 @@ export declare const isMenuRegisterEvent: z.ZodObject<{
|
|
|
44
44
|
name: string;
|
|
45
45
|
}>;
|
|
46
46
|
export type MenuRegisterEvent = z.infer<typeof isMenuRegisterEvent>;
|
|
47
|
+
/**
|
|
48
|
+
* A message sent from a script to the game to open a menu
|
|
49
|
+
*/
|
|
50
|
+
export declare const isOpenMenuEvent: z.ZodObject<{
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
name: string;
|
|
54
|
+
}, {
|
|
55
|
+
name: string;
|
|
56
|
+
}>;
|
|
57
|
+
export type OpenMenuEvent = z.infer<typeof isOpenMenuEvent>;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import { MenuOptions } from "../ui";
|
|
1
2
|
export declare class Menu {
|
|
2
3
|
private menuName;
|
|
3
|
-
|
|
4
|
+
private options;
|
|
5
|
+
constructor(menuName: string, options: MenuOptions);
|
|
4
6
|
/**
|
|
5
7
|
* remove the menu
|
|
6
8
|
*/
|
|
7
9
|
remove(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Programmatically open the menu
|
|
12
|
+
*/
|
|
13
|
+
open(): void;
|
|
8
14
|
}
|