|
@@ -9,7 +9,6 @@ import { tools } from '../tools';
|
|
|
import { Text_Sound } from './uiWidget/Text_Sound';
|
|
|
import { question_select } from './uiWidget/question_select';
|
|
|
import { count_down } from './uiWidget/count_down';
|
|
|
-import { Attributes } from './Attributes';
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
@ccclass('widget_item')
|
|
@@ -125,6 +124,7 @@ export class widget_item extends Component {
|
|
|
if(this.m_att.drag_data.other_drag_list==undefined){
|
|
|
this.m_att.drag_data.other_drag_list = []
|
|
|
}
|
|
|
+ // 刷新 其他拖拽
|
|
|
this.other_drag_content.removeAllChildren()
|
|
|
for (let index = 0; index < this.m_att.drag_data.other_drag_list.length; index++) {
|
|
|
const element:att_drag_data = this.m_att.drag_data.other_drag_list[index];
|
|
@@ -132,6 +132,10 @@ export class widget_item extends Component {
|
|
|
item.off(Node.EventType.TOUCH_MOVE)
|
|
|
item.parent = this.other_drag_content;
|
|
|
item.position = new Vec3(element.drag_pos_x,element.drag_pos_y)
|
|
|
+ if(element.z_index==undefined) {
|
|
|
+ element.z_index=0
|
|
|
+ }
|
|
|
+ item.setSiblingIndex(element.z_index)
|
|
|
item.getComponent(UITransform).setContentSize(new Size(element.drag_size_width,element.drag_size_height))
|
|
|
item.on(Node.EventType.TOUCH_MOVE,(et:EventTouch)=>{
|
|
|
let p = new Vec3(et.getUILocation().x,et.getUILocation().y)
|
|
@@ -425,6 +429,7 @@ export class widget_item extends Component {
|
|
|
if(this.m_att.drag_data.other_drag_list==undefined){
|
|
|
this.m_att.drag_data.other_drag_list = []
|
|
|
}
|
|
|
+ // 更新 其他拖拽
|
|
|
this.other_drag_content.removeAllChildren()
|
|
|
for (let index = 0; index < this.m_att.drag_data.other_drag_list.length; index++) {
|
|
|
const element = this.m_att.drag_data.other_drag_list[index];
|
|
@@ -433,6 +438,8 @@ export class widget_item extends Component {
|
|
|
item.parent = this.other_drag_content;
|
|
|
item.position = new Vec3(element.drag_pos_x,element.drag_pos_y)
|
|
|
item.getComponent(UITransform).setContentSize(new Size(element.drag_size_width,element.drag_size_height))
|
|
|
+ if(element.z_index==undefined) { element.z_index=0 }
|
|
|
+ item.setSiblingIndex(element.z_index)
|
|
|
item.on(Node.EventType.TOUCH_MOVE,(et:EventTouch)=>{
|
|
|
let p = new Vec3(et.getUILocation().x,et.getUILocation().y)
|
|
|
let n_p = this.node.getComponent(UITransform).convertToNodeSpaceAR(p)
|