future 1 năm trước cách đây
mục cha
commit
ca23401af1

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1556 - 11
assets/resources/ui/setting.prefab


+ 63 - 5
assets/script/ui/setting/setting.ts

@@ -1,16 +1,74 @@
-import { _decorator, Component, Node } from 'cc';
+import { _decorator, Component, Node, Toggle } from 'cc';
 import { uiManager } from '../../manager/uiManager';
 import { base_ui } from '../../fw/base_ui';
 const { ccclass, property } = _decorator;
 
 @ccclass('setting')
 export class setting extends base_ui {
-   @property(Node) btn_close:Node = null
-   protected start(): void {
+    @property(Node) btn_close:Node = null
+    @property(Node) yinyue_btn_on:Node = null;
+    @property(Node) yinyue_btn_off:Node = null;
+    @property(Node) shengyin_btn_on:Node = null;
+    @property(Node) shengyin_btn_off:Node = null;
+    @property(Node) zhendong_btn_on:Node = null;
+    @property(Node) zhendong_btn_off:Node = null;
+    protected start(): void {
         this.onButtonListen(this.btn_close,()=>{
             this.close()
-       })
-   }
+        })
+        this.onButtonListen(this.yinyue_btn_on, ()=>{
+            this.updateYinyueStatus(false)
+        })
+        this.onButtonListen(this.yinyue_btn_off, ()=>{
+            this.updateYinyueStatus(true)
+        })
+        this.onButtonListen(this.shengyin_btn_on, ()=>{
+            this.updateShengyinStatus(false)
+        })
+        this.onButtonListen(this.shengyin_btn_off, ()=>{
+            this.updateShengyinStatus(true)
+        })
+        this.onButtonListen(this.zhendong_btn_on, ()=>{
+            this.updateZhendongStatus(false)
+        })
+        this.onButtonListen(this.zhendong_btn_off, ()=>{
+            this.updateZhendongStatus(true)
+        })
+
+        this.updateYinyueStatus(true)
+        this.updateShengyinStatus(true)
+        this.updateZhendongStatus(true)
+    }
+
+    updateYinyueStatus(open:boolean) {
+        if(open) {
+            this.yinyue_btn_on.active = true
+            this.yinyue_btn_off.active = false
+        } else {
+            this.yinyue_btn_on.active = false
+            this.yinyue_btn_off.active = true
+        }
+    }
+
+    updateShengyinStatus(open:boolean) {
+        if(open) {
+            this.shengyin_btn_on.active = true
+            this.shengyin_btn_off.active = false
+        } else {
+            this.shengyin_btn_on.active = false
+            this.shengyin_btn_off.active = true
+        }
+    }
+
+    updateZhendongStatus(open:boolean) {
+        if(open) {
+            this.zhendong_btn_on.active = true
+            this.zhendong_btn_off.active = false
+        } else {
+            this.zhendong_btn_on.active = false
+            this.zhendong_btn_off.active = true
+        }
+    }
 }
 
 

BIN
assets/texture/ui/public/public_popup_bg.png


+ 41 - 41
assets/texture/ui/setting/img_bg.png.meta → assets/texture/ui/public/public_popup_bg.png.meta

@@ -2,7 +2,7 @@
   "ver": "1.0.26",
   "importer": "image",
   "imported": true,
