• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Error

            C++博客 首頁 新隨筆 聯(lián)系 聚合 管理
              217 Posts :: 61 Stories :: 32 Comments :: 0 Trackbacks
            bSceneCutsomResolution決定適配策略ResolutionPolicy::EXACT_FIT會用縮放拉伸的方式適配

            void
             CAutoScreen::SetSceneResolute(float w, float h, bool bSceneCutsomResolution)
            {
                CAutoScreen::sceneCutsomResolution=bSceneCutsomResolution;

                if(bSceneCutsomResolution)
                {
                    cocos2d::Size ls = Size(w, h);
                    Size fs = Director::getInstance()->getOpenGLView()->getFrameSize();
                    float sx = ls.width/fs.width;
                    float sy = ls.height/fs.height;
                
                    sceneResolute = ls;
                
                    //定義 scale 變量
                    resoluteBool = sx>sy;
                    float scale = resoluteBool?sx:sy;
                    SetSceneSize(resoluteBool?ls.width:fs.width*scale, resoluteBool?fs.height*scale:ls.height);
                    SetSceneScale(resoluteBool?fs.height*scale/ls.height : fs.width*scale/ls.width);
                
                    Director::getInstance()->getOpenGLView()->setDesignResolutionSize(GetSceneWidth(), GetSceneHeight(), ResolutionPolicy::SHOW_ALL);
                }
                else
                {
                    sceneScale = 0.0f;
                    sceneSize = Size(w, h);
                    sceneResolute = Size(w, h);
                    Director::getInstance()->getOpenGLView()->setDesignResolutionSize(w, h, ResolutionPolicy::EXACT_FIT);
                }
                Director::getInstance()->setContentScaleFactor(1.0f);
            }
            posted on 2016-12-19 18:07 Enic 閱讀(221) 評論(0)  編輯 收藏 引用 所屬分類: 從零開始寫棋牌游戲平臺
            一本久道久久综合狠狠爱| 人妻少妇久久中文字幕一区二区 | 亚洲国产另类久久久精品| 亚洲国产成人久久综合一区77| 天天影视色香欲综合久久| 久久亚洲精品国产精品婷婷| 色婷婷综合久久久久中文 | 亚洲午夜久久久久久久久电影网| 久久天天躁狠狠躁夜夜avapp| 91超碰碰碰碰久久久久久综合| 伊人色综合久久天天人守人婷| 久久99精品国产麻豆| 亚洲成av人片不卡无码久久| 久久人爽人人爽人人片AV | 久久综合成人网| 久久久久亚洲AV片无码下载蜜桃| 91超碰碰碰碰久久久久久综合| 国色天香久久久久久久小说| 国产激情久久久久影院| 性色欲网站人妻丰满中文久久不卡| 亚洲午夜精品久久久久久人妖| 久久精品国产99久久久古代| 久久涩综合| 99久久精品无码一区二区毛片| 日韩精品久久无码中文字幕| 一本久道久久综合狠狠躁AV| 久久久精品无码专区不卡| 国产精品久久久天天影视| 亚洲精品无码久久久久去q | 久久久久九九精品影院| 香港aa三级久久三级| 久久99精品国产| 国产一区二区三区久久精品| 国产精品无码久久久久久| 久久久女人与动物群交毛片| 精品无码久久久久国产动漫3d| 人妻丰满?V无码久久不卡| 久久久久久国产a免费观看不卡| 久久综合久久综合久久| 久久中文娱乐网| 久久国产成人|