Add toggles to Gui surface for demo

This commit is contained in:
John Lewin 2019-02-01 12:45:04 -08:00
parent c7e76e1996
commit 2d1c6a560a
3 changed files with 26 additions and 2 deletions

View file

@ -144,6 +144,22 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
subPanel.AddChild(advancedRow);
}
foreach(var drawable in ApplicationController.Instance.DragDropData.View3DWidget.InteractionLayer.Drawables)
{
var row = new SettingsRow(drawable.Title, drawable.Description, theme);
subPanel.AddChild(row);
var toggleSwitch = new RoundedToggleSwitch(theme)
{
Checked = drawable.Enabled
};
toggleSwitch.CheckedStateChanged += (s, e) =>
{
drawable.Enabled = toggleSwitch.Checked;
};
row.AddChild(toggleSwitch);
}
menuTheme.ApplyBoxStyle(sectionWidget);
sectionWidget.Margin = new BorderDouble(0, 10);