Finished migration to TypeScript, temporary disabled char creator

This commit is contained in:
hydrant
2019-03-11 22:17:49 +01:00
parent 715cf3c1e6
commit 8ce3fd6f52
71 changed files with 4800 additions and 4627 deletions

View File

@@ -0,0 +1,36 @@
/**
* @overview Life of German Reallife - Save Main main.js
* @author VegaZ
* @copyright (c) 2008 - 2018 Life of German
*/
export default function saveData() {
var saveBrowser: BrowserMp;
mp.events.add('saveBlip', () => {
saveBrowser = mp.browsers.new('package://assets/html/save/blip/index.html');
mp.gui.chat.activate(false);
mp.gui.cursor.show(true, true);
});
mp.events.add('saveBlipData', (blipSprite, blipName, blipScale, blipColor, blipAlpha, blipDrawDistance, blipShortRange, blipRotation, blipDimension) => {
if (saveBrowser) {
saveBrowser.destroy();
}
mp.events.callRemote('OnSaveBlipData', blipSprite, blipName, blipScale, blipColor, blipAlpha,
blipDrawDistance, blipShortRange, blipRotation, blipDimension);
mp.gui.chat.push(blipShortRange);
mp.gui.cursor.show(false, false);
mp.gui.chat.activate(true);
});
mp.events.add('cancelData', () => {
if (saveBrowser) {
saveBrowser.destroy();
}
mp.gui.cursor.show(false, false);
mp.gui.chat.activate(true);
});
}