--[[
Info Author: flyBoi_
For resource: InvisibleGame
All rights reserved by InvisibleGame and flyBoi_
----------------------------------------------------
Info Autor: flyBoi_
Dla zasob?w: InvisibleGame
Wszystkie prawa zastrze?one przez InvisibleGame i flyBoi_
]]--
local amercian10 = dxCreateFont("font/american.ttf", 10)
local sx, sy = guiGetScreenSize()
wlaczone = false
aktualnie = glowna
function isMouseIn(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return end
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
else
return false
end
end
addEventHandler("onClientClick", root, function(btn,state)
if btn=="left" and state=="down" then
if wlaczone == true then
if isMouseIn(20/1780*sx, 250/1780*sy, 180/1780*sx, 60/860*sy) then
aktualnie = postac
end
end
end
end)
addEventHandler("onClientRender", root, function(plr)
if wlaczone == true then
if aktualnie == glowna then
dxDrawImage(0/1780*sx, 0/860*sy, 1780/1780*sx, 860/860*sy, "img/db_glowna.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
--dxDrawRectangle(20/1780*sx, 250/1780*sy, 180/1780*sx, 60/860*sy, tocolor(255, 0, 0, 180)) -- to bylo pomocnicze do zrobienia clientClicka
elseif aktualnie == gracze then
dxDrawImage(0/1780*sx, 0/860*sy, 1780/1780*sx, 860/860*sy, "img/db_gracze.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
--dxDrawRectangle(20/1780*sx, 260/1780*sy, 180/1780*sx, 60/860*sy, tocolor(255, 0, 0, 180)) -- to bylo pomocnicze do zrobienia clientClicka
elseif aktualnie == postac then
dxDrawImage(0/1780*sx, 0/860*sy, 1780/1780*sx, 860/860*sy, "img/db_postac.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
end
end
end)
bindKey("TAB", "down", function(plr)
if wlaczone == false then
wlaczone = true
showChat(false)
showCursor(true)
else
wlaczone = false
showChat(true)
showCursor(false)
end
end)