mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 11:17:32 +02:00
Reinstate "reload" button for entity scripts in entities editor
This commit is contained in:
parent
96445f4dee
commit
c6558ebebd
2 changed files with 2 additions and 22 deletions
|
@ -312,15 +312,11 @@
|
||||||
<input type="number" id="property-lifetime">
|
<input type="number" id="property-lifetime">
|
||||||
</div>
|
</div>
|
||||||
<hr class="behavior-group" />
|
<hr class="behavior-group" />
|
||||||
<div class="behavior-group property url ">
|
<div class="behavior-group property url refresh">
|
||||||
<!--
|
|
||||||
FIXME: If reload buttons at the end of each URL continue to work OK during beta, this reload button and associated
|
|
||||||
code should be removed.
|
|
||||||
<input type="hidden" id="property-script-timestamp" class="value">
|
<input type="hidden" id="property-script-timestamp" class="value">
|
||||||
<input type="button" id="reload-script-button" value="Reload">
|
|
||||||
-->
|
|
||||||
<label for="property-script-url">Script URL</label>
|
<label for="property-script-url">Script URL</label>
|
||||||
<input type="text" id="property-script-url">
|
<input type="text" id="property-script-url">
|
||||||
|
<input type="button" id="reload-script-button" class="glyph" value="F">
|
||||||
</div>
|
</div>
|
||||||
<div class="section-header model-group model-section zone-section">
|
<div class="section-header model-group model-section zone-section">
|
||||||
<label>Model</label><span>M</span>
|
<label>Model</label><span>M</span>
|
||||||
|
|
|
@ -591,10 +591,7 @@ function loaded() {
|
||||||
|
|
||||||
var elLifetime = document.getElementById("property-lifetime");
|
var elLifetime = document.getElementById("property-lifetime");
|
||||||
var elScriptURL = document.getElementById("property-script-url");
|
var elScriptURL = document.getElementById("property-script-url");
|
||||||
/*
|
|
||||||
FIXME: See FIXME for property-script-url.
|
|
||||||
var elScriptTimestamp = document.getElementById("property-script-timestamp");
|
var elScriptTimestamp = document.getElementById("property-script-timestamp");
|
||||||
*/
|
|
||||||
var elReloadScriptButton = document.getElementById("reload-script-button");
|
var elReloadScriptButton = document.getElementById("reload-script-button");
|
||||||
var elUserData = document.getElementById("property-user-data");
|
var elUserData = document.getElementById("property-user-data");
|
||||||
var elClearUserData = document.getElementById("userdata-clear");
|
var elClearUserData = document.getElementById("userdata-clear");
|
||||||
|
@ -851,10 +848,7 @@ function loaded() {
|
||||||
elCollisionSoundURL.value = properties.collisionSoundURL;
|
elCollisionSoundURL.value = properties.collisionSoundURL;
|
||||||
elLifetime.value = properties.lifetime;
|
elLifetime.value = properties.lifetime;
|
||||||
elScriptURL.value = properties.script;
|
elScriptURL.value = properties.script;
|
||||||
/*
|
|
||||||
FIXME: See FIXME for property-script-url.
|
|
||||||
elScriptTimestamp.value = properties.scriptTimestamp;
|
elScriptTimestamp.value = properties.scriptTimestamp;
|
||||||
*/
|
|
||||||
|
|
||||||
var json = null;
|
var json = null;
|
||||||
try {
|
try {
|
||||||
|
@ -1150,11 +1144,7 @@ function loaded() {
|
||||||
|
|
||||||
elLifetime.addEventListener('change', createEmitNumberPropertyUpdateFunction('lifetime'));
|
elLifetime.addEventListener('change', createEmitNumberPropertyUpdateFunction('lifetime'));
|
||||||
elScriptURL.addEventListener('change', createEmitTextPropertyUpdateFunction('script'));
|
elScriptURL.addEventListener('change', createEmitTextPropertyUpdateFunction('script'));
|
||||||
/*
|
|
||||||
FIXME: See FIXME for property-script-url.
|
|
||||||
elScriptTimestamp.addEventListener('change', createEmitNumberPropertyUpdateFunction('scriptTimestamp'));
|
elScriptTimestamp.addEventListener('change', createEmitNumberPropertyUpdateFunction('scriptTimestamp'));
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
elClearUserData.addEventListener("click", function() {
|
elClearUserData.addEventListener("click", function() {
|
||||||
deleteJSONEditor();
|
deleteJSONEditor();
|
||||||
|
@ -1171,11 +1161,8 @@ function loaded() {
|
||||||
properties: properties,
|
properties: properties,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
elSaveUserData.addEventListener("click", function() {
|
elSaveUserData.addEventListener("click", function() {
|
||||||
saveJSONUserData(true);
|
saveJSONUserData(true);
|
||||||
});
|
});
|
||||||
|
@ -1410,15 +1397,12 @@ function loaded() {
|
||||||
percentage: parseInt(elRescaleDimensionsPct.value),
|
percentage: parseInt(elRescaleDimensionsPct.value),
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
/*
|
|
||||||
FIXME: See FIXME for property-script-url.
|
|
||||||
elReloadScriptButton.addEventListener("click", function() {
|
elReloadScriptButton.addEventListener("click", function() {
|
||||||
EventBridge.emitWebEvent(JSON.stringify({
|
EventBridge.emitWebEvent(JSON.stringify({
|
||||||
type: "action",
|
type: "action",
|
||||||
action: "reloadScript"
|
action: "reloadScript"
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
||||||
window.onblur = function() {
|
window.onblur = function() {
|
||||||
// Fake a change event
|
// Fake a change event
|
||||||
|
|
Loading…
Reference in a new issue