Add user feedback to drag n drop, Remove Debug
This commit is contained in:
@@ -73,16 +73,18 @@ mp.events.add("render", () => {
|
||||
if (show === true) {
|
||||
var pos = mp.gui.cursor.position;
|
||||
//DEBUG 2D-SCREEN-KOORDINATEN
|
||||
mp.game.graphics.drawText("~r~X: " + pos[0] + " ~g~Y: " + pos[1] + "~s~ ---~b~" + parseFloat(pos[0] / screenX).toFixed(3) + " ~y~" + parseFloat(pos[1] / screenY).toFixed(3) + " " + mouseDown, [pos[0] / screenX, (pos[1] / screenY) - 0.02], {
|
||||
font: 0,
|
||||
color: [255, 255, 255, 185],
|
||||
scale: [0.3, 0.3],
|
||||
outline: true,
|
||||
});
|
||||
//mp.game.graphics.drawText("~r~X: " + pos[0] + " ~g~Y: " + pos[1] + "~s~ ---~b~" + parseFloat(pos[0] / screenX).toFixed(3) + " ~y~" + parseFloat(pos[1] / screenY).toFixed(3) + " " + mouseDown, [pos[0] / screenX, (pos[1] / screenY) - 0.02], {
|
||||
// font: 0,
|
||||
// color: [255, 255, 255, 185],
|
||||
// scale: [0.3, 0.3],
|
||||
// outline: true,
|
||||
//});
|
||||
|
||||
mp.game.graphics.set2dLayer(1);
|
||||
//INVENTARHINTERGRUND
|
||||
mp.game.graphics.drawRect(rxC, ryC, 0.45, 0.7, 255, 255, 255, 200);
|
||||
|
||||
mp.game.graphics.set2dLayer(2);
|
||||
//INVENTARÜBERSCHRIFT
|
||||
mp.game.graphics.drawText("Inventar ~g~(" + inventoryWeight + "/40000g)", [rxC, ryC - (rWidth / 1.20)], {
|
||||
font: 7,
|
||||
@@ -103,6 +105,7 @@ mp.events.add("render", () => {
|
||||
});
|
||||
}
|
||||
|
||||
mp.game.graphics.set2dLayer(3);
|
||||
//SPRITES + ITEMANZAHL
|
||||
for (var currentItem = 0; currentItem < items.length; currentItem++) {
|
||||
if (items[currentItem][4] !== "null") {
|
||||
@@ -116,6 +119,7 @@ mp.events.add("render", () => {
|
||||
}
|
||||
}
|
||||
|
||||
mp.game.graphics.set2dLayer(4);
|
||||
//WENN MAUS ÜBER ITEM
|
||||
if (isMouseOverItem(pos[0], pos[1])) {
|
||||
mp.game.graphics.drawRect(pos[0] / screenX, pos[1] / screenY + 0.055, 0.14, 0.08, 0, 0, 0, 220);
|
||||
@@ -147,19 +151,24 @@ mp.events.add("render", () => {
|
||||
});
|
||||
}
|
||||
|
||||
//WENN FREIER SLOT
|
||||
if (isMouseOverFreeSlot(pos[0], pos[1])) {
|
||||
mp.game.graphics.drawText("~r~FREE SLOT ~g~" + actFreeSlot, [0.5, 0.05], {
|
||||
font: 4,
|
||||
color: [255, 255, 255, 255],
|
||||
scale: [0.7, 0.7],
|
||||
outline: true,
|
||||
});
|
||||
}
|
||||
////WENN FREIER SLOT
|
||||
//if (isMouseOverFreeSlot(pos[0], pos[1])) {
|
||||
// mp.game.graphics.drawText("~r~FREE SLOT ~g~" + actFreeSlot, [0.5, 0.05], {
|
||||
// font: 4,
|
||||
// color: [255, 255, 255, 255],
|
||||
// scale: [0.7, 0.7],
|
||||
// outline: true,
|
||||
// });
|
||||
//}
|
||||
|
||||
//WENN MOUSE DOWN
|
||||
if (mouseDown === true) {
|
||||
mp.game.graphics.drawSprite("Mprpsymbol", "rp", pos[0], pos[1], rWidth / 8, rWidth / 5, 0, 200, 255, 200, 255);
|
||||
if (mouseDown && dragItem !== null) {
|
||||
if (isMouseOverFreeSlot(pos[0], pos[1])) {
|
||||
mp.game.graphics.drawSprite("Mprpsymbol", "rp", pos[0] / screenX, pos[1] / screenY, rWidth / 8, rWidth / 5, 0, 100, 255, 100, 255);
|
||||
} else {
|
||||
mp.game.graphics.drawSprite("Mprpsymbol", "rp", pos[0] / screenX, pos[1] / screenY, rWidth / 8, rWidth / 5, 0, 255, 100, 100, 255);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -3,6 +3,7 @@ using reallife_gamemode.Model;
|
||||
using reallife_gamemode.Server.Extensions;
|
||||
using reallife_gamemode.Server.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="gtanetwork.api" Version="0.3.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.4" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.1.2" />
|
||||
|
||||
Reference in New Issue
Block a user