public override void OnInspectorGUI() { var skin = EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector); EditorGUILayout.BeginVertical(skin.box); ShiroiFXEditor.DrawTitle(CompositeEffectTitle, CompositeEffectSubtitle); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("Sub Effects", EditorStyles.boldLabel); var r = GUILayout.Button(ShiroiFXEditorResources.AddEffect); var buttonRect = Event.current.type == EventType.Repaint ? GUILayoutUtility.GetLastRect() : default(Rect); if (r) { PopupWindow.Show(buttonRect, effectSelector); } EditorGUILayout.EndHorizontal(); effect.Effects.RemoveAll( gameEffect => { bool result; DrawFX(gameEffect, skin, out result); return(result); }); EditorGUILayout.EndVertical(); }
public override void OnInspectorGUI() { EffectEditor.AttemptDrawAttributes(requiredFeature, optinalFeature); var skin = EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector); EditorGUILayout.BeginVertical(skin.box); ShiroiFXEditor.DrawTitle(FreezeFrameTitle, FreezeFrameSubtitle); DrawEffectTimeScale(); DrawUseTimeController(); EditorGUILayout.EndVertical(); }
private void DrawUseTimeController() { ShiroiFXEditor.DrawTitle(TimeControllerTitle, TimeControllerSubtitle); usesTimeController.target = effect.UseTimeControllerIfPresent = EditorGUILayout.Toggle(UseTimeControllerContent, effect.UseTimeControllerIfPresent); if (EditorGUILayout.BeginFadeGroup(usesTimeController.faded)) { effect.ServicePriority = (ushort)EditorGUILayout.IntSlider(ServicePriority, effect.ServicePriority, ushort.MinValue, ushort.MaxValue); } EditorGUILayout.EndFadeGroup(); }
private void DrawEffectTimeScale() { ShiroiFXEditor.DrawTitle(TimeScaleTitle, TimeScaleSubtitleHeader); effect.Mode = (FreezeFrameEffect.FreezeFrameMode)EditorGUILayout.EnumPopup(TimeScaleModeContent, effect.Mode); usesContantValue.target = effect.Mode == FreezeFrameEffect.FreezeFrameMode.Constant; var fadeValue = usesContantValue.faded; if (EditorGUILayout.BeginFadeGroup(fadeValue)) { effect.ConstantTimeScale = EditorGUILayout.FloatField(TimeScaleContent, effect.ConstantTimeScale); } EditorGUILayout.EndFadeGroup(); if (EditorGUILayout.BeginFadeGroup(1 - fadeValue)) { effect.AnimatedTimeScale = EditorGUILayout.CurveField(TimeScaleContent, effect.AnimatedTimeScale); } EditorGUILayout.EndFadeGroup(); effect.Duration = EditorGUILayout.FloatField(DurationContent, effect.Duration); }