mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-12 23:48:59 +08:00
feat: allow multi-edit of "Is Default" when parameter names are empty
This commit is contained in:
parent
ef0beec8ed
commit
98a8c4a947
@ -516,7 +516,12 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
// But, we do want to see if _any_ are default.
|
// But, we do want to see if _any_ are default.
|
||||||
var anyIsDefault = _prop_isDefault.hasMultipleDifferentValues || _prop_isDefault.boolValue;
|
var anyIsDefault = _prop_isDefault.hasMultipleDifferentValues || _prop_isDefault.boolValue;
|
||||||
var mixedIsDefault = multipleSelections && anyIsDefault;
|
var mixedIsDefault = multipleSelections && anyIsDefault;
|
||||||
using (new EditorGUI.DisabledScope(multipleSelections || isDefaultByKnownParam != null))
|
|
||||||
|
var allAreAutoParams = !_parameterName.hasMultipleDifferentValues &&
|
||||||
|
string.IsNullOrWhiteSpace(_parameterName.stringValue);
|
||||||
|
|
||||||
|
using (new EditorGUI.DisabledScope((!allAreAutoParams && multipleSelections) ||
|
||||||
|
isDefaultByKnownParam != null))
|
||||||
{
|
{
|
||||||
EditorGUI.BeginChangeCheck();
|
EditorGUI.BeginChangeCheck();
|
||||||
DrawHorizontalToggleProp(_prop_isDefault, G("menuitem.prop.is_default"), mixedIsDefault,
|
DrawHorizontalToggleProp(_prop_isDefault, G("menuitem.prop.is_default"), mixedIsDefault,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user