Jump to content

Ayuda screenSize


Plate

Recommended Posts

Hola bueno quise intentar usar el

guiGetScreenSize 

por primera vez (nunca lo use) y no aparece el texto

el codigo sin screen:

        dxDrawText(tostring(theExp),910.0,173.0,961.0,189.0,tocolor(255,255,255,255),1.0,"default-bold","left","top",false,false,false) 
        dxDrawText(tostring(theLevel),797.0,170.0,848.0,186.0,tocolor(255,255,255,255),1.0,"default-bold","left","top",false,false,false) 

el codigo con size

  
        local sWidth, sHeight = guiGetScreenSize() 
        dxDrawText(tostring(theExp),sWidth*888,sHeight*288,sWidth*938,sHeight*315,tocolor(255,255,255,255),1.0,"default-bold","left","top",false,false,false) 
        dxDrawText(tostring(theLevel),sWidth*778,sHeight*283,sWidth*828,sHeight*31,tocolor(255,255,255,255),1.0,"default-bold","left","top",false,false,false) 

Lo hize con la resolucion 1024x600x16

Link to comment

Si aparece, solo que fuera de la pantalla, ya que 1024 * 888 son 909312, usa números entre 0 y 1 0 es 0 y 1 es 1024, la multiplicación hará lo demás:

        local sWidth, sHeight = guiGetScreenSize() 
        dxDrawText(tostring(theExp),sWidth*.8671875,sHeight*.48,sWidth*.916015625,sHeight*.525,tocolor(255,255,255,255),1.0,"default-bold","left","top",false,false,false) 
        dxDrawText(tostring(theLevel),sWidth*.759765625,sHeight*.2763671875,sWidth*.80859375,sHeight*.0302734375,tocolor(255,255,255,255),1.0,"default-bold","left","top",false,false,false) 
  

Prueba, no estoy seguro.

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...