|
@@ -1,4 +1,4 @@
|
|
|
-import { _decorator, Component, instantiate, Node, Prefab, Rect, Size, Sprite, UITransform, Vec2, Vec3 } from 'cc';
|
|
|
+import { _decorator, Component, instantiate, Node, Prefab, Rect, ScrollView, Size, Sprite, UITransform, Vec2, Vec3 } from 'cc';
|
|
|
import { dai_dao_ju_item, event_item, guo_ju_qing_dai_dao_ju, widget_item_data } from '../../../data/data';
|
|
|
import { widget_base } from '../widget/widget_base';
|
|
|
import { gameManager } from '../gameManager';
|
|
@@ -23,6 +23,7 @@ export class dai_dao_ju_bag extends Component {
|
|
|
private cur_select_item:bag_drag_item = null;
|
|
|
private mWidgetList:Map<number,bag_drag_item> = new Map;
|
|
|
private mData:guo_ju_qing_dai_dao_ju = null;
|
|
|
+ private mScrollView:Node = null;
|
|
|
public initView(data:guo_ju_qing_dai_dao_ju,tip_call,add_time_call){
|
|
|
this.content.removeAllChildren()
|
|
|
this.mWidgetList.clear()
|
|
@@ -88,6 +89,14 @@ export class dai_dao_ju_bag extends Component {
|
|
|
this.widget_info.show(this.cur_select_item.getData().info_res)
|
|
|
}
|
|
|
})
|
|
|
+ this.mScrollView = gameManager.Singleton.getCurSceneLayerPage().getBG()
|
|
|
+ this.action_node.position
|
|
|
+ }
|
|
|
+
|
|
|
+ protected update(dt: number): void {
|
|
|
+ if(this.mScrollView!=null){
|
|
|
+ this.action_node.position = this.mScrollView.position;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|