全文预览

director的自适应屏幕

上传者:塑料瓶子 |  格式:pptx  |  页数:6 |  大小:122KB

文档介绍
alePercent > pHeightScalePercent then -- pScalePercent = pHeightScalePercent pScalePercent = pWidthScalePercent else pScalePercent = pHeightScalePercent -- pScalePercent = pWidthScalePercent end if put pStageHeight / pScalePercent &"--"& pStageWidth / pScalePercent t=integer((the desktoprectlist [1].bottom- pStageHeight / pScalePercent )/2.0) b=integer( t+pStageHeight / pScalePercent ) l=integer((the desktoprectlist [1].right- pStageWidth / pScalePercent )/2.0) r=integer( l+pStageWidth / pScalePercent ) gRect = rect ( l,t,r,b ) put gRect (the stage). drawrect = rect (0,0,( gRect.right-gRect.left ),( gRect.bottom-gRect.top )) (the stage). rect = gRect -- rect (0,0,gRect.right,gRect.bottom) end 为什么我又贴代码了呢,因为有些人就是这么懒!好了,以上就是我的个人的解决办法,如果有更好的或者有错误,望前辈指点

收藏

分享

举报
下载此文档