future hace 1 año
padre
commit
168bb12d59

+ 22 - 22
assets/edit_game.scene

@@ -116,8 +116,8 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 960.0000000000001,
-      "y": 960.0000000000002,
+      "x": 960,
+      "y": 960,
       "z": 0
     },
     "_lrot": {
@@ -206,8 +206,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 1920.0000000000002,
-      "height": 1920.0000000000002
+      "width": 1920,
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -344,7 +344,7 @@
     "_priority": 0,
     "_fov": 45,
     "_fovAxis": 0,
-    "_orthoHeight": 960.0000000000001,
+    "_orthoHeight": 993.2846715328468,
     "_near": 0,
     "_far": 1000,
     "_color": {
@@ -533,8 +533,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 840.0000000000001,
-      "height": 1920.0000000000002
+      "width": 840,
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -7333,7 +7333,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -510.0000000000001,
+      "y": -510,
       "z": 0
     },
     "_lrot": {
@@ -7390,7 +7390,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 420.00000000000006,
+      "x": 420,
       "y": 0,
       "z": 0
     },
@@ -7790,7 +7790,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 800.0000000000001,
+      "width": 800,
       "height": 860
     },
     "_anchorPoint": {
@@ -7908,7 +7908,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -285.00000000000006,
+      "x": -285,
       "y": -105,
       "z": 0
     },
@@ -8191,7 +8191,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 800.0000000000001,
+      "width": 800,
       "height": 210
     },
     "_anchorPoint": {
@@ -8275,7 +8275,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 840.0000000000001,
+      "width": 840,
       "height": 900
     },
     "_anchorPoint": {
@@ -16616,8 +16616,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 840.0000000000001,
-      "height": 1920.0000000000002
+      "width": 840,
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -18508,7 +18508,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 750.133,
+      "x": 750.1330000000002,
       "y": 0,
       "z": 0
     },
@@ -173254,8 +173254,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 419.9999999999999,
-      "height": 1870.0000000000002
+      "width": 419.9999999999998,
+      "height": 1870
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -173479,8 +173479,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 419.9999999999999,
-      "height": 1920.0000000000002
+      "width": 419.9999999999998,
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -176100,8 +176100,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 1920.0000000000002,
-      "height": 1920.0000000000002
+      "width": 1920,
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 5 - 4
assets/script/edit/animation/new_frame.ts

@@ -81,9 +81,10 @@ export class new_frame extends Component {
             if(this.m_data.url_name.length == 0 || this.m_data.url_name =='空') {
                 return tools.showToast('资源是空的')
             }
+
             let res_sf = control.res_map.get(this.m_data.url_name)
-            this.m_data.size_width = res_sf.width
-            this.m_data.size_height = res_sf.height
+            this.m_data.size_width = res_sf.originalSize.width
+            this.m_data.size_height = res_sf.originalSize.height
             this.size_width.getComponent(EditBox).string = this.m_data.size_width.toString()
             this.size_height.getComponent(EditBox).string = this.m_data.size_height.toString()
             this.setupSprContentSize()
@@ -97,8 +98,8 @@ export class new_frame extends Component {
 
                 let res_sf = control.res_map.get(this.m_data.url_name)
                 this.hide_spr.getComponent(Sprite).spriteFrame = res_sf
-                this.m_data.size_width = res_sf.width
-                this.m_data.size_height = res_sf.height
+                this.m_data.size_width = res_sf.originalSize.width
+                this.m_data.size_height = res_sf.originalSize.height
                 this.size_width.getComponent(EditBox).string = this.m_data.size_width.toString()
                 this.size_height.getComponent(EditBox).string = this.m_data.size_height.toString()
                 this.setupInitAnchorPointXY()

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

@@ -355,8 +355,8 @@ export class widget_item extends Component {
                     break;
                 case config.attributes_list_type.rotation:
                     this.m_att.rotation = data.rotation;
-                    this.node.angle = data.rotation;
-                    break
+                    this.spr.angle = data.rotation;
+                    break;
                 case config.attributes_list_type.url:
                     this.m_att.src = data.src
                     this.m_att.src_name = data.src_name
@@ -548,7 +548,7 @@ export class widget_item extends Component {
         if(this.call_back==null){
             this.node.position =  new Vec3(this.m_att.x,this.m_att.y)
             this.node.getComponent(UITransform).setContentSize(new Size( this.m_att.width,this.m_att.height))
-            this.node.angle = this.m_att.rotation
+            this.spr.angle = this.m_att.rotation
             if(this.m_att.drag_data!=null){
                 this.drag.position =  new Vec3(this.m_att.drag_data.drag_pos_x,this.m_att.drag_data.drag_pos_y)
                 this.drag.getComponent(UITransform).setContentSize(new Size(this.m_att.drag_data.drag_size_width ,this.m_att.drag_data.drag_size_height ))