Jump to content

есть предложение


Recommended Posts

да без проблем (: скриптинг тебе зачем? 3 строки же написать функцию, которая будет от любого относительного положения давать точное

local tRes = { guiGetScreenSize() } 
  
function rel2exact ( nRel, sWidthOrHeight ) 
    if sWidthOrHeight == 'height' then 
        return tRes[2] * tonumber(nRel) 
    else 
        return tRes[1] * tonumber(nRel) 
    end 
end 

Link to comment
function dxDrawRelativeText ( text, left, top, right, bottom, ... ) 
    local sx, sy = getScreenSize() 
    left, top = sx * left, sy * top 
    if ( right and bottom ) then 
      right, bottom = sx * right, sy * bottom 
    end 
    dxDrawText ( text, left, top, right, bottom, ... ) 
end 

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