调整UI细节

This commit is contained in:
2025-05-20 20:17:47 +08:00
parent e1671a6b68
commit 7b519c2424
10 changed files with 1623 additions and 1622 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -129,7 +129,7 @@
"_$type": "Image",
"name": "btn_trophy",
"x": 948,
"y": 66,
"y": 72,
"width": 75,
"height": 75,
"skin": "res://4458c7de-47ff-496e-a28f-be808c0823b3",
@@ -215,10 +215,11 @@
"_$id": "ngt791nt",
"_$type": "Image",
"name": "star",
"x": 2,
"y": 2,
"width": 68,
"height": 68,
"x": 6,
"y": 6,
"width": 60,
"height": 60,
"centerY": 0,
"skin": "res://c5e80bd0-632f-4460-bce3-ebf9669359e3",
"color": "#ffffff"
},
@@ -7382,7 +7383,6 @@
"y": 108,
"width": 792,
"height": 156,
"visible": false,
"centerX": 0,
"centerY": 36,
"_$child": [

View File

@@ -38,11 +38,11 @@
"_$id": "jzxgx41i",
"_$type": "Box",
"name": "offset",
"y": 3000,
"y": 2400,
"width": 1080,
"height": 1360,
"height": 1215,
"_mouseState": 2,
"bottom": -2440,
"bottom": -1695,
"centerX": 0,
"_$child": [
{
@@ -50,7 +50,7 @@
"_$type": "Sprite",
"name": "bg",
"width": 1080,
"height": 1360,
"height": 1215,
"_gcmds": [
{
"_$type": "DrawRoundRectCmd",
@@ -73,12 +73,12 @@
"_$type": "Label",
"name": "Label",
"x": 90,
"y": 48,
"y": 35,
"width": 900,
"height": 180,
"centerX": 0,
"text": "New Game",
"fontSize": 80,
"fontSize": 72,
"color": "rgba(45, 49, 56, 1)",
"bold": true,
"align": "center",
@@ -90,11 +90,11 @@
"_$type": "Box",
"name": "Box",
"x": 410,
"y": -36,
"y": -20,
"width": 80,
"height": 20,
"centerX": 0,
"centerY": -116,
"centerY": -100,
"_$child": [
{
"_$id": "wk9lt59j",
@@ -127,13 +127,13 @@
"_$id": "34t1dkio",
"_$type": "VBox",
"name": "items",
"y": 300,
"y": 288,
"width": 1080,
"height": 1128,
"height": 840,
"_mouseState": 2,
"bottom": -68,
"bottom": 87,
"centerX": 0,
"space": 50,
"space": 30,
"align": "center",
"_$child": [
{
@@ -185,8 +185,9 @@
"centerX": -18,
"centerY": 0,
"text": "Easy",
"fontSize": 80,
"fontSize": 54,
"color": "rgba(45, 49, 56, 1)",
"bold": true,
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"
@@ -198,7 +199,7 @@
"_$type": "Box",
"name": "Box(2)",
"x": 72,
"y": 194,
"y": 174,
"width": 936,
"height": 144,
"_$comp": [
@@ -243,8 +244,9 @@
"centerX": -18,
"centerY": 0,
"text": "Medium",
"fontSize": 80,
"fontSize": 54,
"color": "rgba(45, 49, 56, 1)",
"bold": true,
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"
@@ -256,7 +258,7 @@
"_$type": "Box",
"name": "Box(3)",
"x": 72,
"y": 388,
"y": 348,
"width": 936,
"height": 144,
"_$comp": [
@@ -301,8 +303,9 @@
"centerX": -18,
"centerY": 0,
"text": "Hard",
"fontSize": 80,
"fontSize": 54,
"color": "rgba(45, 49, 56, 1)",
"bold": true,
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"
@@ -314,7 +317,7 @@
"_$type": "Box",
"name": "Box(4)",
"x": 72,
"y": 582,
"y": 522,
"width": 936,
"height": 144,
"_$comp": [
@@ -359,8 +362,9 @@
"centerX": -18,
"centerY": 0,
"text": "Expert",
"fontSize": 80,
"fontSize": 54,
"color": "rgba(45, 49, 56, 1)",
"bold": true,
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"
@@ -372,7 +376,7 @@
"_$type": "Box",
"name": "Box(5)",
"x": 72,
"y": 776,
"y": 696,
"width": 936,
"height": 144,
"_$comp": [
@@ -417,8 +421,9 @@
"centerX": -18,
"centerY": 0,
"text": "Extreme",
"fontSize": 80,
"fontSize": 54,
"color": "rgba(45, 49, 56, 1)",
"bold": true,
"align": "center",
"valign": "middle",
"padding": "0,0,0,0"

View File

@@ -145,7 +145,7 @@
"_$id": "6pifil84",
"_$type": "Box",
"name": "stars",
"y": -148,
"y": -168,
"width": 984,
"height": 300,
"visible": false,
@@ -195,12 +195,12 @@
"_$id": "sxp0g4z9",
"_$type": "Image",
"name": "star",
"x": 362,
"y": -120,
"x": 330,
"y": -160,
"width": 108,
"height": 108,
"scaleX": 2.4,
"scaleY": 2.4,
"scaleX": 3,
"scaleY": 3,
"centerX": 0,
"skin": "res://c5e80bd0-632f-4460-bce3-ebf9669359e3",
"color": "#ffffff"
@@ -227,7 +227,7 @@
"_$type": "VBox",
"name": "summary",
"x": 92,
"y": 453,
"y": 436,
"width": 800,
"height": 300,
"centerX": 0,
@@ -247,7 +247,7 @@
"width": 400,
"height": 100,
"text": "Difficuty",
"fontSize": 50,
"fontSize": 42,
"color": "rgba(123, 129, 140, 1)",
"valign": "middle",
"padding": "0,0,0,0"
@@ -260,7 +260,7 @@
"width": 400,
"height": 100,
"text": "Medium",
"fontSize": 50,
"fontSize": 48,
"color": "rgba(45, 49, 56, 1)",
"align": "right",
"valign": "middle",
@@ -283,7 +283,7 @@
"width": 400,
"height": 100,
"text": "Time",
"fontSize": 50,
"fontSize": 42,
"color": "rgba(123, 129, 140, 1)",
"valign": "middle",
"padding": "0,0,0,0"
@@ -296,7 +296,7 @@
"width": 400,
"height": 100,
"text": "Medium",
"fontSize": 50,
"fontSize": 48,
"color": "rgba(45, 49, 56, 1)",
"align": "right",
"valign": "middle",
@@ -319,7 +319,7 @@
"width": 400,
"height": 100,
"text": "Score",
"fontSize": 50,
"fontSize": 42,
"color": "rgba(123, 129, 140, 1)",
"valign": "middle",
"padding": "0,0,0,0"
@@ -332,7 +332,7 @@
"width": 400,
"height": 100,
"text": "Medium",
"fontSize": 50,
"fontSize": 48,
"color": "rgba(45, 49, 56, 1)",
"align": "right",
"valign": "middle",
@@ -348,20 +348,20 @@
"_$id": "2tsqczlh",
"_$type": "Box",
"name": "bottom",
"y": 1428,
"y": 1408,
"width": 1080,
"height": 492,
"left": 0,
"right": 0,
"bottom": 0,
"bottom": 20,
"_$child": [
{
"_$id": "nad0pj6b",
"_$type": "Box",
"name": "btn_new",
"x": 168,
"x": 144,
"y": 80,
"width": 744,
"width": 792,
"height": 156,
"visible": false,
"centerX": 0,
@@ -370,7 +370,7 @@
"_$id": "rryy0h1z",
"_$type": "Sprite",
"name": "Sprite",
"width": 744,
"width": 792,
"height": 156,
"_gcmds": [
{
@@ -393,12 +393,12 @@
"_$id": "t0l9qw7l",
"_$type": "Label",
"name": "Label",
"width": 744,
"width": 792,
"height": 156,
"centerX": 0,
"centerY": 0,
"text": "New Game",
"fontSize": 72,
"fontSize": 60,
"color": "rgba(255, 255, 255, 1)",
"bold": true,
"align": "center",
@@ -411,9 +411,9 @@
"_$id": "s80wwm91",
"_$type": "Box",
"name": "btn_home",
"x": 168,
"y": 274,
"width": 744,
"x": 144,
"y": 264,
"width": 792,
"height": 156,
"visible": false,
"centerX": 0,
@@ -422,9 +422,9 @@
"_$id": "xmj0kb6f",
"_$type": "Sprite",
"name": "Sprite",
"width": 744,
"width": 792,
"height": 156,
"alpha": 0.18,
"alpha": 0.1,
"_gcmds": [
{
"_$type": "DrawRoundRectCmd",
@@ -446,12 +446,12 @@
"_$id": "d003qixi",
"_$type": "Label",
"name": "Label",
"width": 744,
"width": 792,
"height": 156,
"centerX": 0,
"centerY": 0,
"text": "Home",
"fontSize": 72,
"fontSize": 60,
"color": "rgba(29, 92, 220, 1)",
"bold": true,
"align": "center",
@@ -464,17 +464,17 @@
"_$id": "jowyx0fm",
"_$type": "Box",
"name": "btn_continue",
"x": 168,
"y": 274,
"width": 200,
"height": 200,
"centerX": -272,
"x": 144,
"y": 264,
"width": 792,
"height": 156,
"centerX": 0,
"_$child": [
{
"_$id": "0oc03day",
"_$type": "Sprite",
"name": "Sprite",
"width": 744,
"width": 792,
"height": 156,
"_gcmds": [
{
@@ -497,12 +497,12 @@
"_$id": "cwysgq4l",
"_$type": "Label",
"name": "Label",
"width": 744,
"width": 792,
"height": 156,
"centerX": 272,
"centerY": -22,
"centerX": 0,
"centerY": 0,
"text": "Continue",
"fontSize": 72,
"fontSize": 60,
"color": "rgba(255, 255, 255, 1)",
"bold": true,
"align": "center",

View File

@@ -70,12 +70,12 @@
"_$type": "VBox",
"name": "buttons",
"x": 72,
"y": 420,
"y": 456,
"width": 744,
"height": 600,
"centerX": 0,
"centerY": 180,
"space": 48,
"centerY": 216,
"space": 40,
"align": "center",
"_$child": [
{
@@ -105,7 +105,7 @@
"_$id": "23po992p",
"_$type": "Sprite",
"name": "Sprite",
"x": 68,
"x": 104,
"y": 51,
"width": 60,
"height": 54,
@@ -131,9 +131,9 @@
"_$type": "Sprite",
"name": "Sprite",
"x": 16,
"y": 12,
"width": 32,
"height": 32,
"y": 13,
"width": 28,
"height": 28,
"_gcmds": [
{
"_$type": "DrawPolyCmd",
@@ -142,10 +142,10 @@
"points": [
0,
0,
32,
16,
28,
14,
0,
32
28
],
"lineWidth": 1,
"fillColor": "rgba(29, 92, 220, 1)"
@@ -160,10 +160,10 @@
"_$id": "y7aniaui",
"_$type": "Sprite",
"name": "btn_restart",
"y": 204,
"y": 196,
"width": 744,
"height": 156,
"alpha": 0.18,
"alpha": 0.1,
"_gcmds": [
{
"_$type": "DrawRoundRectCmd",
@@ -185,10 +185,10 @@
"_$id": "eepsaznr",
"_$type": "Sprite",
"name": "btn_newOrClose",
"y": 408,
"y": 392,
"width": 744,
"height": 156,
"alpha": 0.18,
"alpha": 0.1,
"_gcmds": [
{
"_$type": "DrawRoundRectCmd",
@@ -213,12 +213,12 @@
"_$type": "VBox",
"name": "labels",
"x": 72,
"y": 420,
"y": 456,
"width": 744,
"height": 600,
"centerX": 0,
"centerY": 180,
"space": 48,
"centerY": 216,
"space": 40,
"align": "center",
"_$child": [
{
@@ -228,7 +228,7 @@
"width": 744,
"height": 156,
"text": "Second Chace",
"fontSize": 72,
"fontSize": 60,
"color": "rgba(255, 255, 255, 1)",
"bold": true,
"align": "center",
@@ -239,11 +239,11 @@
"_$id": "o6codx3p",
"_$type": "Label",
"name": "Label(2)",
"y": 204,
"y": 196,
"width": 744,
"height": 156,
"text": "Restart",
"fontSize": 72,
"fontSize": 60,
"color": "rgba(29, 92, 220, 1)",
"bold": true,
"align": "center",
@@ -254,11 +254,11 @@
"_$id": "2r6iotpo",
"_$type": "Label",
"name": "Label(3)",
"y": 408,
"y": 392,
"width": 744,
"height": 156,
"text": "New Game",
"fontSize": 72,
"fontSize": 60,
"color": "rgba(29, 92, 220, 1)",
"bold": true,
"align": "center",
@@ -274,13 +274,13 @@
"_$type": "Label",
"name": "Label",
"x": 172,
"y": 511,
"y": 521,
"width": 736,
"height": 100,
"centerX": 0,
"centerY": -399,
"centerY": -389,
"text": "Game Over",
"fontSize": 80,
"fontSize": 72,
"color": "rgba(0, 0, 0, 1)",
"bold": true,
"align": "center",
@@ -292,13 +292,13 @@
"_$type": "Label",
"name": "Label(1)",
"x": 186,
"y": 644,
"y": 655,
"width": 709,
"height": 300,
"centerX": 0,
"centerY": -166,
"centerY": -155,
"text": "You lost the game because you made 3 mistakes",
"fontSize": 50,
"fontSize": 54,
"color": "rgba(123, 129, 140, 1)",
"align": "center",
"valign": "top",

View File

@@ -18,6 +18,9 @@
"_$ref": "7270vjom"
},
"label_dc_title": {
"_$ref": "5ubzcrtp"
},
"label_dc_date": {
"_$ref": "zbppj6k0"
},
"btn_play": {
@@ -62,10 +65,10 @@
"_$type": "Box",
"name": "dc",
"x": 72,
"y": 160,
"y": 150,
"width": 936,
"height": 468,
"top": 160,
"top": 150,
"centerX": 0,
"_$child": [
{
@@ -81,14 +84,14 @@
{
"_$id": "5ubzcrtp",
"_$type": "Label",
"name": "Label",
"x": 85,
"y": 28,
"name": "title",
"x": 69,
"y": 12,
"width": 767,
"height": 100,
"alpha": 0.6,
"centerX": 0,
"centerY": -156,
"centerX": -16,
"centerY": -172,
"text": "Daily Challenge",
"fontSize": 36,
"color": "rgba(45, 49, 56, 1)",
@@ -99,13 +102,13 @@
{
"_$id": "zbppj6k0",
"_$type": "Label",
"name": "title",
"x": 85,
"y": 107,
"name": "label_date",
"x": 69,
"y": 80,
"width": 767,
"height": 100,
"centerX": 0,
"centerY": -77,
"centerX": -16,
"centerY": -104,
"text": "Mar 12",
"fontSize": 60,
"color": "rgba(45, 49, 56, 1)",
@@ -113,26 +116,15 @@
"valign": "middle",
"padding": "0,0,0,0"
},
{
"_$id": "h6dakob0",
"_$type": "Image",
"name": "trophy",
"x": 468,
"width": 468,
"height": 468,
"right": 0,
"skin": "res://0a33c495-5713-4f5d-bb30-d0021966cf7e",
"useSourceSize": true,
"color": "#ffffff"
},
{
"_$id": "ttv6dk1v",
"_$type": "Sprite",
"name": "btn_play",
"x": 72,
"x": 56,
"y": 318,
"width": 195,
"height": 96,
"visible": false,
"_gcmds": [
{
"_$type": "DrawRoundRectCmd",
@@ -140,10 +132,10 @@
"y": 0,
"width": 1,
"height": 1,
"lt": 10,
"rt": 10,
"lb": 10,
"rb": 10,
"lt": 20,
"rt": 20,
"lb": 20,
"rb": 20,
"percent": true,
"lineWidth": 1,
"fillColor": "#FFFFFF"
@@ -172,7 +164,7 @@
"_$id": "ofvmzh0x",
"_$type": "Sprite",
"name": "btn_continue",
"x": 72,
"x": 56,
"y": 318,
"width": 309,
"height": 96,
@@ -184,10 +176,10 @@
"y": 0,
"width": 1,
"height": 1,
"lt": 10,
"rt": 10,
"lb": 10,
"rb": 10,
"lt": 20,
"rt": 20,
"lb": 20,
"rb": 20,
"percent": true,
"lineWidth": 1,
"fillColor": "#FFFFFF"
@@ -216,11 +208,10 @@
"_$id": "8mgjn0da",
"_$type": "Sprite",
"name": "btn_more",
"x": 72,
"x": 56,
"y": 318,
"width": 216,
"height": 96,
"visible": false,
"_gcmds": [
{
"_$type": "DrawRoundRectCmd",
@@ -228,10 +219,10 @@
"y": 0,
"width": 1,
"height": 1,
"lt": 10,
"rt": 10,
"lb": 10,
"rb": 10,
"lt": 20,
"rt": 20,
"lb": 20,
"rb": 20,
"percent": true,
"lineWidth": 1,
"fillColor": "#FFFFFF"
@@ -255,6 +246,18 @@
"padding": "0,0,0,0"
}
]
},
{
"_$id": "h6dakob0",
"_$type": "Image",
"name": "trophy",
"x": 468,
"width": 468,
"height": 468,
"right": 0,
"skin": "res://0a33c495-5713-4f5d-bb30-d0021966cf7e",
"useSourceSize": true,
"color": "#ffffff"
}
]
},
@@ -263,11 +266,12 @@
"_$type": "Box",
"name": "btn_new_blue",
"x": 144,
"y": 1488,
"y": 1532,
"width": 792,
"height": 168,
"visible": false,
"centerX": 0,
"centerY": 612,
"centerY": 656,
"_$child": [
{
"_$id": "ry13plzy",
@@ -301,7 +305,7 @@
"centerX": 0,
"centerY": 0,
"text": "New Game",
"fontSize": 100,
"fontSize": 60,
"color": "#FFFFFF",
"bold": true,
"align": "center",
@@ -315,11 +319,11 @@
"_$type": "Box",
"name": "btn_go",
"x": 144,
"y": 1376,
"y": 1428,
"width": 792,
"height": 168,
"centerX": 0,
"centerY": 500,
"centerY": 552,
"_$child": [
{
"_$id": "vfod7fmk",
@@ -354,7 +358,7 @@
"centerX": 0,
"centerY": -32,
"text": "Continue",
"fontSize": 80,
"fontSize": 60,
"color": "#FFFFFF",
"bold": true,
"align": "center",
@@ -365,11 +369,11 @@
"_$id": "pr17wcli",
"_$type": "Image",
"name": "time",
"x": 227,
"x": 267,
"y": 107,
"width": 35,
"height": 35,
"centerX": -152,
"centerX": -112,
"centerY": 40,
"skin": "res://2b4d26c7-ae87-47a3-8084-29a243441634",
"useSourceSize": true,
@@ -379,12 +383,12 @@
"_$id": "2l5pfddm",
"_$type": "Label",
"name": "label_time",
"x": 55,
"y": -2,
"x": 51,
"width": 400,
"height": 35,
"text": "99:00:00-Hard",
"fontSize": 40,
"alpha": 0.6,
"text": "00:00-Hard",
"fontSize": 36,
"color": "rgba(255, 255, 255, 0.6078431372549019)",
"bold": true,
"valign": "middle",
@@ -399,11 +403,11 @@
"_$type": "Box",
"name": "btn_new_white",
"x": 144,
"y": 1598,
"y": 1642,
"width": 792,
"height": 168,
"centerX": 0,
"centerY": 722,
"centerY": 766,
"_$child": [
{
"_$id": "sez4l9sx",
@@ -437,7 +441,7 @@
"centerX": 0,
"centerY": 0,
"text": "New Game",
"fontSize": 100,
"fontSize": 60,
"color": "rgba(29, 92, 220, 1)",
"bold": true,
"align": "center",
@@ -454,6 +458,7 @@
"y": 1820,
"width": 200,
"height": 100,
"visible": false,
"bottom": 0,
"centerX": 0,
"_$child": [
@@ -480,13 +485,13 @@
"_$type": "Label",
"name": "Label",
"x": 144,
"y": 760,
"y": 872,
"width": 792,
"height": 400,
"centerX": 0,
"centerY": 0,
"centerY": 112,
"text": "Classic\nSudoku",
"fontSize": 100,
"fontSize": 96,
"color": "rgba(123, 129, 140, 1)",
"bold": true,
"align": "center",

File diff suppressed because it is too large Load Diff

View File

@@ -19,11 +19,11 @@ export class Difficulty extends Laya.Script {
bg.graphics.clear()
bg.graphics.drawRoundRect(0, 0, offset.width, offset.height, 20, 20, 0, 0, "#f5f7fb")
Laya.Tween.to(offset, {y: 560}, 500)
Laya.Tween.to(offset, {y: 705}, 500)
var mask = this.owner.getChildByName("mask")
mask.on(Laya.Event.CLICK, this, ()=>{
Laya.Tween.to(offset, {y: 3000}, 500, null, Laya.Handler.create(this, () => {
Laya.Tween.to(offset, {y: 2400}, 500, null, Laya.Handler.create(this, () => {
this.owner.destroy()
}))
})

View File

@@ -17,6 +17,8 @@ export class Home extends Laya.Script {
public bg_dc: Laya.Image;
@property(Laya.Label)
public label_dc_title: Laya.Label;
@property(Laya.Label)
public label_dc_date: Laya.Label;
@property(Laya.Sprite)
public btn_play: Laya.Sprite;
@property(Laya.Sprite)
@@ -43,11 +45,18 @@ export class Home extends Laya.Script {
var dayNow = new Date().getDate()
var stageID = `${year}-${month}-${dayNow}`
if (user.get_doneCountBydate(year, month) >= 31)
if (user.get_doneCountBydate(year, month) >= 31) {
this.bg_dc.skin = respath.home_top_dc_bg_finish
else
this.label_dc_title.color = "#ffffff"
this.label_dc_date.color = "#ffffff"
}
else {
this.bg_dc.skin = respath.home_top_dc_bg_normal
this.label_dc_title.text = `${config.MONTH_ABBRS[month-1]} ${dayNow}`
this.label_dc_title.color = "#2d3138"
this.label_dc_date.color = "#2d3138"
}
this.label_dc_date.text = `${config.MONTH_ABBRS[month-1]} ${dayNow}`
var progress = user.get_done(stageID)
if (progress <= 0) {

View File

@@ -46,6 +46,7 @@ export class Stage extends Laya.Script {
public btn_note: Laya.Button;
private btn_note_normal: Laya.Box
private btn_note_checked: Laya.Box
private label_note: Laya.Label
@property(Laya.Button)
public btn_hint: Laya.Button;
private btn_hint_normal: Laya.Box
@@ -100,6 +101,7 @@ export class Stage extends Laya.Script {
this.btn_note.on(Laya.Event.CLICK, this, this.onClickNote)
this.btn_note_normal = this.btn_note.getChildByName("normal") as Laya.Box
this.btn_note_checked = this.btn_note.getChildByName("checked") as Laya.Box
this.label_note = this.btn_note.getChildByName("label") as Laya.Label
this.btn_hint.on(Laya.Event.CLICK, this, this.onClickHint)
this.btn_hint_normal = this.btn_hint.getChildByName("Image").getChildByName("normal") as Laya.Box
this.btn_hint_ad = this.btn_hint.getChildByName("Image").getChildByName("ad") as Laya.Box
@@ -264,6 +266,7 @@ export class Stage extends Laya.Script {
}
this.btn_note_normal.visible = this.data.get_note_open() == false
this.btn_note_checked.visible = this.data.get_note_open()
this.label_note.color = this.data.get_note_open() ? "#1d5cdc" : "#545962"
for (var i=0; i<this.candys.length; i++) {
this.candys[i].setNoteStatus(this.data.get_note_open())
}