Jump to content

-Rex-

Members
  • Posts

    206
  • Joined

  • Last visited

Everything posted by -Rex-

  1. Gracias Sasu! Solucionado cierren post
  2. Bien, ahora sale mas ancho de lo que deberia en resoluciones menores a 1280 x 600 ._. http://imgur.com/536bJco
  3. He editado el post, y puse el codigo completo, intentare con eso
  4. No esta completo, Solo puse el codigo que lo hace mover en eje de las X local sx, sy = 1280,600 local x, y = guiGetScreenSize ( ) local font2 = dxCreateFont( "img/font2.ttf", ( 15 / sy ) * y ) function joinQuit() for _, v in ipairs( textos ) do local i = v[1] local texto = v[2] local ancho = dxGetTextWidth( texto, 0.60, font2, true ) --outputDebugString( ancho ) local cuenta = ( getTickCount( ) - textos["tick2_"..tostring(i)] ) local endTime = textos["tick_"..tostring(i)] + 1000 local elapsedTime = getTickCount() - textos["tick_"..tostring(i)] local duration = endTime - textos["tick_"..tostring(i)] local progress = elapsedTime / duration local xe, x2, ae = interpolateBetween ( 0, 0, 0, ancho+2, ancho+1, 255, progress, "OutQuad") --outputDebugString( xe ) local alp = 0 textos["rectangle_"..tostring(i)], textos["text_"..tostring(i)], alp = xe , x2 , ae if cuenta >= 2500 then alp = 0 local newcount = math.floor( ( cuenta / 10 ) - 250 ) if newcount <= 100 then textos["texty_"..tostring(i)] = newcount end if newcount <= 100 then textos["rectangley_"..tostring(i)] = newcount end local newcounts = math.floor( ( ( cuenta / 10 ) - 250 ) * 2.5 ) if newcounts <= 250 then textos["alpha_"..tostring(i)] = newcounts end if newcounts >= 240 then textos["alpha_"..tostring(i)] = 250 table.remove( textos, 1 ) end end if 200 - textos["alpha_"..tostring(i)] - 175 > 0 then dxDrawRectangle( ( ( 1270- ( textos["rectangle_"..tostring(i)] / sx ) * x ) / sx ) * x , ( ( 290 -textos["rectangley_"..tostring(i)]) / sy ) * y , ( 165+ancho / sx ) * x, ( 15 / sy ) * y, tocolor(0, 0, 0, 200 -( textos["alpha_"..tostring(i)] - 175 ) ), false) end if 200 -textos["alpha_"..tostring(i)] > 0 then dxDrawText(texto, ( ( 1275 - ( textos["text_"..tostring(i)] / sx ) * x) / sx ) * x , ( ( 290-textos["texty_"..tostring(i)] ) / sy ) * y , ( 500 / sx ) * x, ( 315 / sy ) * y, tocolor(255, 255, 255, 200 -textos["alpha_"..tostring(i)] ), 0.60, font2, "left", "top", false, false, false, true, false) end end end addEventHandler("onClientRender", root, joinQuit ) function outputBarMessage( msj ) if not textos then textos = {} end if not id then id = {} end textos["tick2_"..tostring(#id+1)] = getTickCount( ) textos["tick_"..tostring(#id+1)] = getTickCount( ) textos["rectangle_"..tostring(#id+1)] = 0 textos["text_"..tostring(#id+1)] = 0 textos["rectangley_"..tostring(#id+1)] = 0 textos["texty_"..tostring(#id+1)] = 0 textos["alpha_"..tostring(#id+1)] = 0 table.insert( textos, { #id+1, tostring( msj ) }) table.insert( id, { #id+1 }) end EDIT2: Lo he puesto completo, no importa de igual voy a liberar este recurso.
  5. ¿Como podría hacerlo, Me das un ejemplo?
  6. Hola tengo un problema de multiresolucion. Es que lo que pasa que en resoluciones menores a 1280 x 600 ( la mia ), sale la mitad del texto y el problema esta en esta funcion local ancho = dxGetTextWidth( texto, 0.60, font2, true ) Yo quiero que salga de la misma forma que en la resolucion de 1280 x 600, Pero no es asi, hay les dejo una foto de como sale en las dos resoluciones. Que deberia hacer? http://imgur.com/a/XWOz3
×
×
  • Create New...