Jump to content

[Usful Function Added] dxDrawAnimWindow


0xCiBeR

Recommended Posts

Please, could you order it alphabetically on the useful functions template?

Evenmore, would you mind translating alto and ancho into height and width please?

And one more thing, you have practically copy pasted the code twice, as on the usage example you are writing exactly the same.

Nonetheless, good function and keep up developing new ones.

Link to comment
Please, could you order it alphabetically on the useful functions template?

Evenmore, would you mind translating alto and ancho into height and width please?

And one more thing, you have practically copy pasted the code twice, as on the usage example you are writing exactly the same.

Nonetheless, good function and keep up developing new ones.

rekon foi voce que criou o addon_dayzGive ?

tem outro resource para dayz ?

Please speak English here. Yes, I did DayZGIP but I didn't make any other resources for DayZ

Link to comment
Please, could you order it alphabetically on the useful functions template?

Evenmore, would you mind translating alto and ancho into height and width please?

And one more thing, you have practically copy pasted the code twice, as on the usage example you are writing exactly the same.

Nonetheless, good function and keep up developing new ones.

rekon foi voce que criou o addon_dayzGive ?

tem outro resource para dayz ?

Please speak English here. Yes, I did DayZGIP but I didn't make any other resources for DayZ

ok

Link to comment

I'm sorry, but i dont see this funcion on usage at all here, its just the name of the function.

  
function dxDrawAnimWindow(text,alto,ancho,color,font,anim) 
    local x,y = guiGetScreenSize() 
  
    btAncho = ancho 
    btAlto = alto/20 
  
    local now = getTickCount() 
    local elapsedTime = now - start 
    local endTime = start + 1500 
    local duration = endTime - start 
    local progress = elapsedTime / duration 
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, anim) 
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, btAlto/11, progress, anim) 
  
    posx = (x/2)-(x1/2) 
    posy = (y/2)-(y1/2) 
  
    dxDrawRectangle ( posx, posy-y2, x2, y2, color ) 
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) ) 
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,"center","center")    
  
  
end 

As far as i'm concerned, i should paste this on client and call it.. i dont really see the the usage of

bool dxDrawAnimWindow ( string text, int alto, int ancho, int color, string element font, string anim) 

EDT//: On none of the examples we can see onClientRender / onClientPreRender, so i dont know how this is going to work..

Link to comment
  • MTA Team

OMG, use your brains..Every one knows the only way to draw anything in dx is using onClientRender.

Anyway added to requiered stuff

Besides, i'm not the creator.And the wiki is free to edit..So, if you want to make an example, edit it.I just gave the basics on using it.

@Renkon you are right, missed the order in the template..Thanks!

Edited by Guest
Link to comment
OMG, use your brains..Every one knows the only way to draw anything in dx is using onClientRender.

Besides, i'm not the creator.And the wiki is free to edit..So, if you want to make an example, edit it.I just gave the basics on using it.

@Renkon you are right, missed the order in the template..Thanks!

Please, could you add an example?

Link to comment

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