|
@@ -1,4 +1,4 @@
|
|
|
-import { _decorator, Component, Director, director, EditBox, Label, Node, Sprite, SpriteFrame, UITransform } from 'cc';
|
|
|
+import { _decorator, Component, Director, director, EditBox, Label, Node, ScrollView, Sprite, SpriteFrame, UITransform } from 'cc';
|
|
|
import { tools } from '../../tools';
|
|
|
import { ani_frame, bag_item_data } from '../../../data/data';
|
|
|
import { Attributes } from '../Attributes';
|
|
@@ -8,6 +8,7 @@ const { ccclass, property } = _decorator;
|
|
|
|
|
|
@ccclass('new_frame')
|
|
|
export class new_frame extends Component {
|
|
|
+ @property(Node) scrollView:Node = null;
|
|
|
@property(Node) btn_sure:Node = null;
|
|
|
@property(Node) btn_cancle:Node = null;
|
|
|
|
|
@@ -128,6 +129,7 @@ export class new_frame extends Component {
|
|
|
}
|
|
|
|
|
|
public show(up_frame:ani_frame=null){
|
|
|
+ this.scrollView.getComponent(ScrollView).scrollToTop()
|
|
|
this.edit_status = false;
|
|
|
this.m_up_frame = up_frame;
|
|
|
this.node.active = true;
|
|
@@ -170,6 +172,7 @@ export class new_frame extends Component {
|
|
|
}
|
|
|
|
|
|
public show_edit(item:frame_item,up_frame:ani_frame=null){
|
|
|
+ this.scrollView.getComponent(ScrollView).scrollToTop()
|
|
|
this.m_up_frame = up_frame;
|
|
|
this.node.active = true;
|
|
|
this.m_data = item.getData();
|