Jump to content

RGB em Dx


Recommended Posts

6 hours ago, ZLOKO said:

Alguem sabe me dizer como posso fazer um efeito rgb em um painel dx? Creio que seja utilizando interpolate

local r, g, b = 0, 0, 0
local tick = 0

function panel()
  r = interpolateBetween(0, 0, 0, 215, 0, 0, (getTickCount()-tick)/300, 'SineCurve')
  g = interpolateBetween(0, 0, 0, 50, 0, 0, (getTickCount()-tick)/500, 'SineCurve')
  b = interpolateBetween(0, 0, 0, 110, 0, 0, (getTickCount()-tick)/730, 'SineCurve')
  dxDrawRectangle(screenW * 0.2000, screenH * 0.4000, screenW * 0.2800, screenH * 0.3200, tocolor(r, g, b, 255), false)
  end
addEventHandler('onClientRender', root, panel)

 

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