Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dg_dictation_menu
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
dg_dictation_menu
Commits
9a162863
Commit
9a162863
authored
Mar 23, 2023
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
53791fe3
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1070 additions
and
279 deletions
+1070
-279
dg_dictation_menu.fire
assets/dg_dictation_menu/scene/dg_dictation_menu.fire
+801
-243
dg_dictation_menu.js
assets/dg_dictation_menu/scene/dg_dictation_menu.js
+53
-36
dg_1.png
assets/dg_dictation_menu/texture/book/dg_1.png
+0
-0
dg_1.png.meta
assets/dg_dictation_menu/texture/book/dg_1.png.meta
+36
-0
dg_2.png
assets/dg_dictation_menu/texture/book/dg_2.png
+0
-0
dg_2.png.meta
assets/dg_dictation_menu/texture/book/dg_2.png.meta
+36
-0
dg_3.png
assets/dg_dictation_menu/texture/book/dg_3.png
+0
-0
dg_3.png.meta
assets/dg_dictation_menu/texture/book/dg_3.png.meta
+36
-0
dg_4.png
assets/dg_dictation_menu/texture/book/dg_4.png
+0
-0
dg_4.png.meta
assets/dg_dictation_menu/texture/book/dg_4.png.meta
+36
-0
dg_5.png
assets/dg_dictation_menu/texture/book/dg_5.png
+0
-0
dg_5.png.meta
assets/dg_dictation_menu/texture/book/dg_5.png.meta
+36
-0
dg_6.png
assets/dg_dictation_menu/texture/book/dg_6.png
+0
-0
dg_6.png.meta
assets/dg_dictation_menu/texture/book/dg_6.png.meta
+36
-0
No files found.
assets/dg_dictation_menu/scene/dg_dictation_menu.fire
View file @
9a162863
This diff is collapsed.
Click to expand it.
assets/dg_dictation_menu/scene/dg_dictation_menu.js
View file @
9a162863
...
@@ -364,10 +364,16 @@ cc.Class({
...
@@ -364,10 +364,16 @@ cc.Class({
this
.
viewArr
=
[];
this
.
viewArr
=
[];
this
.
teachingMaterialArr
=
[
this
.
teachingMaterialArr
=
[
{
key
:
"
人教版
"
,
name
:
"
同步 人教版 内容
"
,
res
:
'
book_rjb
'
},
{
key
:
"
人教版
"
,
name
:
"
同步 人教版 内容
"
,
res
:
''
},
{
key
:
"
外研版
"
,
name
:
"
同步 外研版 内容
"
,
res
:
'
book_wyb
'
},
{
key
:
"
外研版
"
,
name
:
"
同步 外研版 内容
"
,
res
:
''
},
{
key
:
"
沪教版
"
,
name
:
"
同步 沪教版 内容
"
,
res
:
'
book_ljb
'
},
{
key
:
"
沪教版
"
,
name
:
"
同步 沪教版 内容
"
,
res
:
''
},
{
key
:
"
学前班
"
,
name
:
"
同步 学前班 内容
"
,
res
:
'
book_xqb
'
},
{
key
:
"
学前班
"
,
name
:
"
同步 学前班 内容
"
,
res
:
''
},
{
key
:
"
Level 1
"
,
name
:
"
迪格 Level 1
"
,
res
:
'
dg_1
'
},
{
key
:
"
Level 2
"
,
name
:
"
迪格 Level 2
"
,
res
:
'
dg_2
'
},
{
key
:
"
Level 3
"
,
name
:
"
迪格 Level 3
"
,
res
:
'
dg_3
'
},
{
key
:
"
Level 4
"
,
name
:
"
迪格 Level 4
"
,
res
:
'
dg_4
'
},
{
key
:
"
Level 5
"
,
name
:
"
迪格 Level 5
"
,
res
:
'
dg_5
'
},
{
key
:
"
Level 6
"
,
name
:
"
迪格 Level 6
"
,
res
:
'
dg_6
'
},
];
];
this
.
routeArr
=
[];
this
.
routeArr
=
[];
...
@@ -1063,7 +1069,7 @@ cc.Class({
...
@@ -1063,7 +1069,7 @@ cc.Class({
this
.
homeView
.
addChild
(
topBg
,
2
);
this
.
homeView
.
addChild
(
topBg
,
2
);
this
.
topBg
=
topBg
;
this
.
topBg
=
topBg
;
const
labelNode
=
this
.
getLabel
(
"
绘 玩
听 写 助 手
"
,
fontSize
,
true
);
const
labelNode
=
this
.
getLabel
(
"
听 写 助 手
"
,
fontSize
,
true
);
labelNode
.
color
=
cc
.
Color
.
WHITE
;
labelNode
.
color
=
cc
.
Color
.
WHITE
;
this
.
homeView
.
addChild
(
labelNode
,
3
);
this
.
homeView
.
addChild
(
labelNode
,
3
);
labelNode
.
y
=
topBg
.
y
-
topBg
.
height
/
2.5
*
topBg
.
scaleY
;
labelNode
.
y
=
topBg
.
y
-
topBg
.
height
/
2.5
*
topBg
.
scaleY
;
...
@@ -1071,6 +1077,21 @@ cc.Class({
...
@@ -1071,6 +1077,21 @@ cc.Class({
this
.
titleH
=
topBg
.
height
/
2.5
*
topBg
.
scaleY
*
2
;
this
.
titleH
=
topBg
.
height
/
2.5
*
topBg
.
scaleY
*
2
;
const
backBtn
=
getSprNode
(
"
btn_back
"
);
this
.
homeView
.
addChild
(
backBtn
,
4
);
backBtn
.
scale
=
this
.
topBg
.
scale
;
backBtn
.
y
=
labelNode
.
y
;
backBtn
.
x
=
-
this
.
canvas
.
width
/
2
+
this
.
titleH
/
2
;
backBtn
.
addComponent
(
cc
.
Button
);
backBtn
.
on
(
"
click
"
,
()
=>
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
middleLayer
)
{
middleLayer
.
getComponent
(
'
middleLayer
'
).
exitGame
();
}
})
// this.titleLabel = labelNode.getComponent(cc.Label);
// this.titleLabel = labelNode.getComponent(cc.Label);
// const backBtn = getSprNode("btn_back");
// const backBtn = getSprNode("btn_back");
...
@@ -1185,12 +1206,11 @@ cc.Class({
...
@@ -1185,12 +1206,11 @@ cc.Class({
let
resName
;
let
resName
;
let
curBookData
=
this
.
getCusBookDataByName
(
data
.
text_en
);
let
curBookData
=
this
.
getCusBookDataByName
(
data
.
text_en
);
// if (!data
) {
if
(
!
data
||
!
curBookData
||
!
curBookData
.
res
)
{
resName
=
'
bg_book
'
;
resName
=
'
bg_book
'
;
// } else {
}
else
{
// resName = curBookData.res;
resName
=
curBookData
.
res
;
// }
}
if
(
!
curBookData
)
{
if
(
!
curBookData
)
{
curBookData
=
{
name
:
'
迪格
'
+
data
.
text_en
}
curBookData
=
{
name
:
'
迪格
'
+
data
.
text_en
}
...
@@ -1200,38 +1220,35 @@ cc.Class({
...
@@ -1200,38 +1220,35 @@ cc.Class({
const
book
=
getSprNode
(
resName
);
const
book
=
getSprNode
(
resName
);
node
.
addChild
(
book
);
node
.
addChild
(
book
);
let
labelNode
;
if
(
!
data
||
!
curBookData
||
!
curBookData
.
res
)
{
labelNode
=
this
.
getLabel
(
curBookData
.
name
,
30
);
labelNode
.
x
=
25
;
labelNode
.
y
=
book
.
height
/
4
;
book
.
addChild
(
labelNode
,
2
);
const
labelNode
=
this
.
getLabel
(
curBookData
.
name
,
30
);
const
tempW
=
245
;
labelNode
.
x
=
25
;
const
tempH
=
58
;
labelNode
.
y
=
book
.
height
/
4
;
book
.
addChild
(
labelNode
,
2
);
// const labelBg = getSprNode("white");
delayCall
(
0.01
,
()
=>
{
// labelBg.x = labelNode.x;
console
.
log
(
'
labelNode.width + 20
'
,
(
labelNode
.
width
+
20
));
// labelBg.y = labelNode.y;
console
.
log
(
'
labelNode.height + 20
'
,
(
labelNode
.
height
+
20
));
})
const
labelBg
=
new
cc
.
Node
();
const
ctx
=
labelBg
.
addComponent
(
cc
.
Graphics
);
ctx
.
roundRect
(
-
tempW
/
2
,
-
tempH
/
2
,
tempW
,
tempH
,
tempW
/
18
);
ctx
.
fillColor
=
cc
.
Color
.
WHITE
;
ctx
.
fill
();
labelBg
.
x
=
labelNode
.
x
;
labelBg
.
y
=
labelNode
.
y
;
const
tempW
=
245
;
book
.
addChild
(
labelBg
);
const
tempH
=
58
;
}
// labelBg.scaleX = tempW / labelBg.width;
// labelBg.scaleY = tempH / labelBg.height;
delayCall
(
0.01
,
()
=>
{
// labelBg.scaleX = (labelNode.width + 20) / labelBg.width;
// labelBg.scaleY = (labelNode.height + 20) / labelBg.height;
console
.
log
(
'
labelNode.width + 20
'
,
(
labelNode
.
width
+
20
));
console
.
log
(
'
labelNode.height + 20
'
,
(
labelNode
.
height
+
20
));
})
const
labelBg
=
new
cc
.
Node
();
const
ctx
=
labelBg
.
addComponent
(
cc
.
Graphics
);
ctx
.
roundRect
(
-
tempW
/
2
,
-
tempH
/
2
,
tempW
,
tempH
,
tempW
/
18
);
ctx
.
fillColor
=
cc
.
Color
.
WHITE
;
ctx
.
fill
();
labelBg
.
x
=
labelNode
.
x
;
labelBg
.
y
=
labelNode
.
y
;
book
.
addChild
(
labelBg
);
...
...
assets/dg_dictation_menu/texture/book/dg_1.png
0 → 100644
View file @
9a162863
45.2 KB
assets/dg_dictation_menu/texture/book/dg_1.png.meta
0 → 100644
View file @
9a162863
{
"ver": "2.3.5",
"uuid": "f6d55fa2-f508-442a-a085-37f5b91e44e2",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 383,
"height": 424,
"platformSettings": {},
"subMetas": {
"dg_1": {
"ver": "1.0.4",
"uuid": "595101f4-282d-4bac-bd91-9c111cd07763",
"rawTextureUuid": "f6d55fa2-f508-442a-a085-37f5b91e44e2",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 383,
"height": 424,
"rawWidth": 383,
"rawHeight": 424,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/dg_dictation_menu/texture/book/dg_2.png
0 → 100644
View file @
9a162863
49 KB
assets/dg_dictation_menu/texture/book/dg_2.png.meta
0 → 100644
View file @
9a162863
{
"ver": "2.3.5",
"uuid": "d93a82ff-72e3-4e40-bf84-d62fb8219d32",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 383,
"height": 424,
"platformSettings": {},
"subMetas": {
"dg_2": {
"ver": "1.0.4",
"uuid": "e0219455-e1cf-4932-ab03-12c135195b08",
"rawTextureUuid": "d93a82ff-72e3-4e40-bf84-d62fb8219d32",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 383,
"height": 424,
"rawWidth": 383,
"rawHeight": 424,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/dg_dictation_menu/texture/book/dg_3.png
0 → 100644
View file @
9a162863
42.2 KB
assets/dg_dictation_menu/texture/book/dg_3.png.meta
0 → 100644
View file @
9a162863
{
"ver": "2.3.5",
"uuid": "5f39fd29-aa3b-4639-b053-50471a0e20fb",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 383,
"height": 424,
"platformSettings": {},
"subMetas": {
"dg_3": {
"ver": "1.0.4",
"uuid": "758e96be-d94f-4f17-8e08-c1878ac8dd45",
"rawTextureUuid": "5f39fd29-aa3b-4639-b053-50471a0e20fb",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 383,
"height": 424,
"rawWidth": 383,
"rawHeight": 424,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/dg_dictation_menu/texture/book/dg_4.png
0 → 100644
View file @
9a162863
46.6 KB
assets/dg_dictation_menu/texture/book/dg_4.png.meta
0 → 100644
View file @
9a162863
{
"ver": "2.3.5",
"uuid": "422af4a0-6b4a-449d-ad75-cc7cce480785",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 383,
"height": 424,
"platformSettings": {},
"subMetas": {
"dg_4": {
"ver": "1.0.4",
"uuid": "09b9bee6-6dc4-4d4f-81c9-a3a6b2807ebd",
"rawTextureUuid": "422af4a0-6b4a-449d-ad75-cc7cce480785",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 383,
"height": 424,
"rawWidth": 383,
"rawHeight": 424,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/dg_dictation_menu/texture/book/dg_5.png
0 → 100644
View file @
9a162863
44.3 KB
assets/dg_dictation_menu/texture/book/dg_5.png.meta
0 → 100644
View file @
9a162863
{
"ver": "2.3.5",
"uuid": "bf2ba6de-68b2-4505-8f9a-dc42aaaca8b2",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 383,
"height": 424,
"platformSettings": {},
"subMetas": {
"dg_5": {
"ver": "1.0.4",
"uuid": "d20db597-86a3-4a39-94c6-c4436d6a2bea",
"rawTextureUuid": "bf2ba6de-68b2-4505-8f9a-dc42aaaca8b2",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 383,
"height": 424,
"rawWidth": 383,
"rawHeight": 424,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/dg_dictation_menu/texture/book/dg_6.png
0 → 100644
View file @
9a162863
45.8 KB
assets/dg_dictation_menu/texture/book/dg_6.png.meta
0 → 100644
View file @
9a162863
{
"ver": "2.3.5",
"uuid": "c285dcbc-c85f-4c43-b065-2c46b90fee59",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 383,
"height": 424,
"platformSettings": {},
"subMetas": {
"dg_6": {
"ver": "1.0.4",
"uuid": "282f483b-395d-4c95-9ce5-0cd25a022ae5",
"rawTextureUuid": "c285dcbc-c85f-4c43-b065-2c46b90fee59",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 383,
"height": 424,
"rawWidth": 383,
"rawHeight": 424,
"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