添加按钮背景

This commit is contained in:
2025-05-19 20:07:11 +08:00
parent e9e60706a4
commit ce53eda29c
4 changed files with 91 additions and 62 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,6 @@
{
"uuid": "08a05164-eac8-4773-8e7d-749e477f1ee7",
"importer": {
"textureType": 2
}
}

View File

@@ -42,16 +42,16 @@
"_$ref": "jeyh2go0" "_$ref": "jeyh2go0"
}, },
"btn_undo": { "btn_undo": {
"_$ref": "83lbnqr1" "_$ref": "uug6jz7y"
}, },
"btn_erase": { "btn_erase": {
"_$ref": "6iqmd28a" "_$ref": "ll1f1ee0"
}, },
"btn_note": { "btn_note": {
"_$ref": "j0j498da" "_$ref": "umtydjve"
}, },
"btn_hint": { "btn_hint": {
"_$ref": "zmknl088" "_$ref": "ox4vivq3"
} }
} }
], ],
@@ -39413,32 +39413,37 @@
"_$id": "7qai1jdm", "_$id": "7qai1jdm",
"_$type": "HBox", "_$type": "HBox",
"name": "buttons", "name": "buttons",
"x": 115, "x": 126,
"y": 1400, "y": 1436,
"width": 850, "width": 828,
"height": 200, "height": 128,
"_mouseState": 2, "_mouseState": 2,
"drawCallOptimize": true, "drawCallOptimize": true,
"centerX": 0, "centerX": 0,
"centerY": 540, "centerY": 540,
"space": 150, "space": 100,
"align": "middle", "align": "middle",
"_$child": [ "_$child": [
{ {
"_$id": "83lbnqr1", "_$id": "uug6jz7y",
"_$type": "Box", "_$type": "Button",
"name": "btn_undo", "name": "btn_undo",
"y": 50, "width": 132,
"width": 100, "height": 128,
"height": 100, "_mouseState": 2,
"drawCallOptimize": true, "stateNum": 2,
"skin": "res://08a05164-eac8-4773-8e7d-749e477f1ee7",
"label": "",
"labelSize": 20,
"labelAlign": "center",
"labelVAlign": "middle",
"_$child": [ "_$child": [
{ {
"_$id": "at2v2bn5", "_$id": "at2v2bn5",
"_$type": "Image", "_$type": "Image",
"name": "Image", "name": "Image",
"x": 16, "x": 32,
"y": 16, "y": 30,
"width": 69, "width": 69,
"height": 69, "height": 69,
"centerX": 0, "centerX": 0,
@@ -39450,11 +39455,12 @@
"_$id": "5x56vbw3", "_$id": "5x56vbw3",
"_$type": "Label", "_$type": "Label",
"name": "label", "name": "label",
"y": 108, "x": 16,
"y": 124,
"width": 100, "width": 100,
"height": 40, "height": 40,
"centerX": 0, "centerX": 0,
"centerY": 78, "centerY": 80,
"text": "Undo", "text": "Undo",
"fontSize": 40, "fontSize": 40,
"color": "rgba(55, 53, 53, 1)", "color": "rgba(55, 53, 53, 1)",
@@ -39466,22 +39472,26 @@
] ]
}, },
{ {
"_$id": "6iqmd28a", "_$id": "ll1f1ee0",
"_$type": "Box", "_$type": "Button",
"name": "btn_erase", "name": "btn_erase",
"x": 250, "x": 232,
"y": 50, "width": 132,
"width": 100, "height": 128,
"height": 100,
"_mouseState": 2, "_mouseState": 2,
"drawCallOptimize": true, "stateNum": 2,
"skin": "res://08a05164-eac8-4773-8e7d-749e477f1ee7",
"label": "",
"labelSize": 20,
"labelAlign": "center",
"labelVAlign": "middle",
"_$child": [ "_$child": [
{ {
"_$id": "nu0r4h4m", "_$id": "nu0r4h4m",
"_$type": "Image", "_$type": "Image",
"name": "Image", "name": "Image",
"x": 13, "x": 29,
"y": 14, "y": 28,
"width": 75, "width": 75,
"height": 72, "height": 72,
"centerX": 0, "centerX": 0,
@@ -39493,11 +39503,12 @@
"_$id": "pc0bjn7t", "_$id": "pc0bjn7t",
"_$type": "Label", "_$type": "Label",
"name": "label", "name": "label",
"y": 108, "x": 16,
"y": 124,
"width": 100, "width": 100,
"height": 40, "height": 40,
"centerX": 0, "centerX": 0,
"centerY": 78, "centerY": 80,
"text": "Erase", "text": "Erase",
"fontSize": 40, "fontSize": 40,
"color": "rgba(55, 53, 53, 1)", "color": "rgba(55, 53, 53, 1)",
@@ -39509,21 +39520,26 @@
] ]
}, },
{ {
"_$id": "j0j498da", "_$id": "umtydjve",
"_$type": "Box", "_$type": "Button",
"name": "btn_note", "name": "btn_note",
"x": 500, "x": 464,
"y": 50, "width": 132,
"width": 100, "height": 128,
"height": 100, "_mouseState": 2,
"drawCallOptimize": true, "stateNum": 2,
"skin": "res://08a05164-eac8-4773-8e7d-749e477f1ee7",
"label": "",
"labelSize": 20,
"labelAlign": "center",
"labelVAlign": "middle",
"_$child": [ "_$child": [
{ {
"_$id": "nd653uaf", "_$id": "nd653uaf",
"_$type": "Box", "_$type": "Box",
"name": "normal", "name": "normal",
"x": 14, "x": 30,
"y": 13, "y": 27,
"width": 73, "width": 73,
"height": 74, "height": 74,
"centerX": 0, "centerX": 0,
@@ -39559,8 +39575,8 @@
"_$id": "dflp9r4d", "_$id": "dflp9r4d",
"_$type": "Box", "_$type": "Box",
"name": "checked", "name": "checked",
"x": 14, "x": 30,
"y": 13, "y": 27,
"width": 73, "width": 73,
"height": 74, "height": 74,
"centerX": 0, "centerX": 0,
@@ -39596,11 +39612,12 @@
"_$id": "cplq65uj", "_$id": "cplq65uj",
"_$type": "Label", "_$type": "Label",
"name": "label", "name": "label",
"y": 108, "x": 16,
"y": 124,
"width": 100, "width": 100,
"height": 40, "height": 40,
"centerX": 0, "centerX": 0,
"centerY": 78, "centerY": 80,
"text": "Notes", "text": "Notes",
"fontSize": 40, "fontSize": 40,
"color": "rgba(55, 53, 53, 1)", "color": "rgba(55, 53, 53, 1)",
@@ -39612,21 +39629,26 @@
] ]
}, },
{ {
"_$id": "zmknl088", "_$id": "ox4vivq3",
"_$type": "Box", "_$type": "Button",
"name": "btn_hint", "name": "btn_hint",
"x": 750, "x": 696,
"y": 50, "width": 132,
"width": 100, "height": 128,
"height": 100, "_mouseState": 2,
"drawCallOptimize": true, "stateNum": 2,
"skin": "res://08a05164-eac8-4773-8e7d-749e477f1ee7",
"label": "",
"labelSize": 20,
"labelAlign": "center",
"labelVAlign": "middle",
"_$child": [ "_$child": [
{ {
"_$id": "qgd1z6lm", "_$id": "qgd1z6lm",
"_$type": "Image", "_$type": "Image",
"name": "Image", "name": "Image",
"x": 17, "x": 33,
"y": 10, "y": 24,
"width": 67, "width": 67,
"height": 80, "height": 80,
"mouseThrough": true, "mouseThrough": true,
@@ -39753,11 +39775,12 @@
"_$id": "h9be7h1y", "_$id": "h9be7h1y",
"_$type": "Label", "_$type": "Label",
"name": "label", "name": "label",
"y": 108, "x": 16,
"y": 124,
"width": 100, "width": 100,
"height": 40, "height": 40,
"centerX": 0, "centerX": 0,
"centerY": 78, "centerY": 80,
"text": "Hint", "text": "Hint",
"fontSize": 40, "fontSize": 40,
"color": "rgba(55, 53, 53, 1)", "color": "rgba(55, 53, 53, 1)",

View File

@@ -37,16 +37,16 @@ export class Stage extends Laya.Script {
public obj_candy_labels: Laya.Box; public obj_candy_labels: Laya.Box;
private candys: Array<Candy> = new Array(); private candys: Array<Candy> = new Array();
@property(Laya.Box) @property(Laya.Button)
public btn_undo: Laya.Box; public btn_undo: Laya.Button;
@property(Laya.Box) @property(Laya.Button)
public btn_erase: Laya.Box; public btn_erase: Laya.Button;
@property(Laya.Box) @property(Laya.Button)
public btn_note: Laya.Box; public btn_note: Laya.Button;
private btn_note_normal: Laya.Box private btn_note_normal: Laya.Box
private btn_note_checked: Laya.Box private btn_note_checked: Laya.Box
@property(Laya.Box) @property(Laya.Button)
public btn_hint: Laya.Box; public btn_hint: Laya.Button;
private btn_hint_normal: Laya.Box private btn_hint_normal: Laya.Box
private btn_hint_ad: Laya.Box private btn_hint_ad: Laya.Box
private btn_hint_label: Laya.Label private btn_hint_label: Laya.Label