diff --git a/src/gui/storyCaption.tw b/src/gui/storyCaption.tw index 3b76ccb2d5f93bcde51dde4ef0a6017274580c86..85d5e5f4667a2ae9070406f4e3e423c9fc7c2e09 100644 --- a/src/gui/storyCaption.tw +++ b/src/gui/storyCaption.tw @@ -2,7 +2,7 @@ <<set _Pass = passage()>> -<<if $ui != "start">><p><<includeDOM userButton()>></p><</if>> +<<if $ui != "start">><p><<includeDOM App.Utils.userButton()>></p><</if>> <<if $ui != "start">> <<if $cheatMode || $debugMode>> diff --git a/src/gui/userButton.js b/src/gui/userButton.js index f3cfd3caf59d88f551d544bc9e64b7e3aa33c473..0c8cf11d416de2f83b950d4cc7650cd3bb5bcfad 100644 --- a/src/gui/userButton.js +++ b/src/gui/userButton.js @@ -1,4 +1,4 @@ -globalThis.userButton = function(nextButton = V.nextButton, nextLink = V.nextLink) { +App.Utils.userButton = function(nextButton = V.nextButton, nextLink = V.nextLink) { const el = document.createElement("span"); el.id = "next-button-wrapper"; // We must always have a named element so we have something to refresh even if the button is hidden for a scene const pass = passage(); @@ -35,6 +35,6 @@ globalThis.userButton = function(nextButton = V.nextButton, nextLink = V.nextLin return el; }; -globalThis.updateUserButton = function() { - return jQuery("#next-button-wrapper").empty().append(userButton()); +App.Utils.updateUserButton = function() { + return jQuery("#next-button-wrapper").empty().append(App.Utils.userButton()); }; diff --git a/src/utility/miscWidgets.tw b/src/utility/miscWidgets.tw index 9d0a63faeb61734ae5cf69a273f653cd7dbdedba..dccc305675c48392122a7d9c3f06f8c4e5181ca4 100644 --- a/src/utility/miscWidgets.tw +++ b/src/utility/miscWidgets.tw @@ -7,7 +7,7 @@ Call as <<UpdateNextButton>> Allows for dynamic updating of the next button in the storyCaption (left side-bar) for events that disable the button until user makes a selection %/ <<widget "UpdateNextButton">> - <<run updateUserButton()>> + <<run App.Utils.updateUserButton()>> <</widget>> <<widget "Master">><<if def $args[0]>><<run Enunciate($args[0])>><<elseif ndef $enunciate>><<run Enunciate($activeSlave)>><</if>>$enunciate.title<</widget>>