Jump to content

GUI Animations


Mefisto_PL

Recommended Posts

Posted

I have an image and I want to move that to down. ( And If you can show me how to hide it :D, but in first that must be showed >.< )

local bg_up = guiCreateStaticImage ( 0, -0.001, 1, 0.15, "menu/images/up.png", true ) 
  
bindKey("F7", "down", 
function () 
        if panel then 
            showCursor ( false ) 
            panel = false 
        else 
            Animation.createAndPlay(bg_up, Animation.presets.guiMove( 0, -0.001 )) 
            showCursor ( true ) 
            panel = true 
        end 
    end 
) 

Posted

Well, I don't use that library anymore neither I'm playing MTA:SA. I don't remember which parameters they are but I'm sure there are at least 2 parameters missing.

Posted
local bg_up = guiCreateStaticImage ( 0, 0.01, 1, 0.15, "menu/images/up.png", true ) 
  
bindKey("F7", "down", 
function () 
        if panel then 
            showCursor ( false ) 
            panel = false 
        else 
            Animation.createAndPlay(bg_up, Animation.presets.guiMove( 0, 0.1 )) 
            showCursor ( true ) 
            panel = true 
        end 
    end 
) 

try this

Posted
I don't get what you asking. Maybe explain it in details? Like, what you want to do, what is causing in the middle, give examples maybe?

I want to move my image to down lol.. but I can't see an image . :x

Posted

use

guiGetPosition  
guiSetPosition 
setTimer 

ex.

setTimer (  
    function ( ) 
        local x, y = guiGetPosition ( theWindow, false )         
        guiSetPosition ( theWindow, x, y - 8, false )   
    end 
, 80, 25 ) 

Posted

It's correct, but I found this:

local label = guiCreateLabel(10, 100, 150, 20, 'Test', false) 
      Animation.createAndPlay(label, Animation.presets.guiMove(200, 100, 2000)) 

Here is 3 paramaters, but which? o.O

Posted
It's correct, but I found this:
local label = guiCreateLabel(10, 100, 150, 20, 'Test', false) 
      Animation.createAndPlay(label, Animation.presets.guiMove(200, 100, 2000)) 

Here is 3 paramaters, but which? o.O

3rd argument is the time.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...