|
@@ -1,12 +1,18 @@
|
|
|
-import { _decorator, Component, Label, Node } from 'cc';
|
|
|
+import { _decorator, Component, Label, Node, Vec3 } from 'cc';
|
|
|
import { gameManager } from '../gameManager';
|
|
|
+import { SdkUtil } from '../../sdkUtil';
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
@ccclass('back_title')
|
|
|
export class back_title extends Component {
|
|
|
@property(Node) btn_back:Node = null;
|
|
|
+ @property(Node) img_title_bg:Node = null;
|
|
|
@property(Node) img_title:Node = null;
|
|
|
+ private img_title_bg_original_point:Vec3 = new Vec3(0,0,0)
|
|
|
private mCallBack = null;
|
|
|
+ protected start(): void {
|
|
|
+ this.img_title_bg_original_point = this.img_title_bg.getPosition()
|
|
|
+ }
|
|
|
public initView(title:string,call_back){
|
|
|
this.mCallBack = call_back;
|
|
|
this.updateTitle(title)
|
|
@@ -26,6 +32,11 @@ export class back_title extends Component {
|
|
|
this.img_title.parent.active = true;
|
|
|
}
|
|
|
this.img_title.getComponent(Label).string = title;
|
|
|
+
|
|
|
+ if(SdkUtil.iPhoneIsLingdongdao()) {
|
|
|
+ let p = new Vec3(this.img_title_bg_original_point.x, this.img_title_bg_original_point.y - 60, this.img_title_bg_original_point.z)
|
|
|
+ this.img_title_bg.setPosition(p)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|