future há 1 ano atrás
pai
commit
21f26001dd

+ 7 - 7
assets/resources/prefab/select_res_list_item.prefab

@@ -96,7 +96,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 32.5,
+      "y": 37.5,
       "z": 0
     },
     "_lrot": {
@@ -212,7 +212,7 @@
     "_left": 0,
     "_right": 0,
     "_top": 0,
-    "_bottom": 65,
+    "_bottom": 75,
     "_horizontalCenter": 0,
     "_verticalCenter": 0,
     "_isAbsLeft": true,
@@ -312,7 +312,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 200,
-      "height": 55
+      "height": 70
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -386,8 +386,8 @@
     "_target": null,
     "_left": 0,
     "_right": 0,
-    "_top": 210,
-    "_bottom": 0,
+    "_top": 207.5,
+    "_bottom": -2.5,
     "_horizontalCenter": 0,
     "_verticalCenter": 0,
     "_isAbsLeft": true,
@@ -434,7 +434,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 200,
-      "height": 265
+      "height": 275
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -470,7 +470,7 @@
       "a": 255
     },
     "_spriteFrame": {
-      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
+      "__uuid__": "b730527c-3233-41c2-aaf7-7cdab58f9749@f9941",
       "__expectedType__": "cc.SpriteFrame"
     },
     "_type": 1,

Diff do ficheiro suprimidas por serem muito extensas
+ 1040 - 41
assets/resources/prefab/ui/edit_event_view.prefab


+ 43 - 13
assets/script/edit/event/edit_event_view.ts

@@ -18,18 +18,28 @@ export class edit_event_view extends Component {
     @property(Node) type_content:Node = null;
     @property(Node) type_btn:Node = null;
     @property(Node) search_node:Node = null;
-    @property(Node) search_editbox:Node = null;
-    @property(Node) search_btn_search:Node = null;
+    @property(Node) search_id_editbox:Node = null;
+    @property(Node) search_id_btn:Node = null;
+    @property(Node) search_content_editbox:Node = null;
+    @property(Node) search_content_btn:Node = null;
     private m_cur_select_type:number = -1;
     private m_search_item_list:event_item[] = []
     protected start(): void {
-        this.search_btn_search.on(Node.EventType.TOUCH_END, ()=> {
-            let id_string = tools.trimLeftAndRightblank(this.search_editbox.getComponent(EditBox).string)
-            this.search_editbox.getComponent(EditBox).string = id_string
-            if(id_string.length<0) {
+        this.search_id_btn.on(Node.EventType.TOUCH_END, ()=> {
+            let id_string = tools.trimLeftAndRightblank(this.search_id_editbox.getComponent(EditBox).string)
+            this.search_id_editbox.getComponent(EditBox).string = id_string
+            if(id_string.length<=0) {
                 return tools.showToast('请输入id')
             }
-            this.searchAction(id_string)
+            this.searchAction(id_string,true)
+        },this)
+        this.search_content_btn.on(Node.EventType.TOUCH_END, ()=> {
+            let content_string = tools.trimLeftAndRightblank(this.search_content_editbox.getComponent(EditBox).string)
+            this.search_content_editbox.getComponent(EditBox).string = content_string
+            if(content_string.length<=0) {
+                return tools.showToast('请输入内容')
+            }
+            this.searchAction(content_string,false)
         },this)
     }
     public show(){
@@ -123,12 +133,32 @@ export class edit_event_view extends Component {
         }
     }
 
-    searchAction(idString:string) {
-        // console.log('idString=',idString)
-        tools.showToast('暂未开放'+'搜索id:'+idString)
-        // this.m_search_item_list.splice(0, this.m_search_item_list.length)
-        // this.searchData(parseInt(idString))
-        // this.searchCreateItem()
+    searchAction(string:string, isSearchID:boolean) {
+        // console.log('string=',string)
+        tools.showToast('暂未开放 暂未开放 暂未开放')
+        return
+        this.m_search_item_list.splice(0, this.m_search_item_list.length)
+        if(isSearchID) {
+            this.searchData(parseInt(string))
+        } else {
+            let check_yes = false
+            let list = Attributes.Singleton.getEventList()
+            for(let i=0; i<list.length; i++) {
+                const element = list[i]
+                if(element.event_name.indexOf(string)!=-1) {
+                    if(element.event_id!=0) {
+                        this.searchData(element.event_id)
+                        check_yes = true
+                    }
+                    break
+                }
+            }
+            if(check_yes==false) {
+                tools.showToast('搜索的内容不存在')
+            }
+        }
+
+        this.searchCreateItem()
     }
 
     private searchData(id:number) {

+ 1 - 1
assets/script/select_res_list_item.ts

@@ -36,7 +36,7 @@ export class select_res_list_item extends Component {
     }
 
     public unSelectStatus(){
-        this.node.getComponent(Sprite).color = Color.GRAY
+        this.node.getComponent(Sprite).color = Color.WHITE
     }
     public getData(){
         return this.m_data;

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff