Add toggles to Gui surface for demo
This commit is contained in:
parent
c7e76e1996
commit
2d1c6a560a
3 changed files with 26 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue