Add item Drawables to menu
This commit is contained in:
parent
e9b79e1099
commit
330aba83f7
2 changed files with 18 additions and 0 deletions
|
|
@ -96,6 +96,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
public IEnumerable<IDrawable> Drawables => drawables;
|
||||
|
||||
public IEnumerable<IDrawableItem> ItemDrawables => itemDrawables;
|
||||
|
||||
internal void SetRenderTarget(GuiWidget renderSource)
|
||||
{
|
||||
this.renderSource = renderSource;
|
||||
|
|
|
|||
|
|
@ -160,6 +160,22 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
row.AddChild(toggleSwitch);
|
||||
}
|
||||
|
||||
foreach (var drawable in ApplicationController.Instance.DragDropData.View3DWidget.InteractionLayer.ItemDrawables)
|
||||
{
|
||||
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