Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_NJ_lite
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
middleLayer_for_NJ_lite
Commits
51ad54b9
Commit
51ad54b9
authored
Dec 12, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新版本提示框和确认框
parent
1b9d6a9d
Changes
17
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1544 additions
and
1239 deletions
+1544
-1239
middleLayer_for_NJ_lite.fire
...iddleLayer_for_NJ_lite/scene/middleLayer_for_NJ_lite.fire
+1245
-1221
middleLayer.ts
assets/middleLayer_for_NJ_lite/script/middleLayer.ts
+35
-18
tipsLayer.meta
assets/middleLayer_for_NJ_lite/textures/tipsLayer.meta
+12
-0
bg_cat.png
assets/middleLayer_for_NJ_lite/textures/tipsLayer/bg_cat.png
+0
-0
bg_cat.png.meta
...iddleLayer_for_NJ_lite/textures/tipsLayer/bg_cat.png.meta
+36
-0
bg_cathand.png
...middleLayer_for_NJ_lite/textures/tipsLayer/bg_cathand.png
+0
-0
bg_cathand.png.meta
...eLayer_for_NJ_lite/textures/tipsLayer/bg_cathand.png.meta
+36
-0
bg_footprint.png
...ddleLayer_for_NJ_lite/textures/tipsLayer/bg_footprint.png
+0
-0
bg_footprint.png.meta
...ayer_for_NJ_lite/textures/tipsLayer/bg_footprint.png.meta
+36
-0
bg_tip.png
assets/middleLayer_for_NJ_lite/textures/tipsLayer/bg_tip.png
+0
-0
bg_tip.png.meta
...iddleLayer_for_NJ_lite/textures/tipsLayer/bg_tip.png.meta
+36
-0
bg_tips.png
...ts/middleLayer_for_NJ_lite/textures/tipsLayer/bg_tips.png
+0
-0
bg_tips.png.meta
...ddleLayer_for_NJ_lite/textures/tipsLayer/bg_tips.png.meta
+36
-0
btn_no.png
assets/middleLayer_for_NJ_lite/textures/tipsLayer/btn_no.png
+0
-0
btn_no.png.meta
...iddleLayer_for_NJ_lite/textures/tipsLayer/btn_no.png.meta
+36
-0
btn_yes.png
...ts/middleLayer_for_NJ_lite/textures/tipsLayer/btn_yes.png
+0
-0
btn_yes.png.meta
...ddleLayer_for_NJ_lite/textures/tipsLayer/btn_yes.png.meta
+36
-0
No files found.
assets/middleLayer_for_NJ_lite/scene/middleLayer_for_NJ_lite.fire
View file @
51ad54b9
This diff is collapsed.
Click to expand it.
assets/middleLayer_for_NJ_lite/script/middleLayer.ts
View file @
51ad54b9
...
@@ -74,40 +74,58 @@ export default class NewClass extends middleLayerBase {
...
@@ -74,40 +74,58 @@ export default class NewClass extends middleLayerBase {
this
.
tipsTween
.
stop
();
this
.
tipsTween
.
stop
();
tipsLayer
.
active
=
false
;
tipsLayer
.
active
=
false
;
}
}
const
label
=
cc
.
find
(
'
middleLayer/tipsLayer/tips/label
'
);
label
.
getComponent
(
cc
.
Label
).
string
=
`
${
str
}
`
;
const
tips
=
cc
.
find
(
'
middleLayer/tipsLayer/tips
'
);
tipsLayer
.
active
=
true
;
tips
.
width
=
Math
.
max
(
300
,
label
.
width
+
50
);
this
.
tipsTween
=
cc
.
tween
(
tips
)
tipsLayer
.
active
=
true
;
.
set
({
opacity
:
255
})
const
label
=
cc
.
find
(
'
middleLayer/tipsLayer/bg/bg_tips/label
'
);
.
to
(
5
,
{
opacity
:
0
})
label
.
getComponent
(
cc
.
Label
).
string
=
str
;
label
.
getComponent
(
cc
.
Label
)[
"
_forceUpdateRenderData
"
](
true
)
const
bgCat
=
cc
.
find
(
"
middleLayer/tipsLayer/bg/bg_cat
"
)
const
bgBoard
=
cc
.
find
(
"
middleLayer/tipsLayer/bg/bg_tips
"
)
const
bgCatHand
=
cc
.
find
(
"
middleLayer/tipsLayer/bg/bg_cathand
"
)
bgBoard
.
width
=
label
.
width
<
400
?
400
:
label
.
width
+
100
;
const
bgCatWidget
=
bgCat
.
getComponent
(
cc
.
Widget
)
const
bgCatHandWidget
=
bgCatHand
.
getComponent
(
cc
.
Widget
)
bgCatWidget
.
horizontalCenter
=
-
bgBoard
.
width
/
2
-
20
;
bgCatHandWidget
.
horizontalCenter
=
-
bgBoard
.
width
/
2
+
50
;
this
.
tipsTween
=
cc
.
tween
(
tipsLayer
)
.
set
({
opacity
:
0
})
.
to
(
0.1
,
{
opacity
:
255
})
.
delay
(
1.5
)
.
to
(
0.2
,
{
opacity
:
0
})
.
call
(()
=>
{
.
call
(()
=>
{
tipsLayer
.
active
=
false
;
tipsLayer
.
active
=
false
;
this
.
tipsTween
=
null
;
this
.
tipsTween
=
null
;
})
})
.
start
();
.
start
();
}
}
async
showConfirm
(
str
:
string
,
yesFun
:
Function
=
null
,
noFun
:
Function
=
null
)
{
async
showConfirm
(
str
:
string
,
yesFun
:
Function
=
null
,
noFun
:
Function
=
null
)
{
if
(
this
.
IS_BUNDLE_LOADING
)
{
if
(
this
.
IS_BUNDLE_LOADING
)
{
return
;
return
;
}
}
const
tipsLayer
=
cc
.
find
(
'
middleLayer/confirmLayer
'
);
const
tipsLayer
=
cc
.
find
(
'
middleLayer/confirmLayer
'
);
const
label
=
cc
.
find
(
'
middleLayer/confirmLayer/confirm_bg/label
'
);
label
.
getComponent
(
cc
.
Label
).
string
=
`
${
str
}
`
;
const
tips
=
cc
.
find
(
'
middleLayer/confirmLayer/confirm_bg
'
);
tipsLayer
.
active
=
true
;
tipsLayer
.
active
=
true
;
tips
.
width
=
Math
.
max
(
684
,
label
.
width
+
50
);
const
yesBtn
=
cc
.
find
(
'
middleLayer/confirmLayer/confirm_bg/btn_yes
'
);
const
bgBoard
=
cc
.
find
(
"
middleLayer/confirmLayer/bgBoard
"
)
const
label
=
cc
.
find
(
'
middleLayer/confirmLayer/label
'
);
label
.
getComponent
(
cc
.
Label
).
string
=
str
;
label
.
getComponent
(
cc
.
Label
)[
"
_forceUpdateRenderData
"
](
true
)
bgBoard
.
width
=
label
.
width
<
537
?
537
:
label
.
width
+
100
;
const
yesBtn
=
cc
.
find
(
'
middleLayer/confirmLayer/btn_yes
'
);
buttonOnceClick
(
yesBtn
,
(
evt
)
=>
{
buttonOnceClick
(
yesBtn
,
(
evt
)
=>
{
yesFun
&&
yesFun
(
evt
);
yesFun
&&
yesFun
(
evt
);
yesBtn
.
off
(
"
click
"
);
yesBtn
.
off
(
"
click
"
);
noBtn
.
off
(
"
click
"
);
noBtn
.
off
(
"
click
"
);
tipsLayer
.
active
=
false
;
tipsLayer
.
active
=
false
;
});
});
const
noBtn
=
cc
.
find
(
'
middleLayer/confirmLayer/confirm_bg/btn_no
'
);
const
noBtn
=
cc
.
find
(
'
middleLayer/confirmLayer/btn_no
'
);
buttonOnceClick
(
noBtn
,
(
evt
)
=>
{
buttonOnceClick
(
noBtn
,
(
evt
)
=>
{
noFun
&&
noFun
(
evt
);
noFun
&&
noFun
(
evt
);
yesBtn
.
off
(
"
click
"
);
yesBtn
.
off
(
"
click
"
);
...
@@ -115,15 +133,14 @@ export default class NewClass extends middleLayerBase {
...
@@ -115,15 +133,14 @@ export default class NewClass extends middleLayerBase {
tipsLayer
.
active
=
false
;
tipsLayer
.
active
=
false
;
});
});
}
}
async
hideConfirm
()
{
async
hideConfirm
()
{
const
tipsLayer
=
cc
.
find
(
'
middleLayer/confirmLayer
'
);
const
tipsLayer
=
cc
.
find
(
'
middleLayer/confirmLayer
'
);
const
label
=
cc
.
find
(
'
middleLayer/confirmLayer/
confirm_bg/
label
'
);
const
label
=
cc
.
find
(
'
middleLayer/confirmLayer/label
'
);
label
.
getComponent
(
cc
.
Label
).
string
=
``
;
label
.
getComponent
(
cc
.
Label
).
string
=
``
;
const
tips
=
cc
.
find
(
'
middleLayer/confirmLayer/confirm_bg
'
);
tips
.
width
=
Math
.
max
(
684
);
const
yesBtn
=
cc
.
find
(
'
middleLayer/confirmLayer/
confirm_bg/
btn_yes
'
);
const
yesBtn
=
cc
.
find
(
'
middleLayer/confirmLayer/btn_yes
'
);
const
noBtn
=
cc
.
find
(
'
middleLayer/confirmLayer/
confirm_bg/
btn_no
'
);
const
noBtn
=
cc
.
find
(
'
middleLayer/confirmLayer/btn_no
'
);
yesBtn
.
off
(
"
click
"
);
yesBtn
.
off
(
"
click
"
);
noBtn
.
off
(
"
click
"
);
noBtn
.
off
(
"
click
"
);
tipsLayer
.
active
=
false
;
tipsLayer
.
active
=
false
;
...
...
assets/middleLayer_for_NJ_lite/textures/tipsLayer.meta
0 → 100644
View file @
51ad54b9
{
"ver": "1.1.2",
"uuid": "ae5e7d75-b266-4742-aa86-1d2e0d5cc907",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
assets/middleLayer_for_NJ_lite/textures/tipsLayer/bg_cat.png
0 → 100644
View file @
51ad54b9
8.77 KB
assets/middleLayer_for_NJ_lite/textures/tipsLayer/bg_cat.png.meta
0 → 100644
View file @
51ad54b9
{
"ver": "2.3.5",
"uuid": "fbbadac6-cc6a-47cb-8f2e-cef8d97e484a",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 187,
"height": 239,
"platformSettings": {},
"subMetas": {
"bg_cat": {
"ver": "1.0.4",
"uuid": "b7db2eee-bfb1-477f-96f5-875da7f89a46",
"rawTextureUuid": "fbbadac6-cc6a-47cb-8f2e-cef8d97e484a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 187,
"height": 239,
"rawWidth": 187,
"rawHeight": 239,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/middleLayer_for_NJ_lite/textures/tipsLayer/bg_cathand.png
0 → 100644
View file @
51ad54b9
625 Bytes
assets/middleLayer_for_NJ_lite/textures/tipsLayer/bg_cathand.png.meta
0 → 100644
View file @
51ad54b9
{
"ver": "2.3.5",
"uuid": "5c306e4a-3353-47d7-890f-318642d09593",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 31,
"height": 21,
"platformSettings": {},
"subMetas": {
"bg_cathand": {
"ver": "1.0.4",
"uuid": "6739e769-16b0-434b-a166-2d05baa290e9",
"rawTextureUuid": "5c306e4a-3353-47d7-890f-318642d09593",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 31,
"height": 21,
"rawWidth": 31,
"rawHeight": 21,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/middleLayer_for_NJ_lite/textures/tipsLayer/bg_footprint.png
0 → 100644
View file @
51ad54b9
1.01 KB
assets/middleLayer_for_NJ_lite/textures/tipsLayer/bg_footprint.png.meta
0 → 100644
View file @
51ad54b9
{
"ver": "2.3.5",
"uuid": "9b174661-7b81-4243-8f21-e824695965cf",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 97,
"height": 100,
"platformSettings": {},
"subMetas": {
"bg_footprint": {
"ver": "1.0.4",
"uuid": "1c04001e-c211-4f97-a0ca-d09458f3cb34",
"rawTextureUuid": "9b174661-7b81-4243-8f21-e824695965cf",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 97,
"height": 100,
"rawWidth": 97,
"rawHeight": 100,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/middleLayer_for_NJ_lite/textures/tipsLayer/bg_tip.png
0 → 100644
View file @
51ad54b9
15 KB
assets/middleLayer_for_NJ_lite/textures/tipsLayer/bg_tip.png.meta
0 → 100644
View file @
51ad54b9
{
"ver": "2.3.5",
"uuid": "b8fad0cb-aaa0-4e82-aeee-4c61c8bbf0ef",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 537,
"height": 390,
"platformSettings": {},
"subMetas": {
"bg_tip": {
"ver": "1.0.4",
"uuid": "10b51ca8-0285-44e7-9c1c-d57b4fcf6365",
"rawTextureUuid": "b8fad0cb-aaa0-4e82-aeee-4c61c8bbf0ef",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 537,
"height": 390,
"rawWidth": 537,
"rawHeight": 390,
"borderTop": 251,
"borderBottom": 113,
"borderLeft": 249,
"borderRight": 249,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/middleLayer_for_NJ_lite/textures/tipsLayer/bg_tips.png
0 → 100644
View file @
51ad54b9
1.67 KB
assets/middleLayer_for_NJ_lite/textures/tipsLayer/bg_tips.png.meta
0 → 100644
View file @
51ad54b9
{
"ver": "2.3.5",
"uuid": "7840d873-6ca8-450d-8c13-338f369617f5",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 146,
"height": 146,
"platformSettings": {},
"subMetas": {
"bg_tips": {
"ver": "1.0.4",
"uuid": "4536d05d-e69b-46ae-a7be-993e1492c983",
"rawTextureUuid": "7840d873-6ca8-450d-8c13-338f369617f5",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1,
"trimY": 1,
"width": 144,
"height": 144,
"rawWidth": 146,
"rawHeight": 146,
"borderTop": 64,
"borderBottom": 60,
"borderLeft": 67,
"borderRight": 58,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/middleLayer_for_NJ_lite/textures/tipsLayer/btn_no.png
0 → 100644
View file @
51ad54b9
2.02 KB
assets/middleLayer_for_NJ_lite/textures/tipsLayer/btn_no.png.meta
0 → 100644
View file @
51ad54b9
{
"ver": "2.3.5",
"uuid": "c6551020-413e-43ab-934e-8fbf0ee4c638",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 135,
"height": 73,
"platformSettings": {},
"subMetas": {
"btn_no": {
"ver": "1.0.4",
"uuid": "6c9ad520-60e0-40e2-9205-ffbf0ed6cf11",
"rawTextureUuid": "c6551020-413e-43ab-934e-8fbf0ee4c638",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 2,
"trimY": 2,
"width": 131,
"height": 69,
"rawWidth": 135,
"rawHeight": 73,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/middleLayer_for_NJ_lite/textures/tipsLayer/btn_yes.png
0 → 100644
View file @
51ad54b9
2.11 KB
assets/middleLayer_for_NJ_lite/textures/tipsLayer/btn_yes.png.meta
0 → 100644
View file @
51ad54b9
{
"ver": "2.3.5",
"uuid": "ea2f7628-f91d-4374-bce1-1186bec99ccd",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 135,
"height": 73,
"platformSettings": {},
"subMetas": {
"btn_yes": {
"ver": "1.0.4",
"uuid": "a8790360-a9cb-4f41-9e51-5ed08bd56229",
"rawTextureUuid": "ea2f7628-f91d-4374-bce1-1186bec99ccd",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0.5,
"trimX": 2,
"trimY": 1,
"width": 131,
"height": 70,
"rawWidth": 135,
"rawHeight": 73,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment