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
nerrons
purr-data
Commits
96b0bac3
Commit
96b0bac3
authored
Jul 24, 2015
by
Jonathan Wilkes
Browse files
abstracted out iemgui dialog bindings into generic dialog_bindings
parent
c0c5b4ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
pd/nw/dialog_iemgui.html
View file @
96b0bac3
...
...
@@ -572,13 +572,7 @@ function add_events(name) {
pdgui
.
remove_dialogwin
(
pd_object_callback
);
this
.
close
(
true
);
});
document
.
onkeydown
=
function
(
evt
)
{
if
(
evt
.
keyCode
===
13
)
{
// enter
ok
();
}
else
if
(
evt
.
keyCode
===
27
)
{
// escape
cancel
();
}
};
pdgui
.
dialog_bindings
(
name
);
}
</script>
...
...
pd/nw/pdgui.js
View file @
96b0bac3
...
...
@@ -3894,3 +3894,15 @@ function gui_find_lowest_and_arrange(cid, reference_element_tag, objtag) {
}
}
}
// Bindings for dialog menu of iemgui, canvas, etc.
exports
.
dialog_bindings
=
function
(
did
)
{
var
dwin
=
dialogwin
[
did
].
window
;
dwin
.
document
.
onkeydown
=
function
(
evt
)
{
if
(
evt
.
keyCode
===
13
)
{
// enter
dwin
.
ok
();
}
else
if
(
evt
.
keyCode
===
27
)
{
// escape
dwin
.
cancel
();
}
};
}
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