-  "uuid": "35187db7-871c-409c-af6e-cec660642c10",
+  "uuid": "7b364691-940f-440c-b120-b96f250f5c96",
   "files": [
     ".json",
     ".png"
@@ -10,14 +10,14 @@
   "subMetas": {
     "6c48a": {
       "importer": "texture",
-      "uuid": "35187db7-871c-409c-af6e-cec660642c10@6c48a",
-      "displayName": "img_bg",
+      "uuid": "7b364691-940f-440c-b120-b96f250f5c96@6c48a",
+      "displayName": "public_popup_bg",
       "id": "6c48a",
       "name": "texture",
       "userData": {
         "wrapModeS": "clamp-to-edge",
         "wrapModeT": "clamp-to-edge",
-        "imageUuidOrDatabaseUri": "35187db7-871c-409c-af6e-cec660642c10",
+        "imageUuidOrDatabaseUri": "7b364691-940f-440c-b120-b96f250f5c96",
         "isUuid": true,
         "visible": false,
         "minfilter": "linear",
@@ -34,22 +34,22 @@
     },
     "f9941": {
       "importer": "sprite-frame",
-      "uuid": "35187db7-871c-409c-af6e-cec660642c10@f9941",
-      "displayName": "img_bg",
+      "uuid": "7b364691-940f-440c-b120-b96f250f5c96@f9941",
+      "displayName": "public_popup_bg",
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {
         "trimType": "auto",
         "trimThreshold": 1,
         "rotated": false,
-        "offsetX": 4,
-        "offsetY": 0.5,
-        "trimX": 9,
+        "offsetX": 0,
+        "offsetY": 1,
+        "trimX": 0,
         "trimY": 0,
-        "width": 907,
-        "height": 1162,
-        "rawWidth": 917,
-        "rawHeight": 1163,
+        "width": 980,
+        "height": 1462,
+        "rawWidth": 980,
+        "rawHeight": 1464,
         "borderTop": 0,
         "borderBottom": 0,
         "borderLeft": 0,
@@ -61,17 +61,17 @@
         "meshType": 0,
         "vertices": {
           "rawPosition": [
-            -453.5,
-            -581,
+            -490,
+            -731,
             0,
-            453.5,
-            -581,
+            490,
+            -731,
             0,
-            -453.5,
-            581,
+            -490,
+            731,
             0,
-            453.5,
-            581,
+            490,
+            731,
             0
           ],
           "indexes": [
@@ -83,38 +83,38 @@
             3
           ],
           "uv": [
-            9,
-            1163,
-            916,
-            1163,
-            9,
-            1,
-            916,
-            1
+            0,
+            1464,
+            980,
+            1464,
+            0,
+            2,
+            980,
+            2
           ],
           "nuv": [
-            0.009814612868047983,
-            0.0008598452278589854,
-            0.9989094874591058,
-            0.0008598452278589854,
-            0.009814612868047983,
+            0,
+            0.001366120218579235,
+            1,
+            0.001366120218579235,
+            0,
+            1,
             1,
-            0.9989094874591058,
             1
           ],
           "minPos": [
-            -453.5,
-            -581,
+            -490,
+            -731,
             0
           ],
           "maxPos": [
-            453.5,
-            581,
+            490,
+            731,
             0
           ]
         },
         "isUuid": true,
-        "imageUuidOrDatabaseUri": "35187db7-871c-409c-af6e-cec660642c10@6c48a",
+        "imageUuidOrDatabaseUri": "7b364691-940f-440c-b120-b96f250f5c96@6c48a",
         "atlasUuid": ""
       },
       "ver": "1.0.12",
@@ -129,6 +129,6 @@
     "type": "sprite-frame",
     "hasAlpha": true,
     "fixAlphaTransparencyArtifacts": false,
-    "redirect": "35187db7-871c-409c-af6e-cec660642c10@f9941"
+    "redirect": "7b364691-940f-440c-b120-b96f250f5c96@f9941"
   }
 }

BIN
assets/texture/ui/setting/img_bg.png


BIN
assets/texture/ui/setting/img_setting.png


+ 134 - 0
assets/texture/ui/setting/img_setting.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.26",
+  "importer": "image",
+  "imported": true,
+  "uuid": "ef582556-0f2d-4458-bf4b-3fae54d354bb",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "ef582556-0f2d-4458-bf4b-3fae54d354bb@6c48a",
+      "displayName": "img_setting",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "ef582556-0f2d-4458-bf4b-3fae54d354bb",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "ef582556-0f2d-4458-bf4b-3fae54d354bb@f9941",
+      "displayName": "img_setting",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimType": "auto",
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 1,
+        "offsetY": 0,
+        "trimX": 3,
+        "trimY": 0,
+        "width": 243,
+        "height": 97,
+        "rawWidth": 247,
+        "rawHeight": 97,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -121.5,
+            -48.5,
+            0,
+            121.5,
+            -48.5,
+            0,
+            -121.5,
+            48.5,
+            0,
+            121.5,
+            48.5,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            3,
+            97,
+            246,
+            97,
+            3,
+            0,
+            246,
+            0
+          ],
+          "nuv": [
+            0.012145748987854251,
+            0,
+            0.9959514170040485,
+            0,
+            0.012145748987854251,
+            1,
+            0.9959514170040485,
+            1
+          ],
+          "minPos": [
+            -121.5,
+            -48.5,
+            0
+          ],
+          "maxPos": [
+            121.5,
+            48.5,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "ef582556-0f2d-4458-bf4b-3fae54d354bb@6c48a",
+        "atlasUuid": ""
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "ef582556-0f2d-4458-bf4b-3fae54d354bb@f9941"
+  }
+}

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác