Commit 55218c95 authored by Chen Jiping's avatar Chen Jiping

替换lesson背景为图形

parent 74603626
...@@ -690,10 +690,10 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -690,10 +690,10 @@ export class PlayComponent implements OnInit, OnDestroy {
this.renderArr.push(pic1); this.renderArr.push(pic1);
this.top_bg = pic1; this.top_bg = pic1;
const lesson_bg = new MySprite(); const lesson_bg = new ShapeRectNew();
lesson_bg.init(this.images.get('lesson_bg')); lesson_bg.fillColor = "#975833";
lesson_bg.x = lesson_bg.width/2 + 70; lesson_bg.x = 70;
lesson_bg.y = 11 + lesson_bg.height/2; lesson_bg.y = 11;
this.renderArr.push(lesson_bg); this.renderArr.push(lesson_bg);
this.lesson_bg = lesson_bg; this.lesson_bg = lesson_bg;
...@@ -715,6 +715,16 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -715,6 +715,16 @@ export class PlayComponent implements OnInit, OnDestroy {
lesson_bg.addChild(lesson); lesson_bg.addChild(lesson);
if(lesson.width + 48 < 190){
lesson_bg.setSize(190, 48, 24);
}
else{
lesson_bg.setSize(lesson.width + 48, 48, 24);
}
//重新设置lesson的坐标
lesson.x = lesson_bg.width/2;
lesson.y = lesson_bg.height/2;
const title_bg = new ShapeRectNew(); const title_bg = new ShapeRectNew();
title_bg.y = -24; title_bg.y = -24;
title_bg.fillColor = "#975833"; title_bg.fillColor = "#975833";
......
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