Jump to content

Question


Recommended Posts

Posted

Hello guys, Is it possible to create an animated window or an animated dxText like example from bottom of the screen to the center of the screen.

If yes then tell me the functions that i could use to make it, thanks.

-Sent from my iPhone.

Posted

You can just use the onClientRender and some math to move your GUI. Won't be all to hard if you ask me, just make sure you add a check in there for the FPS of a player, so it doesn't move to fast for others.

Posted

You can just use a variable

local sx, sy = guiGetScreenSize ( ) 
local y = sy + 20 
  
addEventHandler ( "onClientRender", root, function ( ) 
  
    if ( y > ( sy / 2 ) then 
        y = y - 2 
    elseif ( y < ( sy / 2 ) ) then   
        y = ( sy / 2 ) 
    end 
     
    dxDrawText ( "Text", 0, y, sx, 20 ) 
     
end ) 

Posted
Though InterPolate between is for 3D positions (x,y,z) not the gui window(x,y,width,height)

You can use interpolateBetween with pretty much anything. I've used it with for some of my interfaces. So it's certainly doable.

Posted

Ineeded, interpolateBetween is your best friend at doing animations once you've mastered it. It is an interpolate between any values, if you only want one, just place 0 in the remaining places. (150,0,0,200,0,0)

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...