Move displace strength to preferences

This commit is contained in:
Lubos Lenco
2020-06-01 17:03:38 +02:00
parent b61a0f7221
commit ef0a9b07a0
2 changed files with 8 additions and 8 deletions
+7
View File
@@ -360,6 +360,13 @@ class BoxPreferences {
cam.buildProjection();
}
var dispHandle = Id.handle({value: Context.displaceStrength});
Context.displaceStrength = ui.slider(dispHandle, tr("Displace"), 0.0, 10.0, true);
if (dispHandle.changed) {
Context.ddirty = 2;
MaterialParser.parseMeshMaterial();
}
#if arm_creator
var h = Id.handle({value: Context.vxaoExt});
Context.vxaoExt = ui.slider(h, tr("VXAO Ext"), 1.0, 10.0);
+1 -8
View File
@@ -53,7 +53,7 @@ class UIMenu {
menuCommands(ui);
}
else {
var menuItems = [14, 3, 14, #if kha_direct3d12 13 #else 12 #end, 17, 5];
var menuItems = [14, 3, 13, #if kha_direct3d12 13 #else 12 #end, 17, 5];
var sepw = menuW / ui.SCALE();
g.color = ui.t.SEPARATOR_COL;
g.fillRect(menuX, menuY, menuW, 28 * menuItems[menuCategory] * ui.SCALE());
@@ -145,13 +145,6 @@ class UIMenu {
if (sxhandle.changed) Context.ddirty = 2;
}
var dispHandle = Id.handle({value: Context.displaceStrength});
ui.row([1 / 8, 7 / 8]); ui.endElement();
Context.displaceStrength = ui.slider(dispHandle, tr("Displace"), 0.0, 2.0, true);
if (dispHandle.changed) {
MaterialParser.parseMeshMaterial();
}
var splitViewHandle = Id.handle({selected: Context.splitView});
Context.splitView = ui.check(splitViewHandle, " " + tr("Split View"));
if (splitViewHandle.changed) {