add Theorieteil drivingschool - html pop up
This commit is contained in:
39
ReallifeGamemode.Client/Gui/drivingschool.ts
Normal file
39
ReallifeGamemode.Client/Gui/drivingschool.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @overview Life of German Reallife - Gui Introduction
|
||||
* @author CroniX kopiert von MichaPlays
|
||||
* @copyright (c) 2008 - 2021 Life of German
|
||||
*/
|
||||
|
||||
export default function Introduction(globalData: IGlobalData): void {
|
||||
|
||||
var DrivingSchoolBrowser: BrowserMp = null;
|
||||
|
||||
mp.events.add("showDrivingSchool", () => {
|
||||
if (DrivingSchoolBrowser !== null) {
|
||||
DrivingSchoolBrowser.destroy();
|
||||
DrivingSchoolBrowser = null;
|
||||
globalData.InInput = false;
|
||||
mp.gui.cursor.show(false, false);
|
||||
mp.gui.chat.activate(true);
|
||||
}
|
||||
else if (!globalData.InInput) {
|
||||
globalData.InInput = true;
|
||||
DrivingSchoolBrowser = mp.browsers.new('package://assets/html/School/DrivingSchool.html');
|
||||
mp.gui.chat.activate(false);
|
||||
mp.gui.cursor.show(true, true);
|
||||
}
|
||||
});
|
||||
|
||||
mp.events.add("removeDrivingSchool", () => {
|
||||
if (DrivingSchoolBrowser == null) {
|
||||
return;
|
||||
}
|
||||
else if (globalData.InInput) {
|
||||
DrivingSchoolBrowser.destroy();
|
||||
DrivingSchoolBrowser = null;
|
||||
globalData.InInput = false;
|
||||
mp.gui.cursor.show(false, false);
|
||||
mp.gui.chat.activate(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user