|
@@ -1,4 +1,4 @@
|
|
|
-import { _decorator, Component, instantiate, Label, Layers, Layout, Node, Prefab, ScrollView, UITransform, Vec2, Vec3 } from 'cc';
|
|
|
+import { _decorator, Component, instantiate, Label, Layers, Layout, Node, Prefab, ScrollView, Tween, tween, UITransform, Vec2, Vec3 } from 'cc';
|
|
|
import { tools } from '../../tools';
|
|
|
import { edit_scene } from '../edit_scene';
|
|
|
import { ClientEvent } from '../../clientEvent';
|
|
@@ -313,6 +313,9 @@ export class scene_task extends Component {
|
|
|
if(event_content_top<0) { event_content_top = Math.abs(event_content_top) }
|
|
|
event_content_top = event_content_top + rect.height + 100
|
|
|
|
|
|
+ let item_height:number = 200
|
|
|
+ let item_spacing_y:number = 20
|
|
|
+
|
|
|
let task_data = this.getTaskData()
|
|
|
let data_list = task_data.event_list
|
|
|
let check_yes = false
|
|
@@ -330,7 +333,7 @@ export class scene_task extends Component {
|
|
|
if(check_yes) {
|
|
|
let c_index = (data_list.length-1)-index
|
|
|
let c_row = Math.round(c_index / 2)
|
|
|
- let c_spacing_y = c_row * 20
|
|
|
+ let c_spacing_y = c_row * item_spacing_y
|
|
|
var is_row_count = 1
|
|
|
var is_jishu:boolean = true //是否是奇数
|
|
|
if(data_list.length%2==0) {
|
|
@@ -339,10 +342,22 @@ export class scene_task extends Component {
|
|
|
if(is_jishu==false&&index%2==0) {
|
|
|
is_row_count = 2
|
|
|
}
|
|
|
- let c_item_height = (c_row - is_row_count) * 200
|
|
|
+ let c_item_height = (c_row - is_row_count) * item_height
|
|
|
let c_offset_y = c_spacing_y + c_item_height + event_content_top
|
|
|
this.node.getComponent(ScrollView).scrollToOffset(new Vec2(0, c_offset_y))
|
|
|
this.search_node.getComponent(Search).showTip(element)
|
|
|
+
|
|
|
+ let c_node = this.event_content.children[index].getComponent(event_item_view)
|
|
|
+ if(c_node!=null) {
|
|
|
+ this.scheduleOnce(()=>{
|
|
|
+ c_node.node.setScale(1.2,1.2)
|
|
|
+ c_node.selectBgColor()
|
|
|
+ tween(c_node).delay(0.35).call(()=>{
|
|
|
+ c_node.node.setScale(1,1)
|
|
|
+ c_node.unselectBgColor()
|
|
|
+ }).start()
|
|
|
+ },0.15)
|
|
|
+ }
|
|
|
break
|
|
|
}
|
|
|
}
|