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: animate
1. animate
Mam problem z animate bo na wikipedii MTA, jest napisane:


--Slide Animation
local sx
, sy = guiGetScreenSize( )
local window = guiCreateWindow((sx-300)/2, (sy-400)/2, 300, 400, "Test", false)
guiSetVisible(window, false)
bindKey("f2", "down", function( )
    if 
anim then return end
    local v 
= guiGetVisible(window)
    if 
not v then 
        guiSetVisible
(window, true)
        
animate(0, 1, 1, 1000, function(alpha)
            
guiSetAlpha(window,alpha)
        
end)
    
end
    anim 
= true
    animate
(v and 400 or 0, v and 0 or 400, 2, 1250, function(height)
        if 
v and height == 0 then 
            guiSetVisible
(window, false)
            
anim = false
        
elseif not v and height == 400 then
            anim 
= false
        end
        local w
, h = guiGetSize(window, false)
        
guiSetSize(window, w, height, false)
    
end)
end)




ja zrobilem tak:
local pos = {
    
bg = {x = sw(0), y = sh(0), w = sw(1920), h = sw(1080) },
    
panel = {x = sw(405), y = sh(230), w = sw(1154), h = sw(623) }
}
animate(600, -60, 2, 1500, function(player)
    
dxDrawImage(pos["panel"].x, pos["panel"].y, pos["panel"].w, pos["panel"].h, ui.panel)
end)
Obraz si? pojawia, ale po chwili znika bez ?adnej animacji

Mam pytanie czy mo?e kto? da? przyk?ad z tym pod dxDrawImage