Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jonathan Wilkes
purr-data
Commits
467dd844
Commit
467dd844
authored
May 27, 2021
by
Prakhar Agarwal
🎯
Browse files
added message send via dialog
parent
6b1d99cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
emscripten/project/purr-data/index.html
View file @
467dd844
...
...
@@ -61,7 +61,7 @@
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-secondary"
data-dismiss=
"modal"
>
Close
</button>
<button
type=
"button"
class=
"btn btn-primary"
>
Send message
</button>
<button
type=
"button"
id=
"send-message-btn"
class=
"btn btn-primary"
>
Send message
</button>
</div>
</div>
</div>
...
...
pd/nw/pdgui.js
View file @
467dd844
...
...
@@ -1191,7 +1191,16 @@ function gui_quit_dialog() {
function
menu_send
(
name
)
{
var
message
,
win
=
name
?
patchwin
[
name
]
:
pd_window
;
message
=
win
.
window
.
prompt
(
"
Type a message to send to Pd
"
,
name
);
if
(
name
)
{
$
(
"
#pd-option
"
).
prop
(
"
checked
"
,
true
);
}
else
{
$
(
"
#canvas-option
"
).
prop
(
"
checked
"
,
true
);
}
$
(
"
#message-modal
"
).
modal
(
"
show
"
);
$
(
"
#send-message-btn
"
).
click
(
function
()
{
message
=
$
(
"
#message-text
"
).
val
();
$
(
"
#message-modal
"
).
modal
(
"
hide
"
);
});
if
(
message
!=
undefined
&&
message
.
length
)
{
post
(
"
Sending message to Pd:
"
+
message
+
"
;
"
);
pdsend
(
message
);
...
...
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