• <i id='HouvT'><tr id='HouvT'><dt id='HouvT'><q id='HouvT'><span id='HouvT'><b id='HouvT'><form id='HouvT'><ins id='HouvT'></ins><ul id='HouvT'></ul><sub id='HouvT'></sub></form><legend id='HouvT'></legend><bdo id='HouvT'><pre id='HouvT'><center id='HouvT'></center></pre></bdo></b><th id='HouvT'></th></span></q></dt></tr></i><div id='HouvT'><tfoot id='HouvT'></tfoot><dl id='HouvT'><fieldset id='HouvT'></fieldset></dl></div>
        <bdo id='HouvT'></bdo><ul id='HouvT'></ul>
      <legend id='HouvT'><style id='HouvT'><dir id='HouvT'><q id='HouvT'></q></dir></style></legend>

        <small id='HouvT'></small><noframes id='HouvT'>

      1. <tfoot id='HouvT'></tfoot>

        CCMenuItem字体颜色变化

        时间:2024-08-12

        <small id='8xPFZ'></small><noframes id='8xPFZ'>

            <tbody id='8xPFZ'></tbody>

          <legend id='8xPFZ'><style id='8xPFZ'><dir id='8xPFZ'><q id='8xPFZ'></q></dir></style></legend>
              <bdo id='8xPFZ'></bdo><ul id='8xPFZ'></ul>
              <i id='8xPFZ'><tr id='8xPFZ'><dt id='8xPFZ'><q id='8xPFZ'><span id='8xPFZ'><b id='8xPFZ'><form id='8xPFZ'><ins id='8xPFZ'></ins><ul id='8xPFZ'></ul><sub id='8xPFZ'></sub></form><legend id='8xPFZ'></legend><bdo id='8xPFZ'><pre id='8xPFZ'><center id='8xPFZ'></center></pre></bdo></b><th id='8xPFZ'></th></span></q></dt></tr></i><div id='8xPFZ'><tfoot id='8xPFZ'></tfoot><dl id='8xPFZ'><fieldset id='8xPFZ'></fieldset></dl></div>

              <tfoot id='8xPFZ'></tfoot>
                • 本文介绍了CCMenuItem字体颜色变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何设置 CCMenuItemFont 的颜色.我一直在搜索几个小时,返回 0 个有效结果.它们都已经过时了.

                  How can I set the color of a CCMenuItemFont. I've been searching for hours, returning 0 valid results. They're all outdated.

                  [CCMenuItemFont setFontName:@"Futura"]; 
                      [CCMenuItemFont setFontSize:40];
                      CCMenuItem *Play = [CCMenuItemFont itemFromString:@"Play" target:self selector:@selector(goToLevelSelect:)]; 
                  
                      CCMenu *menuPlay = [CCMenu menuWithItems: Play, nil]; 
                      menuPlay.position = ccp(50,100);
                      [menuPlay alignItemsVerticallyWithPadding:10];
                      [self addChild:menuPlay]; 
                  

                  推荐答案

                  CCMenuItemFont 源自 CCMenuItemLabel 具有标签属性:

                  CCMenuItemFont is derived from CCMenuItemLabel which has a label property:

                  CCMenuItemLabel *play = [CCMenuItemFont itemFromString:@"Play" 
                                           target:self selector:@selector(goToLevelSelect:)];
                  play.color = ccRED;
                  

                  这篇关于CCMenuItem字体颜色变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Apple 目前不接受使用此版本 SDK 构建的应用程序 下一篇:如何在 COCOS2d Android 中使用 CClistview?

                  相关文章

                  <legend id='ddLwl'><style id='ddLwl'><dir id='ddLwl'><q id='ddLwl'></q></dir></style></legend>

                    • <bdo id='ddLwl'></bdo><ul id='ddLwl'></ul>

                    <tfoot id='ddLwl'></tfoot>
                    1. <i id='ddLwl'><tr id='ddLwl'><dt id='ddLwl'><q id='ddLwl'><span id='ddLwl'><b id='ddLwl'><form id='ddLwl'><ins id='ddLwl'></ins><ul id='ddLwl'></ul><sub id='ddLwl'></sub></form><legend id='ddLwl'></legend><bdo id='ddLwl'><pre id='ddLwl'><center id='ddLwl'></center></pre></bdo></b><th id='ddLwl'></th></span></q></dt></tr></i><div id='ddLwl'><tfoot id='ddLwl'></tfoot><dl id='ddLwl'><fieldset id='ddLwl'></fieldset></dl></div>
                    2. <small id='ddLwl'></small><noframes id='ddLwl'>