showIf/hideIf for a whole LayoutStart possible?
Closed this issue · 2 comments
hungin commented
Is it somehow possible show or hide a whole LayoutStart Group, at the moment I can only hide the vars in the group leaving a empty group.
TylerTemp commented
Hi,
this is a in-plan feature, see #73. For more plans, see the current milestone
TylerTemp commented
Hi,
this feature has been implemented in 3.7.0
using SaintsField.Playa;
public bool editableMain;
public bool visibleMain;
[LayoutEnableIf(nameof(editableMain))]
[LayoutShowIf(nameof(visibleMain))]
[LayoutStart("Main", ELayout.FoldoutBox)]
public bool editable1;
public bool visible1;
[LayoutEnableIf(nameof(editable1))]
[LayoutShowIf(nameof(visible1))]
[LayoutStart("./1", ELayout.FoldoutBox, marginBottom: 10)]
public int int1;
public string string1;
[LayoutStart("..", ELayout.FoldoutBox)]
public bool editable2;
public bool visible2;
[LayoutEnableIf(nameof(editable2))]
[LayoutShowIf(nameof(visible2))]
[LayoutStart("./2", ELayout.FoldoutBox)]
public int int2;
public string string2;