Jump to content

[Dúvida] Fazer para painel dx não bugar


Recommended Posts

  • Other Languages Moderators

Vc precisa obter a resolução do jogador com guiGetScreenSize. Dai na posição X do painel, vc coloca o tamanho x da tela do jogador menos o tamanho x do painel.

Ex:

screenX, screenY = guiGetScreenSize ()

function renderPainel()
	dxDrawRectangle (screenX - 400, 0, 400, 300, tocolor(255, 255, 0, 150)) -- Painel tem tamanho X:400 e Y:300
end
addEventHandler ("onClientRender", getRootElement(), renderPainel)

 

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