add cursor & close inputhelper
This commit is contained in:
@@ -34,9 +34,9 @@
|
||||
ShapeTonne.push(mp.colshapes.newSphere(posArr[i].x, posArr[i].y, posArr[i].z + 0.5, 1.75));
|
||||
}
|
||||
|
||||
BlipTonneBase = mp.blips.new(1, new mp.Vector3(-426.69382, -1691.0972, 19.02909 - 1), { name: 'Recylinganlage', color: 5, shortRange: false });
|
||||
CheckpointTonneBase = mp.markers.new(1, new mp.Vector3(-426.69382, -1691.0972, 19.02909 - 1), 10, { direction: new mp.Vector3(-235.5747, -1685.475, 32.7207), color: [255, 255, 0, 150], visible: true, dimension: 0 });
|
||||
ShapeTonneBase = mp.colshapes.newSphere(-426.69382, -1691.0972, 19.02909 - 1, 10);
|
||||
BlipTonneBase = mp.blips.new(1, new mp.Vector3(-442.3999, -1701.5234, 18.933002 - 1), { name: 'Recylinganlage', color: 5, shortRange: false });
|
||||
CheckpointTonneBase = mp.markers.new(1, new mp.Vector3(-442.3999, -1701.5234, 18.933002 - 1), 10, { direction: new mp.Vector3(-235.5747, -1685.475, 32.7207), color: [255, 255, 0, 150], visible: true, dimension: 0 });
|
||||
ShapeTonneBase = mp.colshapes.newSphere(-442.3999, -1701.5234, 18.933002 - 1, 10);
|
||||
});
|
||||
mp.events.add('SERVER:MuellmannBCSEntfernen', () => {
|
||||
for (var i = 0; i < BlipTonne.length; i++) {
|
||||
|
||||
@@ -21,6 +21,7 @@ function setInputFieldType(value) {
|
||||
return field;
|
||||
}
|
||||
|
||||
|
||||
function setText(heading, description) {
|
||||
setHeading(heading);
|
||||
setDescription(description);
|
||||
@@ -47,8 +48,8 @@ function getInput() {
|
||||
return input.value.length != 0 ? input.value : null;
|
||||
}
|
||||
|
||||
function closeWindow() {
|
||||
// TODO: Fenster schließen
|
||||
close.onclick = function closeWindow() {
|
||||
mp.trigger('closeinputhelper');
|
||||
console.log('Fenster geschlossen!');
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,9 @@ export default class InputHelper {
|
||||
this.getValue = this.getValue.bind(this);
|
||||
|
||||
this.value = undefined;
|
||||
|
||||
mp.events.add('closeinputhelper', this.finish);
|
||||
|
||||
}
|
||||
|
||||
show() {
|
||||
@@ -32,6 +35,7 @@ export default class InputHelper {
|
||||
this.data.InInput = true;
|
||||
this.created = true;
|
||||
this.browser = mp.browsers.new('package://assets/html/inputhelper/index.html');
|
||||
mp.gui.cursor.show(true, true);
|
||||
}
|
||||
|
||||
private finish() {
|
||||
@@ -43,6 +47,7 @@ export default class InputHelper {
|
||||
this.data.InMenu = false;
|
||||
this.created = false;
|
||||
this.browser = null;
|
||||
mp.gui.cursor.show(false, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user