add input popup
This commit is contained in:
@@ -4,6 +4,8 @@ export const isButtonClickedEvent =
|
||||
new tg.IsInterface().withProperties({
|
||||
popupId: tg.isNumber,
|
||||
buttonId: tg.isNumber,
|
||||
input : tg.isBoolean,
|
||||
inputValue : 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.
|
||||
|
||||
@@ -3,6 +3,7 @@ import * as tg from "generic-type-guard";
|
||||
export const isClosePopupEvent =
|
||||
new tg.IsInterface().withProperties({
|
||||
popupId: tg.isNumber,
|
||||
inputValue : tg.isString,
|
||||
}).get();
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,7 +11,8 @@ export const isOpenPopupEvent =
|
||||
popupId: tg.isNumber,
|
||||
targetObject: tg.isString,
|
||||
message: tg.isString,
|
||||
buttons: tg.isArray(isButtonDescriptor)
|
||||
buttons: tg.isArray(isButtonDescriptor),
|
||||
input: tg.isBoolean
|
||||
}).get();
|
||||
|
||||
/**
|
||||
|
||||
@@ -222,12 +222,14 @@ class IframeListener {
|
||||
});
|
||||
}
|
||||
|
||||
sendButtonClickedEvent(popupId: number, buttonId: number): void {
|
||||
sendButtonClickedEvent(popupId: number, buttonId: number, input : boolean, inputValue : string | null): void {
|
||||
this.postMessage({
|
||||
'type': 'buttonClickedEvent',
|
||||
'data': {
|
||||
popupId,
|
||||
buttonId
|
||||
buttonId,
|
||||
input,
|
||||
inputValue,
|
||||
} as ButtonClickedEvent
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user