script api can add menu commands

# Conflicts:
#	front/src/Api/IframeListener.ts
#	front/src/iframe_api.ts
This commit is contained in:
jonny 2021-04-27 11:59:22 +02:00
parent ca628d9a90
commit fafaabb6e7
5 changed files with 84 additions and 5 deletions

View file

@ -0,0 +1,10 @@
import * as tg from "generic-type-guard";
export const isMenuItemClickedEvent =
new tg.IsInterface().withProperties({
menuItem: tg.isString
}).get();
/**
* A message sent from the game to the iFrame when a user enters or leaves a zone marked with the "zone" property.
*/
export type MenuItemClickedEvent = tg.GuardedType<typeof isMenuItemClickedEvent>;

View file

@ -0,0 +1,10 @@
import * as tg from "generic-type-guard";
export const isMenuItemRegisterEvent =
new tg.IsInterface().withProperties({
menutItem: tg.isString
}).get();
/**
* A message sent from the game to the iFrame when a user enters or leaves a zone marked with the "zone" property.
*/
export type MenuItemRegisterEvent = tg.GuardedType<typeof isMenuItemRegisterEvent>;