Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
44b8b0e6
Commit
44b8b0e6
authored
May 15, 2019
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Web: Added DynEmitSignal
parent
c152cda4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
0 deletions
+62
-0
java/jsw/ge/src/ge_dyn.ts
java/jsw/ge/src/ge_dyn.ts
+62
-0
No files found.
java/jsw/ge/src/ge_dyn.ts
View file @
44b8b0e6
...
@@ -8969,6 +8969,68 @@ class DynCatchSignal extends DynElem {
...
@@ -8969,6 +8969,68 @@ class DynCatchSignal extends DynElem {
}
}
}
}
class
DynEmitSignal
extends
DynElem
{
signal_name
=
""
;
global
=
0
;
constructor
(
dyn
)
{
super
(
dyn
,
DynPrio
.
EmitSignal
);
this
.
action_type1
=
ActionType1
.
EmitSignal
;
}
action
(
object
,
e
)
{
if
(
!
this
.
dyn
.
graph
.
isAuthorized
(
this
.
dyn
.
access
))
{
return
1
;
}
switch
(
e
.
event
)
{
case
Event
.
MB1Down
:
object
.
setColorInverse
(
1
);
break
;
case
Event
.
MB1Up
:
object
.
setColorInverse
(
0
);
break
;
case
Event
.
Key_Return
:
case
Event
.
MB1Click
:
if
(
this
.
global
)
{
let
command
=
"
emit signal/signalname=
"
+
this
.
signal_name
;
let
cmd
=
this
.
dyn
.
graph
.
getCommand
(
command
);
this
.
dyn
.
graph
.
command
(
cmd
);
}
else
{
//TODO:
//this.dyn.graph.signalSend(this.signal_name);
}
}
return
1
;
}
open
(
lines
,
row
)
{
let
i
;
for
(
i
=
row
;
i
<
lines
.
length
;
i
++
)
{
let
tokens
=
lines
[
i
].
split
(
'
'
);
let
key
=
parseInt
(
tokens
[
0
],
10
);
switch
(
key
)
{
case
DynSave
.
EmitSignal
:
break
;
case
DynSave
.
EmitSignal_signal_name
:
this
.
signal_name
=
tokens
[
1
];
break
;
case
DynSave
.
EmitSignal_global
:
this
.
global
=
Number
(
tokens
[
1
]);
case
DynSave
.
End
:
return
i
;
default
:
console
.
log
(
"
Syntax error in DynEmitSignal
"
);
break
;
}
}
return
i
;
}
}
class
DynPopupMenu
extends
DynElem
{
class
DynPopupMenu
extends
DynElem
{
ref_object
;
ref_object
;
...
...
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