mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-08-08 05:26:57 +02:00
Added event for dropdown property (work in progress)
This commit is contained in:
parent
55347d2a97
commit
cfd7b867ed
1 changed files with 17 additions and 1 deletions
|
@ -1340,6 +1340,14 @@ const GROUPS = [
|
||||||
unit: "",
|
unit: "",
|
||||||
propertyID: "voxelVolumeSize",
|
propertyID: "voxelVolumeSize",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Texture preset",
|
||||||
|
type: "dropdown",
|
||||||
|
options: { 0 : "None", 1 : "Grass + ground", 2 : "Bricks", 3 : "Stone",
|
||||||
|
4: "Concrete", 5 : "Rock"},
|
||||||
|
propertyID: "polyVoxPreset",
|
||||||
|
onDropdownChange: polyVoxPresetChanged,
|
||||||
|
},
|
||||||
/*{
|
/*{
|
||||||
label: "Surface Style",
|
label: "Surface Style",
|
||||||
type: "dropdown",
|
type: "dropdown",
|
||||||
|
@ -2488,7 +2496,8 @@ function createStringProperty(property, elProperty) {
|
||||||
|
|
||||||
|
|
||||||
elInput.addEventListener('change', createEmitTextPropertyUpdateFunction(property));
|
elInput.addEventListener('change', createEmitTextPropertyUpdateFunction(property));
|
||||||
if (propertyData.onChange !== undefined) {
|
if (propertyData.
|
||||||
|
onChange !== undefined) {
|
||||||
elInput.addEventListener('change', propertyData.onChange);
|
elInput.addEventListener('change', propertyData.onChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2922,6 +2931,10 @@ function createDropdownProperty(property, propertyID, elProperty) {
|
||||||
}
|
}
|
||||||
|
|
||||||
elInput.addEventListener('change', createEmitTextPropertyUpdateFunction(property));
|
elInput.addEventListener('change', createEmitTextPropertyUpdateFunction(property));
|
||||||
|
if (propertyData.
|
||||||
|
onDropdownChange !== undefined) {
|
||||||
|
elInput.addEventListener('change', propertyData.onDropdownChange(property));
|
||||||
|
}
|
||||||
|
|
||||||
elProperty.appendChild(elInput);
|
elProperty.appendChild(elInput);
|
||||||
|
|
||||||
|
@ -3239,6 +3252,9 @@ function parentIDChanged() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function polyVoxPresetChanged() {
|
||||||
|
alert('PolyVox preset');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BUTTON CALLBACKS
|
* BUTTON CALLBACKS
|
||||||
|
|
Loading…
Reference in a new issue