Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: szerokości
1. dxDraw płynna zmiana szerokości
Witam, mam pytanie. Jak zrobi?, aby w dxDrawRectangle zmienia?a si? p?ynnie szeroko??. Zrobi?em kod, kt?ry zmienia szeroko??, lecz szeroko?? powi?ksza si? tylko w praw? stron?, a ja chcia?bym na obie. Mam te? jeszcze jedno pytanko, czy jest jaka? funkcja, czy co?, kt?ra zmieni t? szeroko?? p?ynnie. My?la?em nad
Kod:

setTimer()
, lecz czy istnieje mo?e jaka? funkcja, kt?ra to zrobi?
Kod:


szerokosc = 160
color1 = tocolor(26, 26, 26, 255)

addEventHandler("onClientRender", root,
function()
if pokaz == true then
dxDrawRectangle(699, 456, szerokosc, 41, color1, false)
showCursor(true)
end
end)

function isMouseInPosition ( x, y, width, height )
if ( not isCursorShowing( ) ) then
return false
end
local sx, sy = guiGetScreenSize ( )
local cx, cy = getCursorPosition ( )
local cx, cy = ( cx * sx ), ( cy * sy )
if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then
return true
else
return false
end
end

function hover1()
if isMouseInPosition(699, 456, 160, 41) and pokaz == true then
color1 = tocolor(13, 13, 13, 244)
szerokosc = 170
else
color1 = tocolor(26, 26, 26, 255)
szerokosc = 160
end
end
addEventHandler("onClientCursorMove", getRootElement(), hover1)


Za pomoc stawiam oczywi?cie :D :arrow: :piwo: