Add touch support for Jitsi and website triggers
This commit is contained in:
parent
aab65298aa
commit
edd4e9e95d
@ -668,7 +668,7 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||||||
if(openWebsiteTriggerValue && openWebsiteTriggerValue === ON_ACTION_TRIGGER_BUTTON) {
|
if(openWebsiteTriggerValue && openWebsiteTriggerValue === ON_ACTION_TRIGGER_BUTTON) {
|
||||||
let message = allProps.get(WEBSITE_MESSAGE_PROPERTIES);
|
let message = allProps.get(WEBSITE_MESSAGE_PROPERTIES);
|
||||||
if(message === undefined){
|
if(message === undefined){
|
||||||
message = 'Press on SPACE to open the web site';
|
message = 'Press SPACE or touch here to open web site';
|
||||||
}
|
}
|
||||||
layoutManager.addActionButton('openWebsite', message.toString(), () => {
|
layoutManager.addActionButton('openWebsite', message.toString(), () => {
|
||||||
openWebsiteFunction();
|
openWebsiteFunction();
|
||||||
@ -700,7 +700,7 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||||||
if(jitsiTriggerValue && jitsiTriggerValue === ON_ACTION_TRIGGER_BUTTON) {
|
if(jitsiTriggerValue && jitsiTriggerValue === ON_ACTION_TRIGGER_BUTTON) {
|
||||||
let message = allProps.get(JITSI_MESSAGE_PROPERTIES);
|
let message = allProps.get(JITSI_MESSAGE_PROPERTIES);
|
||||||
if (message === undefined) {
|
if (message === undefined) {
|
||||||
message = 'Press on SPACE to enter in jitsi meet room';
|
message = 'Press SPACE or touch here to enter Jitsi Meet room';
|
||||||
}
|
}
|
||||||
layoutManager.addActionButton('jitsiRoom', message.toString(), () => {
|
layoutManager.addActionButton('jitsiRoom', message.toString(), () => {
|
||||||
openJitsiRoomFunction();
|
openJitsiRoomFunction();
|
||||||
|
@ -340,14 +340,10 @@ class LayoutManager {
|
|||||||
const mainContainer = HtmlUtils.getElementByIdOrFail<HTMLDivElement>('main-container');
|
const mainContainer = HtmlUtils.getElementByIdOrFail<HTMLDivElement>('main-container');
|
||||||
mainContainer.appendChild(div);
|
mainContainer.appendChild(div);
|
||||||
|
|
||||||
const callBackFunctionTrigger = (() => {
|
|
||||||
console.log('user click on space => ', id);
|
|
||||||
callBack();
|
|
||||||
});
|
|
||||||
|
|
||||||
//add trigger action
|
//add trigger action
|
||||||
this.actionButtonTrigger.set(id, callBackFunctionTrigger);
|
div.onpointerdown = () => callBack();
|
||||||
userInputManager.addSpaceEventListner(callBackFunctionTrigger);
|
this.actionButtonTrigger.set(id, callBack);
|
||||||
|
userInputManager.addSpaceEventListner(callBack);
|
||||||
}
|
}
|
||||||
|
|
||||||
public removeActionButton(id: string, userInputManager: UserInputManager){
|
public removeActionButton(id: string, userInputManager: UserInputManager){
|
||||||
|
Loading…
Reference in New Issue
Block a user