x, y = guiGetScreenSize()
_sX = 0
_sY = 0
function resX(value)
return (value/1920) * x
end
function resY(value)
return (value/1920) * y
end
addEvent("PokazGuiTuning", true)
addEventHandler("PokazGuiTuning", resourceRoot, function(pojazd)
GetVDBTrabalhos(pojazd)
text = {}
for i,_ in ipairs(editBox) do
table.insert(text,{})
end
boxClick = false
addEventHandler("onClientRender",root,interfacetrabs)
addEventHandler("onClientClick",root,clicktrabs)
showCursor(true)
end)
font = "default-bold"
function updateTrabList(tuning)
startDxGridlist(tuning,_sX+resX(600),_sY+resY(350),resX(800),resY(720),7,resY(2.5),font,"Wyszukaj...")
end
function interfacetrabs()
showDxGridlist(100)
end
function clicktrabs()
local trab = getElementData(localPlayer,"dxGridLineSelecTrab")
if not trab then return end
outputDebugString("Wybrano: "..data[trab][1].." ",0,232,172,57)
end
function GetVDBTrabalhos(veh)
tuning = {}
local upgrades = getVehicleCompatibleUpgrades(veh)
for upgradeKey, upgradeValue in ipairs ( upgrades ) do
local slot = getVehicleUpgradeSlotName(upgradeValue)
if not tuning[slot] then
tuning[slot] = {}
table.insert(tuning,{slot})
end
end
updateTrabList(tuning)
end