try fix faction invite

This commit is contained in:
hydrant
2019-05-09 17:07:43 +02:00
parent 2c4b6e364a
commit c18b6b6fad
10 changed files with 57 additions and 17 deletions

View File

@@ -3,9 +3,11 @@
private value: string;
private created: boolean;
private browser: BrowserMp;
private data: GlobalData;
constructor(title: string) {
constructor(title: string, globalData: GlobalData) {
this.title = title;
this.data = globalData;
this.cefTitleCall = this.cefTitleCall.bind(this);
mp.events.add('cef_request_title', this.cefTitleCall);
@@ -31,6 +33,7 @@
show() {
if (this.created) return;
this.data.InInput = true;
this.created = true;
this.browser = mp.browsers.new('package://assets/html/inputhelper/index.html');
}
@@ -41,6 +44,7 @@
mp.events.remove('cef_request_title');
mp.events.remove('render', this.disableControls);
this.browser.destroy();
this.data.InInput = false;
this.created = false;
}
}