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
e661981b
Commit
e661981b
authored
May 10, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加绘图按钮位置可配置
parent
3215a93b
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
2325 additions
and
1860 deletions
+2325
-1860
DrawingBoard.prefab
assets/DG_FAF/prefabs/DrawingBoard/DrawingBoard.prefab
+323
-141
DrawingBoard_DG_FAF.ts
assets/DG_FAF/prefabs/DrawingBoard/DrawingBoard_DG_FAF.ts
+25
-5
DG_FAF.fire
assets/DG_FAF/scene/DG_FAF.fire
+500
-318
DG_FAF.ts
assets/DG_FAF/scene/DG_FAF.ts
+4
-0
main-es2015.js
form/main-es2015.js
+502
-480
main-es2015.js.map
form/main-es2015.js.map
+1
-1
main-es5.js
form/main-es5.js
+963
-914
main-es5.js.map
form/main-es5.js.map
+1
-1
form.component.html
form_angular/src/app/form/form.component.html
+5
-0
form.component.ts
form_angular/src/app/form/form.component.ts
+1
-0
No files found.
assets/DG_FAF/prefabs/DrawingBoard/DrawingBoard.prefab
View file @
e661981b
This diff is collapsed.
Click to expand it.
assets/DG_FAF/prefabs/DrawingBoard/DrawingBoard_DG_FAF.ts
View file @
e661981b
...
...
@@ -64,8 +64,8 @@ export default class DrawingBoard extends cc.Component {
// @property(cc.Label)
// label: cc.Label = null;
//
@property
// text: string = 'hello'
;
@
property
painterOnCenter
:
boolean
=
false
;
// LIFE-CYCLE CALLBACKS:
...
...
@@ -141,7 +141,18 @@ export default class DrawingBoard extends cc.Component {
bgPalette
.
active
=
false
;
})
const
painterBtn
=
cc
.
find
(
"
btnStartPaint
"
,
this
.
node
)
const
painterBtnTop
=
cc
.
find
(
"
ToolBox/Painter
"
,
this
.
node
)
const
painterBtnCenter
=
cc
.
find
(
"
btnStartPaint
"
,
this
.
node
)
let
painterBtn
=
null
;
if
(
this
.
painterOnCenter
)
{
painterBtn
=
painterBtnCenter
;
painterBtnTop
.
active
=
false
;
}
else
{
painterBtn
=
painterBtnTop
;
painterBtnCenter
.
active
=
false
;
}
painterBtn
.
on
(
"
click
"
,
()
=>
{
eraserBtn
.
active
=
true
;
// 显示橡皮按钮
painterBtn
.
active
=
false
;
// 隐藏画笔按钮
...
...
@@ -218,8 +229,17 @@ export default class DrawingBoard extends cc.Component {
}
initEventListener
()
{
const
toolBox
=
cc
.
find
(
"
ToolBox
"
,
this
.
node
)
const
painterBtn
=
cc
.
find
(
"
btnStartPaint
"
,
this
.
node
)
const
toolBox
=
cc
.
find
(
"
ToolBox
"
,
this
.
node
);
const
painterBtnTop
=
cc
.
find
(
"
ToolBox/Painter
"
,
this
.
node
)
const
painterBtnCenter
=
cc
.
find
(
"
btnStartPaint
"
,
this
.
node
)
let
painterBtn
=
null
;
if
(
this
.
painterOnCenter
)
{
painterBtn
=
painterBtnCenter
;
}
else
{
painterBtn
=
painterBtnTop
;
}
this
.
node
.
on
(
"
enable
"
,
()
=>
{
toolBox
.
active
=
true
;
painterBtn
.
active
=
true
;
...
...
assets/DG_FAF/scene/DG_FAF.fire
View file @
e661981b
This diff is collapsed.
Click to expand it.
assets/DG_FAF/scene/DG_FAF.ts
View file @
e661981b
...
...
@@ -3125,6 +3125,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
setDrawingArea
(
contentData
,
hotZoneItemData
,
debugMode
=
false
)
{
const
rect
=
this
.
newRectNode
(
hotZoneItemData
,
layer_4
,
debugMode
);
const
drawingBoard
=
cc
.
instantiate
(
this
.
drawingBoardTemplate
);
const
dbJS
=
drawingBoard
.
getComponent
(
"
DrawingBoard_DG_FAF
"
)
dbJS
.
painterOnCenter
=
contentData
.
painterOnCenter
?
true
:
false
;
const
uid
=
getUUID
();
drawingBoard
.
uid
=
uid
;
this
.
allDrawingBoards
.
push
(
drawingBoard
);
...
...
@@ -3163,6 +3165,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
setDrawingAreaWithCheck
(
contentData
,
hotZoneItemData
,
debugMode
=
false
)
{
const
rect
=
this
.
newRectNode
(
hotZoneItemData
,
layer_4
,
debugMode
);
const
drawingBoard
=
cc
.
instantiate
(
this
.
drawingBoardTemplate
);
const
dbJS
=
drawingBoard
.
getComponent
(
"
DrawingBoard_DG_FAF
"
)
dbJS
.
painterOnCenter
=
contentData
.
painterOnCenter
?
true
:
false
;
const
uid
=
getUUID
();
drawingBoard
.
uid
=
uid
;
this
.
allDrawingBoards
.
push
(
drawingBoard
);
...
...
form/main-es2015.js
View file @
e661981b
This diff is collapsed.
Click to expand it.
form/main-es2015.js.map
View file @
e661981b
This diff is collapsed.
Click to expand it.
form/main-es5.js
View file @
e661981b
This diff is collapsed.
Click to expand it.
form/main-es5.js.map
View file @
e661981b
This diff is collapsed.
Click to expand it.
form_angular/src/app/form/form.component.html
View file @
e661981b
...
...
@@ -610,6 +610,11 @@
<label
nz-checkbox
[(
ngModel
)]="
it
.
drawingCheckStrictEqual
"
(
ngModelChange
)="
save
()"
style=
"margin-left: 10px;"
>
颜色严格相等
</label>
</div>
<div
*
ngIf=
"it.hotZoneType == DRAWING || it.hotZoneType == DRAWING_CHECK"
style=
"margin: 10px 10px;"
>
<span
style=
"display: inline-block; text-align: right; width: 150px;"
>
绘图按钮在中间:
</span>
<label
nz-checkbox
[(
ngModel
)]="
it
.
painterOnCenter
"
(
ngModelChange
)="
save
()"
style=
"margin-left: 10px;"
></label>
</div>
<div
*
ngIf=
"it.hotZoneType != '' && it.hotZoneType != CROSSWORD_PUZZLE && it.hotZoneType != HOT_ZONE_RADIO && it.hotZoneType != HOT_ZONE_CHECKBOX && it.hotZoneType != CONNECTION && it.hotZoneType != CONNECTION_2LEVEL && it.hotZoneType != TEXT_SELECT && it.hotZoneType != MULTIPLE_TEXT_SELECT && it.hotZoneType != RIGHT_OR_WRONG && it.hotZoneType != TEXTINPUT_GROUP"
style=
"margin: 10px 10px;"
>
<span
style=
"display: inline-block; text-align: right; width: 150px;"
>
关联热区:
</span>
<nz-select
nzShowSearch
nzAllowClear
[(
ngModel
)]="
it
.
linkHotZoneIndex
"
style=
"width: 300px;"
(
ngModelChange
)="
save
()"
>
...
...
form_angular/src/app/form/form.component.ts
View file @
e661981b
...
...
@@ -275,6 +275,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
drawingCheckCorrectColors
:
[],
// 正确颜色 [评分画图题]
drawingCheckStrictEqual
:
false
,
// 严格相等 [评分画图题]
painterOnCenter
:
false
,
// 开启绘图按钮在绘画区中间 [评分画图题、画图题]
}
}
...
...
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