mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 10:06:57 +02:00
add a setting section for voxel costs
This commit is contained in:
parent
70c8ddf961
commit
1a13fbb437
2 changed files with 32 additions and 6 deletions
|
@ -16,5 +16,25 @@
|
||||||
"default": false
|
"default": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"voxels": {
|
||||||
|
"label": "Voxels",
|
||||||
|
"assignment-types": [3],
|
||||||
|
"settings": {
|
||||||
|
"per-voxel-cost": {
|
||||||
|
"label": "Per Voxel Cost",
|
||||||
|
"help": "Credit cost to change each voxel",
|
||||||
|
"placeholder": "0.00001",
|
||||||
|
"default": "0.00001",
|
||||||
|
"input_addon": "₵"
|
||||||
|
},
|
||||||
|
"volume-cost": {
|
||||||
|
"label": "Volume Cost",
|
||||||
|
"help": "Credit cost to change each cubed meter of voxel space",
|
||||||
|
"placeholder": "0.0005",
|
||||||
|
"default": "0.0005",
|
||||||
|
"input_addon": "₵"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -16,16 +16,22 @@
|
||||||
<% var setting_id = group_key + "." + setting_key %>
|
<% var setting_id = group_key + "." + setting_key %>
|
||||||
<label for="<%- setting_id %>" class="col-sm-2 control-label"><%- setting.label %></label>
|
<label for="<%- setting_id %>" class="col-sm-2 control-label"><%- setting.label %></label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<% if(setting.type) %>
|
|
||||||
<% if (setting.type === "checkbox") { %>
|
<% if (setting.type === "checkbox") { %>
|
||||||
<% var checked_box = (values[group_key] || {})[setting_key] || setting.default %>
|
<% var checked_box = (values[group_key] || {})[setting_key] || setting.default %>
|
||||||
<input type="checkbox" id="<%- setting_id %>" <%- checked_box ? "checked" : "" %>>
|
<input type="checkbox" id="<%- setting_id %>" <%- checked_box ? "checked" : "" %>>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
|
<% if (setting.input_addon) { %>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-addon"><%- setting.input_addon %></div>
|
||||||
|
<% } %>
|
||||||
<input type="text" class="form-control" id="<%- setting_id %>"
|
<input type="text" class="form-control" id="<%- setting_id %>"
|
||||||
placeholder="<%- setting.placeholder %>"
|
placeholder="<%- setting.placeholder %>"
|
||||||
value="<%- (values[group_key] || {})[setting_key] %>">
|
value="<%- (values[group_key] || {})[setting_key] %>">
|
||||||
<% } %>
|
|
||||||
|
|
||||||
|
<% if (setting.input_addon) { %>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block col-sm-offset-2 col-sm-10"><%- setting.help %></p>
|
<p class="help-block col-sm-offset-2 col-sm-10"><%- setting.help %></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue