Arsilex Posted February 6, 2013 Share Posted February 6, 2013 Por si alguien quiere eh creado esto: --CLIEN-SIDE function getResolucion(xC,yC,widthC,heightC) local wC,hC = guiGetScreenSize() local xR = 1366 local yR = 768 if xC and yC and widthC and heightC then x = (xC/xR )*wC y = (yC/yR )*hC w = (widthC/xR )*wC h = (heightC/yR )*hC return x,y,w,h else outputChatBox("** #FF0000Error! **",255,0,0,true) return xC,yC,widthC,heightC end end Recordar cambiar 1366 y 768 por su resolucion dxDrawImage ( getResolution(24,124,73,235), 'arrow.png', angle, 0, -120 ) o exportando asi (solo si el codigo esta en otro script ) dxDrawImage ( exports:resource.getResolution(24,124,73,235), 'arrow.png', angle, 0, -120 ) Esto hace que lo que use la funcion devolvera las coordenadas para todas las resoluciones e.e Link to comment
RekZ Posted February 6, 2013 Share Posted February 6, 2013 perdona mi ignorancia , pero que hace , no lo entiendo muy bien Link to comment
Alexs Posted February 6, 2013 Share Posted February 6, 2013 Creo que le das posiciones absolutas y te las devuelve acomodadas a las de cualquier user. Link to comment
Arsilex Posted February 6, 2013 Author Share Posted February 6, 2013 eso te ahora tu tiempo valioso al crear guis o dx Link to comment
Carmison Posted February 6, 2013 Share Posted February 6, 2013 Se ve bien yo lo que hago para no complicarme es sWidth,sHeight = guiGetScreenSize() --1024x768 es la resolucion que uso local x = sWidth /1024 local y = sHeight /768 y de ahi solo agrego los x* y y* dxDrawText("Holi:", x*25, y*260, x*261, y*560, tocolor(0, 255, 251, 255), 1.2, pricedown, "left", "center", false) y me evito de estar multiplicando tanto jeje Link to comment
Arsilex Posted February 6, 2013 Author Share Posted February 6, 2013 con lo mio es mas facil pienso yo. Link to comment
Recommended Posts