Kenix Posted March 24, 2011 Share Posted March 24, 2011 у функции dxDrawов нет relative почему бы её не добавить у гуи есть же Link to comment
MX_Master Posted March 24, 2011 Share Posted March 24, 2011 да без проблем (: скриптинг тебе зачем? 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
lil Toady Posted March 24, 2011 Share Posted March 24, 2011 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now