add cityhall menu, add self interaction menu (Arrow Down), fix freecam, add group creation, move (faction) invite from commands to menu
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
export default class InputHelper {
|
||||
title: string;
|
||||
value: string;
|
||||
created: boolean;
|
||||
browser: BrowserMp;
|
||||
private title: string;
|
||||
private value: string;
|
||||
private created: boolean;
|
||||
private browser: BrowserMp;
|
||||
|
||||
constructor(title: string) {
|
||||
this.title = title;
|
||||
@@ -23,7 +23,7 @@
|
||||
mp.events.add('render', this.disableControls);
|
||||
}
|
||||
|
||||
disableControls() {
|
||||
private disableControls() {
|
||||
for (var i = 0; i <= 33; i++) {
|
||||
mp.game.controls.disableAllControlActions(i);
|
||||
}
|
||||
@@ -35,7 +35,7 @@
|
||||
this.browser = mp.browsers.new('package://assets/html/inputhelper/index.html');
|
||||
}
|
||||
|
||||
finish() {
|
||||
private finish() {
|
||||
if (this.browser) {
|
||||
mp.events.remove('cef_inputhelper_sendvalue');
|
||||
mp.events.remove('cef_request_title');
|
||||
@@ -45,16 +45,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
cefTitleCall() {
|
||||
private cefTitleCall() {
|
||||
this.browser.execute(`setTitle('${this.title}')`);
|
||||
}
|
||||
|
||||
cefCallback(val) {
|
||||
private cefCallback(val) {
|
||||
this.value = val;
|
||||
this.finish();
|
||||
}
|
||||
|
||||
valueGetter() {
|
||||
private valueGetter(): Promise<string> {
|
||||
return new Promise(resolve => {
|
||||
setInterval(() => {
|
||||
if (this.value !== undefined) resolve(this.value);
|
||||
|
||||
Reference in New Issue
Block a user