Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DG_FAF
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_FAF
Commits
81ce15f6
Commit
81ce15f6
authored
Jul 12, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加单词排序历史记录显示
parent
cba2428d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
855 additions
and
1336 deletions
+855
-1336
DG_FAF.ts
assets/DG_FAF/scene/DG_FAF.ts
+43
-0
defaultData_DG_FAF.ts
assets/DG_FAF/script/defaultData_DG_FAF.ts
+1
-1
historyData_DG_FAF.ts
assets/DG_FAF/script/historyData_DG_FAF.ts
+811
-1335
No files found.
assets/DG_FAF/scene/DG_FAF.ts
View file @
81ce15f6
...
...
@@ -863,6 +863,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
case
CROSSWORD_PUZZLE
:
this
.
showCrosswordPuzzleInput
(
configItem
,
resultData
);
break
;
// 文字排序
case
SORT_WORDS
:
this
.
showSortWords
(
configItem
,
resultData
);
break
;
}
})
...
...
@@ -1375,6 +1379,45 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
// 单词排序 - 历史记录
showSortWords
(
configItem
,
resultData
)
{
const
debugMode
=
false
;
const
hotZoneItemData
=
this
.
data
.
hotZoneItemArr
[
configItem
.
linkHotZoneIndex
];
// 该题型需要配置一个显示正确错误符号的热区
const
resultIconShowData
=
this
.
data
.
hotZoneItemArr
[
configItem
.
linkResultShowHotZoneIndex
];
const
resultIconRect
=
this
.
newRectNode
(
resultIconShowData
,
layer_2
,
debugMode
);
this
.
newDecorativeFrame
(
hotZoneItemData
,
layer_1
,
"
#FFFFFF
"
,
"
#6dbef6
"
,
debugMode
);
const
rect
=
this
.
newRectNode
(
hotZoneItemData
,
layer_4
,
debugMode
);
const
textArr
=
[]
resultData
[
0
].
sortedList
.
forEach
(
item
=>
{
textArr
.
push
(
item
.
option
.
word
)
});
const
text
=
textArr
.
join
(
"
"
);
const
inputLabel
=
this
.
newInputTextNode
(
text
,
0
);
inputLabel
.
x
=
rect
.
width
/
2
;
inputLabel
.
y
=
rect
.
height
/
2
;
rect
.
addChild
(
inputLabel
);
// 对错号
const
errIcon
=
getSprNode
(
"
icon_answer_wrong
"
);
const
rightIcon
=
getSprNode
(
"
icon_answer_right
"
);
// 图标太大 缩小一半
errIcon
.
scale
=
rightIcon
.
scale
=
0.5
;
// 显示在热区的中间
errIcon
.
x
=
rightIcon
.
x
=
resultIconRect
.
width
/
2
;
errIcon
.
y
=
rightIcon
.
y
=
resultIconRect
.
height
/
2
;
if
(
resultData
[
0
].
right
)
{
resultIconRect
.
addChild
(
rightIcon
);
}
else
{
resultIconRect
.
addChild
(
errIcon
);
}
}
// 初始化分数牌
subScorePanels
=
[];
totalScorePanel
=
null
;
...
...
assets/DG_FAF/script/defaultData_DG_FAF.ts
View file @
81ce15f6
This diff is collapsed.
Click to expand it.
assets/DG_FAF/script/historyData_DG_FAF.ts
View file @
81ce15f6
This diff is collapsed.
Click to expand it.
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