Commit 8ab26753 authored by Chen Jiping's avatar Chen Jiping

fix:调整卡片大小

parent 6a35ea4d
...@@ -85,8 +85,8 @@ export class Exercises { ...@@ -85,8 +85,8 @@ export class Exercises {
} }
let width = 1101 * scaleX - 20 * scaleX; let width = 1021 * scaleX;
let height = 479 * scaleY - 20 * scaleY; let height = 399 * scaleY;
const cardBg = new MySprite(); const cardBg = new MySprite();
cardBg.init(this.images.get('box')); cardBg.init(this.images.get('box'));
...@@ -243,7 +243,7 @@ export class Exercises { ...@@ -243,7 +243,7 @@ export class Exercises {
totalWidth = text.getBoundingBox().width; totalWidth = text.getBoundingBox().width;
bg.addChild(text); bg.addChild(text);
text.setMaxSize(bg.width - 96 * this.scaleX); text.setMaxSize(bg.width - 110 * this.scaleX);
this.textLabel = text; this.textLabel = text;
...@@ -331,8 +331,9 @@ export class Exercises { ...@@ -331,8 +331,9 @@ export class Exercises {
index.fontName = "TCB"; index.fontName = "TCB";
index.fontColor = '#ec6101'; index.fontColor = '#ec6101';
index.setMaxSize(45 * scaleX); index.setMaxSize(45 * scaleX);
index.x = - index.width / 2; index.x = indexBg.x - index.width / 2;
indexBg.addChild(index); index.y = height / 2;
bg.addChild(index);
//内容 //内容
this.addText(bg, this.skin); this.addText(bg, this.skin);
...@@ -505,7 +506,7 @@ export class Exercises { ...@@ -505,7 +506,7 @@ export class Exercises {
} }
contentPic.x = width / 2; contentPic.x = width / 2;
contentPic.y = 60 * this.scaleY + maxHeight / 2; contentPic.y = 39 * this.scaleY + maxHeight / 2;
contentBg.addChild(contentPic); contentBg.addChild(contentPic);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment