mirror of https://github.com/axmolengine/axmol.git
Merge pull request #7012 from Dhilan007/v3-testcast
update test cast of label.
This commit is contained in:
commit
29ac8d746d
|
@ -570,8 +570,6 @@
|
|||
1AC35CD718CED84500F37B72 /* CocosBuilderExample.ccbproj in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CAF18CED84500F37B72 /* CocosBuilderExample.ccbproj */; };
|
||||
1AC35CD818CED84500F37B72 /* CocosBuilderExample.ccbresourcelog in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CB018CED84500F37B72 /* CocosBuilderExample.ccbresourcelog */; };
|
||||
1AC35CD918CED84500F37B72 /* CocosBuilderExample.ccbresourcelog in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CB018CED84500F37B72 /* CocosBuilderExample.ccbresourcelog */; };
|
||||
1AC35CDC18CED84500F37B72 /* commonly_used_words.txt in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CB218CED84500F37B72 /* commonly_used_words.txt */; };
|
||||
1AC35CDD18CED84500F37B72 /* commonly_used_words.txt in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CB218CED84500F37B72 /* commonly_used_words.txt */; };
|
||||
1AC35CDE18CED84500F37B72 /* components in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CB318CED84500F37B72 /* components */; };
|
||||
1AC35CDF18CED84500F37B72 /* components in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CB318CED84500F37B72 /* components */; };
|
||||
1AC35CE018CED84500F37B72 /* configs in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CB418CED84500F37B72 /* configs */; };
|
||||
|
@ -697,7 +695,6 @@
|
|||
1AC35DE318CEE65900F37B72 /* fileLookup.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CB918CED84500F37B72 /* fileLookup.plist */; };
|
||||
1AC35DE518CEE65900F37B72 /* Hello.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CBD18CED84500F37B72 /* Hello.png */; };
|
||||
1AC35DE618CEE65900F37B72 /* effect1.raw in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CB518CED84500F37B72 /* effect1.raw */; };
|
||||
1AC35DE718CEE65900F37B72 /* commonly_used_words.txt in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CB218CED84500F37B72 /* commonly_used_words.txt */; };
|
||||
1AC35DE918CEE65900F37B72 /* effect1.wav in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CB618CED84500F37B72 /* effect1.wav */; };
|
||||
1AC35DEA18CEE65900F37B72 /* pew-pew-lei.wav in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CC418CED84500F37B72 /* pew-pew-lei.wav */; };
|
||||
1AC35DEB18CEE65B00F37B72 /* CocosBuilderExample.ccbproj in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CAF18CED84500F37B72 /* CocosBuilderExample.ccbproj */; };
|
||||
|
@ -709,7 +706,6 @@
|
|||
1AC35DF118CEE65B00F37B72 /* fileLookup.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CB918CED84500F37B72 /* fileLookup.plist */; };
|
||||
1AC35DF318CEE65B00F37B72 /* Hello.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CBD18CED84500F37B72 /* Hello.png */; };
|
||||
1AC35DF418CEE65B00F37B72 /* effect1.raw in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CB518CED84500F37B72 /* effect1.raw */; };
|
||||
1AC35DF518CEE65B00F37B72 /* commonly_used_words.txt in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CB218CED84500F37B72 /* commonly_used_words.txt */; };
|
||||
1AC35DF718CEE65B00F37B72 /* effect1.wav in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CB618CED84500F37B72 /* effect1.wav */; };
|
||||
1AC35DF818CEE65B00F37B72 /* pew-pew-lei.wav in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CC418CED84500F37B72 /* pew-pew-lei.wav */; };
|
||||
1AF152D918FD252A00A52F3D /* PerformanceCallbackTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AF152D718FD252A00A52F3D /* PerformanceCallbackTest.cpp */; };
|
||||
|
@ -1668,7 +1664,6 @@
|
|||
1AC35CAE18CED84500F37B72 /* ccb */ = {isa = PBXFileReference; lastKnownFileType = folder; name = ccb; path = "../tests/cpp-tests/Resources/ccb"; sourceTree = "<group>"; };
|
||||
1AC35CAF18CED84500F37B72 /* CocosBuilderExample.ccbproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = CocosBuilderExample.ccbproj; path = "../tests/cpp-tests/Resources/CocosBuilderExample.ccbproj"; sourceTree = "<group>"; };
|
||||
1AC35CB018CED84500F37B72 /* CocosBuilderExample.ccbresourcelog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CocosBuilderExample.ccbresourcelog; path = "../tests/cpp-tests/Resources/CocosBuilderExample.ccbresourcelog"; sourceTree = "<group>"; };
|
||||
1AC35CB218CED84500F37B72 /* commonly_used_words.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = commonly_used_words.txt; path = "../tests/cpp-tests/Resources/commonly_used_words.txt"; sourceTree = "<group>"; };
|
||||
1AC35CB318CED84500F37B72 /* components */ = {isa = PBXFileReference; lastKnownFileType = folder; name = components; path = "../tests/cpp-tests/Resources/components"; sourceTree = "<group>"; };
|
||||
1AC35CB418CED84500F37B72 /* configs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = configs; path = "../tests/cpp-tests/Resources/configs"; sourceTree = "<group>"; };
|
||||
1AC35CB518CED84500F37B72 /* effect1.raw */ = {isa = PBXFileReference; lastKnownFileType = file; name = effect1.raw; path = "../tests/cpp-tests/Resources/effect1.raw"; sourceTree = "<group>"; };
|
||||
|
@ -3273,7 +3268,6 @@
|
|||
1AC35CB918CED84500F37B72 /* fileLookup.plist */,
|
||||
1AC35CBD18CED84500F37B72 /* Hello.png */,
|
||||
1AC35CB518CED84500F37B72 /* effect1.raw */,
|
||||
1AC35CB218CED84500F37B72 /* commonly_used_words.txt */,
|
||||
1AC35CB618CED84500F37B72 /* effect1.wav */,
|
||||
1AC35CC418CED84500F37B72 /* pew-pew-lei.wav */,
|
||||
);
|
||||
|
@ -4262,7 +4256,6 @@
|
|||
1ABCA38818CD9E180087CE3A /* DeprecatedOpenglEnum.lua in Resources */,
|
||||
1AC35DE118CEE65900F37B72 /* background.ogg in Resources */,
|
||||
15C90B4B18E66C2F00D69802 /* url.lua in Resources */,
|
||||
1AC35DE718CEE65900F37B72 /* commonly_used_words.txt in Resources */,
|
||||
1ABCA37A18CD9E180087CE3A /* CCBReaderLoad.lua in Resources */,
|
||||
1AC35DDF18CEE65900F37B72 /* music.mid in Resources */,
|
||||
1AC35D7518CEE58500F37B72 /* src in Resources */,
|
||||
|
@ -4352,7 +4345,6 @@
|
|||
1ABCA39B18CD9E180087CE3A /* StudioConstants.lua in Resources */,
|
||||
1ABCA38D18CD9E180087CE3A /* extern.lua in Resources */,
|
||||
1AC35DEB18CEE65B00F37B72 /* CocosBuilderExample.ccbproj in Resources */,
|
||||
1AC35DF518CEE65B00F37B72 /* commonly_used_words.txt in Resources */,
|
||||
1AC35DCA18CEE65200F37B72 /* animations in Resources */,
|
||||
1A1645A9191B6283008C7C7F /* ccs-res in Resources */,
|
||||
1AC35DA118CEE5D100F37B72 /* Icon-72.png in Resources */,
|
||||
|
@ -4393,7 +4385,6 @@
|
|||
1AC35CFA18CED84500F37B72 /* Misc in Resources */,
|
||||
1AC35D0418CED84500F37B72 /* Shaders in Resources */,
|
||||
1AC35CD818CED84500F37B72 /* CocosBuilderExample.ccbresourcelog in Resources */,
|
||||
1AC35CDC18CED84500F37B72 /* commonly_used_words.txt in Resources */,
|
||||
B2507B6B192589AF00FA4972 /* Shaders3D in Resources */,
|
||||
1AC35D0618CED84500F37B72 /* spine in Resources */,
|
||||
1AC35CE818CED84500F37B72 /* extensions in Resources */,
|
||||
|
@ -4471,7 +4462,6 @@
|
|||
B2507B6C192589AF00FA4972 /* Shaders3D in Resources */,
|
||||
1AC35CED18CED84500F37B72 /* fonts in Resources */,
|
||||
1AC35CD718CED84500F37B72 /* CocosBuilderExample.ccbproj in Resources */,
|
||||
1AC35CDD18CED84500F37B72 /* commonly_used_words.txt in Resources */,
|
||||
1AC35C8918CECF1400F37B72 /* Default.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
|
|
@ -62,7 +62,6 @@ static std::function<Layer*()> createFunctions[] =
|
|||
CL(LabelTTFAlignmentNew),
|
||||
CL(LabelFNTBounds),
|
||||
CL(LabelTTFLongLineWrapping),
|
||||
CL(LabelTTFLargeText),
|
||||
CL(LabelTTFColor),
|
||||
CL(LabelTTFFontsTestNew),
|
||||
CL(LabelTTFDynamicAlignment),
|
||||
|
@ -606,7 +605,7 @@ LabelTTFUnicodeChinese::LabelTTFUnicodeChinese()
|
|||
auto size = Director::getInstance()->getWinSize();
|
||||
// Adding "啊" letter at the end of string to make VS2012 happy, otherwise VS will generate errors
|
||||
// like "Error 3 error C2146: syntax error : missing ')' before identifier 'label'";
|
||||
TTFConfig ttfConfig("fonts/wt021.ttf",28,GlyphCollection::CUSTOM, "美好的一天啊");
|
||||
TTFConfig ttfConfig("fonts/HKYuanMini.ttf",28,GlyphCollection::CUSTOM, "美好的一天啊");
|
||||
auto label = Label::createWithTTF(ttfConfig,"美好的一天啊", TextHAlignment::CENTER, size.width);
|
||||
|
||||
if(label) {
|
||||
|
@ -962,30 +961,6 @@ std::string LabelTTFLongLineWrapping::subtitle() const
|
|||
return "Uses the new Label with TTF. Testing auto-wrapping";
|
||||
}
|
||||
|
||||
LabelTTFLargeText::LabelTTFLargeText()
|
||||
{
|
||||
auto size = Director::getInstance()->getWinSize();
|
||||
|
||||
// Long sentence
|
||||
TTFConfig ttfConfig("fonts/wt021.ttf",18,GlyphCollection::DYNAMIC);
|
||||
std::string text = FileUtils::getInstance()->getStringFromFile("commonly_used_words.txt");
|
||||
auto label = Label::createWithTTF(ttfConfig,text, TextHAlignment::CENTER, size.width);
|
||||
if(label) {
|
||||
label->setPosition( Vec2(size.width/2, size.height/2) );
|
||||
addChild(label);
|
||||
}
|
||||
}
|
||||
|
||||
std::string LabelTTFLargeText::title() const
|
||||
{
|
||||
return "New Label + .TTF";
|
||||
}
|
||||
|
||||
std::string LabelTTFLargeText::subtitle() const
|
||||
{
|
||||
return "Uses the new Label with TTF. Testing large text";
|
||||
}
|
||||
|
||||
LabelTTFColor::LabelTTFColor()
|
||||
{
|
||||
auto size = Director::getInstance()->getWinSize();
|
||||
|
@ -1093,7 +1068,7 @@ LabelTTFCJKWrappingTest::LabelTTFCJKWrappingTest()
|
|||
Vec2(size.width * 0.85, size.height * 0.8),
|
||||
Vec2(size.width * 0.85, 0), 1, Color4F(1, 0, 0, 1));
|
||||
|
||||
TTFConfig ttfConfig("fonts/wt021.ttf", 25, GlyphCollection::DYNAMIC);
|
||||
TTFConfig ttfConfig("fonts/HKYuanMini.ttf", 25, GlyphCollection::DYNAMIC);
|
||||
auto label1 = Label::createWithTTF(ttfConfig,
|
||||
"你好,Cocos2d-x v3的New Label.", TextHAlignment::LEFT, size.width * 0.75);
|
||||
if(label1) {
|
||||
|
@ -1162,7 +1137,7 @@ LabelTTFUnicodeNew::LabelTTFUnicodeNew()
|
|||
addChild(label2);
|
||||
|
||||
// chinese
|
||||
ttfConfig.fontFilePath = "fonts/wt021.ttf";
|
||||
ttfConfig.fontFilePath = "fonts/HKYuanMini.ttf";
|
||||
ttfConfig.glyphs = GlyphCollection::CUSTOM;
|
||||
ttfConfig.customGlyphs = chinese.c_str();
|
||||
auto label3 = Label::createWithTTF(ttfConfig,chinese, TextHAlignment::CENTER,size.width);
|
||||
|
|
|
@ -440,17 +440,6 @@ protected:
|
|||
void onDraw(const Mat4 &transform, uint32_t flags);
|
||||
};
|
||||
|
||||
class LabelTTFLargeText : public AtlasDemoNew
|
||||
{
|
||||
public:
|
||||
CREATE_FUNC(LabelTTFLargeText);
|
||||
|
||||
LabelTTFLargeText();
|
||||
|
||||
virtual std::string title() const override;
|
||||
virtual std::string subtitle() const override;
|
||||
};
|
||||
|
||||
class LabelFontNameTest : public AtlasDemoNew
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
三画
|
||||
三于干亏士工土才寸下大丈与万上小口巾山千乞川亿个勺久凡及夕丸么广
|
||||
亡门义之尸弓己已子卫也女飞刃习叉马乡
|
||||
|
||||
四画
|
||||
丰王井开夫天无元专云扎艺木五支厅不太犬区历尤友匹车巨牙屯比互切瓦
|
||||
止少日中冈贝内水见午牛手毛气升长仁什片仆化仇币仍仅斤爪反介父从今
|
||||
凶分乏公仓月氏勿欠风丹匀乌凤勾文六方火为斗忆订计户认心尺引丑巴孔
|
||||
队办以允予劝双书幻
|
||||
|
||||
五画
|
||||
玉刊示末未击打巧正扑扒功扔去甘世古节本术可丙左厉右石布龙平灭轧东
|
||||
卡北占业旧帅归且旦目叶甲申叮电号田由史只央兄叼叫另叨叹四生失禾丘
|
||||
付仗代仙们仪白仔他斥瓜乎丛令用甩印乐句匆册犯外处冬鸟务包饥主市立
|
||||
闪兰半汁汇头汉宁穴它讨写让礼训必议讯记永司尼民出辽奶奴加召皮边发
|
||||
孕圣对台矛纠母幼丝
|
||||
|
||||
六画
|
||||
式刑动扛寺吉扣考托老执巩圾扩扫地扬场耳共芒亚芝朽朴机权过臣再协西
|
||||
压厌在有百存而页匠夸夺灰达列死成夹轨邪划迈毕至此贞师尘尖劣光当早
|
||||
吐吓虫曲团同吊吃因吸吗屿帆岁回岂刚则肉网年朱先丢舌竹迁乔伟传乒乓
|
||||
休伍伏优伐延件任伤价份华仰仿伙伪自血向似后行舟全会杀合兆企众爷伞
|
||||
创肌朵杂危旬旨负各名多争色壮冲冰庄庆亦刘齐交次衣产决充妄闭问闯羊
|
||||
并关米灯州汗污江池汤忙兴宇守宅字安讲军许论农讽设访寻那迅尽导异孙
|
||||
阵阳收阶阴防奸如妇好她妈戏羽观欢买红纤级约纪驰巡
|
||||
|
||||
七画
|
||||
寿弄麦形进戒吞远违运扶抚坛技坏扰拒找批扯址走抄坝贡攻赤折抓扮抢孝
|
||||
均抛投坟抗坑坊抖护壳志扭块声把报却劫芽花芹芬苍芳严芦劳克苏杆杠杜
|
||||
材村杏极李杨求更束豆两丽医辰励否还歼来连步坚旱盯呈时吴助县里呆园
|
||||
旷围呀吨足邮男困吵串员听吩吹呜吧吼别岗帐财针钉告我乱利秃秀私每兵
|
||||
估体何但伸作伯伶佣低你住位伴身皂佛近彻役返余希坐谷妥含邻岔肝肚肠
|
||||
龟免狂犹角删条卵岛迎饭饮系言冻状亩况床库疗应冷这序辛弃冶忘闲间闷
|
||||
判灶灿弟汪沙汽沃泛沟没沈沉怀忧快完宋宏牢究穷灾良证启评补初社识诉
|
||||
诊词译君灵即层尿尾迟局改张忌际陆阿陈阻附妙妖妨努忍劲鸡驱纯纱纳纲
|
||||
驳纵纷纸纹纺驴纽
|
||||
|
||||
八画
|
||||
奉玩环武青责现表规抹拢拔拣担坦押抽拐拖拍者顶拆拥抵拘势抱垃拉拦拌
|
||||
幸招坡披拨择抬其取苦若茂苹苗英范直茄茎茅林枝杯柜析板松枪构杰述枕
|
||||
丧或画卧事刺枣雨卖矿码厕奔奇奋态欧垄妻轰顷转斩轮软到非叔肯齿些虎
|
||||
虏肾贤尚旺具果味昆国昌畅明易昂典固忠咐呼鸣咏呢岸岩帖罗帜岭凯败贩
|
||||
购图钓制知垂牧物乖刮秆和季委佳侍供使例版侄侦侧凭侨佩货依的迫质欣
|
||||
征往爬彼径所舍金命斧爸采受乳贪念贫肤肺肢肿胀朋股肥服胁周昏鱼兔狐
|
||||
忽狗备饰饱饲变京享店夜庙府底剂郊废净盲放刻育闸闹郑券卷单炒炊炕炎
|
||||
炉沫浅法泄河沾泪油泊沿泡注泻泳泥沸波泼泽治怖性怕怜怪学宝宗定宜审
|
||||
宙官空帘实试郎诗肩房诚衬衫视话诞询该详建肃录隶居届刷屈弦承孟孤陕
|
||||
降限妹姑姐姓始驾参艰线练组细驶织终驻驼绍经贯
|
||||
|
||||
九画
|
||||
奏春帮珍玻毒型挂封持项垮挎城挠政赴赵挡挺括拴拾挑指垫挣挤拼挖按挥
|
||||
挪某甚革荐巷带草茧茶荒茫荡荣故胡南药标枯柄栋相查柏柳柱柿栏树要咸
|
||||
威歪研砖厘厚砌砍面耐耍牵残殃轻鸦皆背战点临览竖省削尝是盼眨哄显哑
|
||||
冒映星昨畏趴胃贵界虹虾蚁思蚂虽品咽骂哗咱响哈咬咳哪炭峡罚贱贴骨钞
|
||||
钟钢钥钩卸缸拜看矩怎牲选适秒香种秋科重复竿段便俩贷顺修保促侮俭俗
|
||||
俘信皇泉鬼侵追俊盾待律很须叙剑逃食盆胆胜胞胖脉勉狭狮独狡狱狠贸怨
|
||||
急饶蚀饺饼弯将奖哀亭亮度迹庭疮疯疫疤姿亲音帝施闻阀阁差养美姜叛送
|
||||
类迷前首逆总炼炸炮烂剃洁洪洒浇浊洞测洗活派洽染济洋洲浑浓津恒恢恰
|
||||
恼恨举觉宣室宫宪突穿窃客冠语扁袄祖神祝误诱说诵垦退既屋昼费陡眉孩
|
||||
除险院娃姥姨姻娇怒架贺盈勇怠柔垒绑绒结绕骄绘给络骆绝绞统
|
Binary file not shown.
Loading…
Reference in New Issue