| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a look at jongwares JavaScript Reference Guide here --> written for this stackoverflow
var win = new Window("dialog"); // Build a dialog
/**
* First argument: the UI resource
* Second: the size. If it is undefined it will be calculated
* by the size of the text
* Third: the text that appears on the button
*/
win.button = win.add("button", undefined, "Button");
/**
* now add the event listener to the action 'click' and pass 'k'
* as the pressed keys
*/
win.button.addEventListener("click", function (k) {
if (k.shiftKey) {
alert("foo"); // shift is clicked
} else {
alert("bah"); // now its not
}
});
win.show(); // show the dialogThis wiki is mostly maintained by:
ff6347
Thanks to:
Thanks to the students from my seminars for asking all those questions and making me start this wiki.
You are awesome.
| Back | FazBrowse Home | New Git URL |