update
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import {_decorator, Component, Node, instantiate, Label, Sprite} from 'cc';
|
||||
import {_decorator, Component, Node, instantiate, Label, Sprite, UITransform} from 'cc';
|
||||
import li_BaseView from "db://assets/Scripts/Main/Common/li_BaseView";
|
||||
import Utils from "db://assets/Scripts/Main/Common/Utils";
|
||||
import {GirlListItem} from "db://assets/Scripts/test/girlListPanel/GirlListItem";
|
||||
import {characters, themes} from "db://assets/Scripts/Main/Config/cfg/characters";
|
||||
import { GirlsData, themes} from "db://assets/Scripts/Main/Config/cfg/characters";
|
||||
import {GButton} from "db://assets/Scripts/Main/Common/GButton";
|
||||
import {DemoManager} from "db://assets/Scripts/test/DemoManager";
|
||||
import {ThemeItem} from "db://assets/Scripts/test/girlListPanel/ThemeItem";
|
||||
import ResManager from "db://assets/Scripts/Main/Manager/ResManager";
|
||||
|
||||
const {ccclass, property} = _decorator;
|
||||
|
||||
@@ -58,8 +59,16 @@ export class ThemePanel extends li_BaseView {
|
||||
this.cache.push(item);
|
||||
this.content.addChild(newNode);
|
||||
}
|
||||
}
|
||||
|
||||
const rectInfo = GirlsData[0];
|
||||
this.recId = rectInfo.id;
|
||||
this.recName.string = rectInfo.name;
|
||||
ResManager.I.changeBundleSpriteFrame(this.recSprite,rectInfo.pic.url,"Chat18x",()=>{
|
||||
let sizeTran = this.recSprite.node.parent.getComponent(UITransform);
|
||||
Utils.adjustBgPixelRatioToSize(sizeTran.contentSize,this.recSprite.node,2);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private registerListener() {
|
||||
GButton.BandClick(this._nodeTab.settingBtn, this.openSetting, this);
|
||||
@@ -70,7 +79,6 @@ export class ThemePanel extends li_BaseView {
|
||||
|
||||
chatWithRec() {
|
||||
DemoManager.getInstance().EnterChat(this.recId);
|
||||
|
||||
}
|
||||
|
||||
openSetting() {
|
||||
|
||||
Reference in New Issue
Block a user