mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 18:55:01 +02:00
use wrapper emitScriptEvent, change to Fetching
This commit is contained in:
parent
e5abd9d57d
commit
f9e25d36e7
2 changed files with 11 additions and 6 deletions
|
@ -2038,11 +2038,15 @@ var PropertiesTool = function (opts) {
|
|||
};
|
||||
|
||||
that.setVisible(false);
|
||||
|
||||
function emitScriptEvent(data) {
|
||||
webView.emitScriptEvent(JSON.stringify(data));
|
||||
createToolsWindow.emitScriptEvent(JSON.stringify(data));
|
||||
}
|
||||
|
||||
function updateScriptStatus(info) {
|
||||
info.type = "server_script_status";
|
||||
webView.emitScriptEvent(JSON.stringify(info));
|
||||
createToolsWindow.emitScriptEvent(JSON.stringify(info));
|
||||
emitScriptEvent(info);
|
||||
}
|
||||
|
||||
function resetScriptStatus() {
|
||||
|
@ -2095,8 +2099,7 @@ var PropertiesTool = function (opts) {
|
|||
}
|
||||
data.selections = selections;
|
||||
|
||||
webView.emitScriptEvent(JSON.stringify(data));
|
||||
createToolsWindow.emitScriptEvent(JSON.stringify(data));
|
||||
emitScriptEvent(data);
|
||||
}
|
||||
selectionManager.addEventListener(updateSelections);
|
||||
|
||||
|
|
|
@ -36,6 +36,8 @@ var lastEntityID = null;
|
|||
|
||||
var MATERIAL_PREFIX_STRING = "mat::";
|
||||
|
||||
var INVALIDATE_SCRIPT_STATUS = "[ Fetching status ]";
|
||||
|
||||
function debugPrint(message) {
|
||||
EventBridge.emitWebEvent(
|
||||
JSON.stringify({
|
||||
|
@ -1671,7 +1673,7 @@ function loaded() {
|
|||
elServerScripts.addEventListener('change', createEmitTextPropertyUpdateFunction('serverScripts'));
|
||||
elServerScripts.addEventListener('change', function() {
|
||||
// invalidate the current status (so that same-same updates can still be observed visually)
|
||||
elServerScriptStatus.innerText = "[ Getting status ]";
|
||||
elServerScriptStatus.innerText = INVALIDATE_SCRIPT_STATUS;
|
||||
});
|
||||
|
||||
elClearUserData.addEventListener("click", function() {
|
||||
|
@ -2145,7 +2147,7 @@ function loaded() {
|
|||
});
|
||||
elReloadServerScriptsButton.addEventListener("click", function() {
|
||||
// invalidate the current status (so that same-same updates can still be observed visually)
|
||||
elServerScriptStatus.innerText = "[ Getting status ]";
|
||||
elServerScriptStatus.innerText = INVALIDATE_SCRIPT_STATUS;
|
||||
EventBridge.emitWebEvent(JSON.stringify({
|
||||
type: "action",
|
||||
action: "reloadServerScripts"
|
||||
|
|
Loading…
Reference in a new issue