future před 1 rokem
rodič
revize
c7dce3af50

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 242 - 77
assets/edit_game.scene


+ 12 - 0
assets/resources/prefab/ui/count_down.prefab

@@ -956,6 +956,18 @@
     "lab_time": {
       "__id__": 35
     },
+    "sf_ProgressBar_Bg_default": {
+      "__uuid__": "9fd900dd-221b-4f89-8f2c-fba34243c835@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "sf_ProgressBar_Bar_default": {
+      "__uuid__": "24a704da-2867-446d-8d1a-5e920c75e09d@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "sf_img_text_default": {
+      "__uuid__": "57520716-48c8-4a19-8acf-41c9f8777fb0@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
     "_id": ""
   },
   {

+ 1 - 1
assets/script/config.ts

@@ -5,7 +5,7 @@ const { ccclass, property } = _decorator;
 export class config {
     static debug = true;
     static domain = "https://zcapi.xwrun.com";
-    static is_MAC_edit = true; //目前临时处理
+    static is_MAC_edit = false; //目前临时处理
     static select_res_and_control_type = {
         RES_TYPE:0,
         CONTROL_TYPE:1,

+ 1 - 0
assets/script/edit/event/select_widget_list.ts

@@ -15,6 +15,7 @@ export class select_widget_list extends Component {
             const element = list[index];
             let item = instantiate(this.item_prefab)
             item.parent = this.content;
+            item.getComponent(widget_item).initHideDragOtherList()
             item.getComponent(widget_item).initView(element,this.onItemClick.bind(this),cur_select_id)
         }
         this.btn_close.on(Node.EventType.TOUCH_END,()=>{

+ 1 - 1
assets/script/edit/show_widget_list.ts

@@ -19,7 +19,7 @@ export class show_widget_list extends Component {
             const element = list[index];
             let item = instantiate(this.item_prefab)
             item.parent = this.content;
-            item.getComponent(widget_item).initIsShowWidgetList()
+            item.getComponent(widget_item).initHideDragOtherList()
             item.getComponent(widget_item).initView(element,this.onItemClick.bind(this),null)
         }
         this.btn_close.on(Node.EventType.TOUCH_END,()=>{

+ 14 - 1
assets/script/edit/uiWidget/count_down.ts

@@ -1,4 +1,4 @@
-import { _decorator, Component, Label, Node } from 'cc';
+import { _decorator, Component, Label, Node, Sprite, SpriteFrame } from 'cc';
 import { att_count_down } from '../../../data/data';
 import { view_ui_att_item } from './view_ui_att_item';
 const { ccclass, property } = _decorator;
@@ -10,6 +10,9 @@ export class count_down extends Component {
     @property(Node) ProgressBar_Bar:Node = null;
     @property(Node) img_text:Node = null;
     @property(Node) lab_time:Node = null;
+    @property(SpriteFrame) sf_ProgressBar_Bg_default:SpriteFrame = null;
+    @property(SpriteFrame) sf_ProgressBar_Bar_default:SpriteFrame = null;
+    @property(SpriteFrame) sf_img_text_default:SpriteFrame = null;
     public initView(data:att_count_down){
         this.m_data = data;
         this.updateView(this.m_data)
@@ -25,6 +28,16 @@ export class count_down extends Component {
 
         this.img_text.getComponent(view_ui_att_item).updateAtt(this.m_data.img_text)
         this.m_data.img_text = this.img_text.getComponent(view_ui_att_item).getData()
+
+        if(this.m_data.ProgressBar_Bar.res.length==0||this.m_data.ProgressBar_Bar.res_name.length==0) {
+            this.ProgressBar_Bar.getComponent(view_ui_att_item).getComponent(Sprite).spriteFrame = this.sf_ProgressBar_Bar_default
+        }
+        if(this.m_data.ProgressBar_Bg.res.length==0||this.m_data.ProgressBar_Bg.res_name.length==0) {
+            this.ProgressBar_Bg.getComponent(view_ui_att_item).getComponent(Sprite).spriteFrame = this.sf_ProgressBar_Bg_default
+        }
+        if(this.m_data.img_text.res.length==0||this.m_data.img_text.res_name.length==0) {
+            this.img_text.getComponent(view_ui_att_item).getComponent(Sprite).spriteFrame = this.sf_img_text_default
+        }
         
         if(this.m_data.time_count>0){
             this.lab_time.getComponent(Label).string = `${this.m_data.time_count}秒`

+ 12 - 1
assets/script/edit/uiWidget/receive_res_item.ts

@@ -9,7 +9,7 @@ const { ccclass, property } = _decorator;
 
 @ccclass('receive_res_item')
 export class receive_res_item extends Component {
-
+    @property(Node) btn_clear_res:Node = null;
     private m_data:ui_att_item = null;
 
     private widget_type = config.attributes_list_type.top;
@@ -26,10 +26,21 @@ export class receive_res_item extends Component {
 
     start() {
         ClientEvent.on(config.Event.DragResEndOnCheck,this.DragResEndOnCheck,this)
+
+        this.btn_clear_res.on(Node.EventType.TOUCH_END, ()=>{
+            this.m_data.res = '';
+            this.m_data.res_name = '';
+            let lab =  this.getLabel()
+            if(lab!=null){
+                lab.getComponent(Label).string = "无"
+            }
+            ClientEvent.dispatchEvent(config.Event.UpdateAttributesToView,Attributes.Singleton.get_cur_att_data(),this.widget_type)
+        })
     }
 
     protected onDestroy(): void {
         ClientEvent.off(config.Event.DragResEndOnCheck,this.DragResEndOnCheck,this)
+        this.unscheduleAllCallbacks()
     }
 
     public getRect(){

+ 4 - 4
assets/script/edit/widget_item.ts

@@ -39,10 +39,10 @@ export class widget_item extends Component {
     private m_count_down:Node = null;
     private x_len:number = 0;
     private y_len:number = 0;
-    private m_isShowWidgetList:boolean = false;
-    public initIsShowWidgetList() {
+    private m_isShowDragOtherList:boolean = false;
+    public initHideDragOtherList() {
         // 点击->控件列表,不显示拖拽其他按钮
-        this.m_isShowWidgetList = true
+        this.m_isShowDragOtherList = true
     }
     public initView(data:widget_item_data,call=null,cur_select_id:number=-1){
         this.m_data = data;
@@ -201,7 +201,7 @@ export class widget_item extends Component {
                 this.m_att.drag_data = new att_drag_data;
             }
             this.drag.active = true;
-            if(this.m_isShowWidgetList == false) {
+            if(this.m_isShowDragOtherList == false) {
                 this.initDrag()
             }
         }else if(this.m_data.type===config.Widget_Type_List.SLIDE_TYPE){

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů