mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 02:36:32 +01:00
Options button: toggle the options window visibility
This commit is contained in:
parent
67d3f6650e
commit
7d62973d18
1 changed files with 15 additions and 1 deletions
|
|
@ -86,6 +86,20 @@ function openPopup(dialogname, content) {
|
|||
dialog.show();
|
||||
}
|
||||
|
||||
function closePopup(dialogname) {
|
||||
var dialog = $(dialogname);
|
||||
dialog.hide();
|
||||
}
|
||||
|
||||
function togglePopup(dialogname, content) {
|
||||
var dialog = $(dialogname);
|
||||
if (dialog.css('display') == 'none') {
|
||||
openPopup(dialogname, content);
|
||||
} else {
|
||||
closePopup(dialogname);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// GUI Event Handlers
|
||||
//
|
||||
|
|
@ -130,7 +144,7 @@ function doOpenOptions() {
|
|||
return;
|
||||
}
|
||||
|
||||
openPopup("#optionsdialog");
|
||||
togglePopup("#optionsdialog");
|
||||
}
|
||||
|
||||
// Closes the currently open dialog
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue