From ce53eda29c0020fef327ae31e487a078938a1b6a Mon Sep 17 00:00:00 2001 From: yangwen Date: Mon, 19 May 2025 20:07:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8C=89=E9=92=AE=E8=83=8C?= =?UTF-8?q?=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/atlas/comp/btn_item.png | Bin 0 -> 1901 bytes assets/atlas/comp/btn_item.png.meta | 6 ++ assets/resources/Stage.lh | 131 ++++++++++++++++------------ src/views/Stage.ts | 16 ++-- 4 files changed, 91 insertions(+), 62 deletions(-) create mode 100644 assets/atlas/comp/btn_item.png create mode 100644 assets/atlas/comp/btn_item.png.meta diff --git a/assets/atlas/comp/btn_item.png b/assets/atlas/comp/btn_item.png new file mode 100644 index 0000000000000000000000000000000000000000..589879631a12891274e80c977881be8745d68096 GIT binary patch literal 1901 zcmeAS@N?(olHy`uVBq!ia0vp^Ees5d3><7gR*}%XyFf~^#5JNMI6tkVJh3R1!7(L2 zDOJHUH!(dmC^a#qvhZZ84FdzSdS*yONrbPDRdRl=ULr`1UPW#JP&WgEjeSKyVsdtB zi9%9pdS;%j()-=}l@u~lY?Z=IeGPmIoKrJ0J*tXQgRA^PlB=?lEmM^2?G$V(tbhjO zrj{fsROII56l+vWk*=YUm7$51k%w8T~k=vs(3atq+b<`qMO3K(em6^RA|Z5PB_f>IJ2T+ybD@E~!PCWvMA{Mftf3U_V=B z;&zJ}PV=C8Q*gV*9H(A=pkwqwF^d$_Fd<;_0Wsle7s!F9{?t5Rk}m?LZGn>CZNMyZ z$J50zq~g|_TZw+bkrE9L-_N<-X~x#Rn`t*o1mk0_lrV!GOpm#)$i4vL67~aJ$7CbI zFC631l-&EhB3h%VK`6QBo85VN4~=@edv(w6ObPMgj5z7mpdi4~G(ul!f zz%Go?fMDS;2Zu1iE(8m^T_icd-hJ0g?&X&^NnX8}ckZg6W~R26^{cwt%N+HlsbZS` zO1C`ynhQTKv|RK0;gfb&!@1|&cY5`EZK-DZ5qtkzYRsa_!2BGUnsR~Dy%V1M2YdDV zl;rj`hvy2P-?z>1Qfahe=*IiC)<(y+8f%_C-de5=FE4Ljx$%Zjx9-HnR`*Q#ioPCietP}gnHz?D zUYY-+*aCxY8Sy>Z(p>XtrK-!B=TGClajIz_KkmM@e!{~u2?2jKIrQvuB^dEUEhy%w z8unQ2!WI1oqgVsejvY9ZP*6Qd`Dth11_PO8<(5-F9nHyJi%dR#IJ7OIcJmJJDQ54w7rEPRdHeY2%Ysya)r%Kz zIeUN6i-UU=SMA-k&v@ULAC*_TmtX#=@$|;~IxC}HrP17}VNbX0u3EK2=9H+P+0nPT z;%C3^c9>?C8!vu%tMsGOxf54c1Sx$x^Z7gP!dG&-`^66RHvf=uyV+xL>ul)OV6R)R z=6SnKytFLxf0et__w>0-McBK~tKTa7QT6da!R7e>DhC)gxLt{y9#Van0SG)@{an^L HB{Ts5NDP&J literal 0 HcmV?d00001 diff --git a/assets/atlas/comp/btn_item.png.meta b/assets/atlas/comp/btn_item.png.meta new file mode 100644 index 0000000..44f407c --- /dev/null +++ b/assets/atlas/comp/btn_item.png.meta @@ -0,0 +1,6 @@ +{ + "uuid": "08a05164-eac8-4773-8e7d-749e477f1ee7", + "importer": { + "textureType": 2 + } +} \ No newline at end of file diff --git a/assets/resources/Stage.lh b/assets/resources/Stage.lh index 53fdc8b..595c918 100644 --- a/assets/resources/Stage.lh +++ b/assets/resources/Stage.lh @@ -42,16 +42,16 @@ "_$ref": "jeyh2go0" }, "btn_undo": { - "_$ref": "83lbnqr1" + "_$ref": "uug6jz7y" }, "btn_erase": { - "_$ref": "6iqmd28a" + "_$ref": "ll1f1ee0" }, "btn_note": { - "_$ref": "j0j498da" + "_$ref": "umtydjve" }, "btn_hint": { - "_$ref": "zmknl088" + "_$ref": "ox4vivq3" } } ], @@ -39413,32 +39413,37 @@ "_$id": "7qai1jdm", "_$type": "HBox", "name": "buttons", - "x": 115, - "y": 1400, - "width": 850, - "height": 200, + "x": 126, + "y": 1436, + "width": 828, + "height": 128, "_mouseState": 2, "drawCallOptimize": true, "centerX": 0, "centerY": 540, - "space": 150, + "space": 100, "align": "middle", "_$child": [ { - "_$id": "83lbnqr1", - "_$type": "Box", + "_$id": "uug6jz7y", + "_$type": "Button", "name": "btn_undo", - "y": 50, - "width": 100, - "height": 100, - "drawCallOptimize": true, + "width": 132, + "height": 128, + "_mouseState": 2, + "stateNum": 2, + "skin": "res://08a05164-eac8-4773-8e7d-749e477f1ee7", + "label": "", + "labelSize": 20, + "labelAlign": "center", + "labelVAlign": "middle", "_$child": [ { "_$id": "at2v2bn5", "_$type": "Image", "name": "Image", - "x": 16, - "y": 16, + "x": 32, + "y": 30, "width": 69, "height": 69, "centerX": 0, @@ -39450,11 +39455,12 @@ "_$id": "5x56vbw3", "_$type": "Label", "name": "label", - "y": 108, + "x": 16, + "y": 124, "width": 100, "height": 40, "centerX": 0, - "centerY": 78, + "centerY": 80, "text": "Undo", "fontSize": 40, "color": "rgba(55, 53, 53, 1)", @@ -39466,22 +39472,26 @@ ] }, { - "_$id": "6iqmd28a", - "_$type": "Box", + "_$id": "ll1f1ee0", + "_$type": "Button", "name": "btn_erase", - "x": 250, - "y": 50, - "width": 100, - "height": 100, + "x": 232, + "width": 132, + "height": 128, "_mouseState": 2, - "drawCallOptimize": true, + "stateNum": 2, + "skin": "res://08a05164-eac8-4773-8e7d-749e477f1ee7", + "label": "", + "labelSize": 20, + "labelAlign": "center", + "labelVAlign": "middle", "_$child": [ { "_$id": "nu0r4h4m", "_$type": "Image", "name": "Image", - "x": 13, - "y": 14, + "x": 29, + "y": 28, "width": 75, "height": 72, "centerX": 0, @@ -39493,11 +39503,12 @@ "_$id": "pc0bjn7t", "_$type": "Label", "name": "label", - "y": 108, + "x": 16, + "y": 124, "width": 100, "height": 40, "centerX": 0, - "centerY": 78, + "centerY": 80, "text": "Erase", "fontSize": 40, "color": "rgba(55, 53, 53, 1)", @@ -39509,21 +39520,26 @@ ] }, { - "_$id": "j0j498da", - "_$type": "Box", + "_$id": "umtydjve", + "_$type": "Button", "name": "btn_note", - "x": 500, - "y": 50, - "width": 100, - "height": 100, - "drawCallOptimize": true, + "x": 464, + "width": 132, + "height": 128, + "_mouseState": 2, + "stateNum": 2, + "skin": "res://08a05164-eac8-4773-8e7d-749e477f1ee7", + "label": "", + "labelSize": 20, + "labelAlign": "center", + "labelVAlign": "middle", "_$child": [ { "_$id": "nd653uaf", "_$type": "Box", "name": "normal", - "x": 14, - "y": 13, + "x": 30, + "y": 27, "width": 73, "height": 74, "centerX": 0, @@ -39559,8 +39575,8 @@ "_$id": "dflp9r4d", "_$type": "Box", "name": "checked", - "x": 14, - "y": 13, + "x": 30, + "y": 27, "width": 73, "height": 74, "centerX": 0, @@ -39596,11 +39612,12 @@ "_$id": "cplq65uj", "_$type": "Label", "name": "label", - "y": 108, + "x": 16, + "y": 124, "width": 100, "height": 40, "centerX": 0, - "centerY": 78, + "centerY": 80, "text": "Notes", "fontSize": 40, "color": "rgba(55, 53, 53, 1)", @@ -39612,21 +39629,26 @@ ] }, { - "_$id": "zmknl088", - "_$type": "Box", + "_$id": "ox4vivq3", + "_$type": "Button", "name": "btn_hint", - "x": 750, - "y": 50, - "width": 100, - "height": 100, - "drawCallOptimize": true, + "x": 696, + "width": 132, + "height": 128, + "_mouseState": 2, + "stateNum": 2, + "skin": "res://08a05164-eac8-4773-8e7d-749e477f1ee7", + "label": "", + "labelSize": 20, + "labelAlign": "center", + "labelVAlign": "middle", "_$child": [ { "_$id": "qgd1z6lm", "_$type": "Image", "name": "Image", - "x": 17, - "y": 10, + "x": 33, + "y": 24, "width": 67, "height": 80, "mouseThrough": true, @@ -39753,11 +39775,12 @@ "_$id": "h9be7h1y", "_$type": "Label", "name": "label", - "y": 108, + "x": 16, + "y": 124, "width": 100, "height": 40, "centerX": 0, - "centerY": 78, + "centerY": 80, "text": "Hint", "fontSize": 40, "color": "rgba(55, 53, 53, 1)", diff --git a/src/views/Stage.ts b/src/views/Stage.ts index b46be9c..f43f965 100644 --- a/src/views/Stage.ts +++ b/src/views/Stage.ts @@ -37,16 +37,16 @@ export class Stage extends Laya.Script { public obj_candy_labels: Laya.Box; private candys: Array = new Array(); - @property(Laya.Box) - public btn_undo: Laya.Box; - @property(Laya.Box) - public btn_erase: Laya.Box; - @property(Laya.Box) - public btn_note: Laya.Box; + @property(Laya.Button) + public btn_undo: Laya.Button; + @property(Laya.Button) + public btn_erase: Laya.Button; + @property(Laya.Button) + public btn_note: Laya.Button; private btn_note_normal: Laya.Box private btn_note_checked: Laya.Box - @property(Laya.Box) - public btn_hint: Laya.Box; + @property(Laya.Button) + public btn_hint: Laya.Button; private btn_hint_normal: Laya.Box private btn_hint_ad: Laya.Box private btn_hint_label: Laya.Label