void DrawTop(EffectData data, EffectDataUV dataUV) { if (mode == SWEffectWindowEditMode.Basic) { UI_Vector2("Position:", ref data.t_startMove, ops [SWEffectWindowOp.pos].Data2UI); Tooltip_Rec(SWTipsText.Effect_Position); GUILayout.Space(al_spacingBig); UI_Float("Rotation:", ref data.r_angle, ops [SWEffectWindowOp.angle].Data2UI); Tooltip_Rec(SWTipsText.Effect_Rotation, TopElementRect(225, 348)); GUILayout.Space(al_spacingBig); UI_Vector2("Scale:", ref data.s_scale, ops [SWEffectWindowOp.scaleX].Data2UI); Tooltip_Rec(SWTipsText.Effect_Scale); } else if (mode == SWEffectWindowEditMode.UV) { DrawTopUV(); } else if (mode == SWEffectWindowEditMode.Move) { UI_Vector2("Move:", ref data.t_speed, ops [SWEffectWindowOp.Move].Data2UI); Tooltip_Rec(SWTipsText.Effect_Move); } else if (mode == SWEffectWindowEditMode.Spin) { UI_Float("Spin:", ref data.r_speed, ops [SWEffectWindowOp.Spin].Data2UI); Tooltip_Rec(SWTipsText.Effect_Spin, TopElementRect(5, 100)); } else if (mode == SWEffectWindowEditMode.Radial) { UI_Vector2("Radial:", ref data.s_speed, ops [SWEffectWindowOp.Radial].Data2UI); Tooltip_Rec(SWTipsText.Effect_Radial); } }
protected override void DrawTopUV() { EffectDataUV dataUV = data.effectDataUV; UI_Vector2("R:", ref dataUV.amountR, ops [SWEffectWindowOp.UVR].Data2UI, false, 20); Tooltip_Rec(SWTipsText.Effect_R); GUILayout.Space(al_spacingBig); UI_Vector2("G:", ref dataUV.amountG, ops [SWEffectWindowOp.UVG].Data2UI, false, 20); Tooltip_Rec(SWTipsText.Effect_G); GUILayout.Space(al_spacingBig); UI_Vector2("B:", ref dataUV.amountB, ops [SWEffectWindowOp.UVB].Data2UI, false, 20); Tooltip_Rec(SWTipsText.Effect_B); GUILayout.Space(al_spacingBig); UI_Vector2("A:", ref dataUV.amountA, ops [SWEffectWindowOp.UVA].Data2UI, false, 20); Tooltip_Rec(SWTipsText.Effect_A); }
protected void OpBlend() { float labelWith = 42; if (nodeCode.data.GetCodeType() == SWDataType._Color) { EffectDataColor _data = nodeCode.data.effectDataColor; GUILayout.Space(2); GUILayout.BeginHorizontal(); GUILayout.Label("Op", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(labelWith)); _data.op = (SWOutputOP)EditorGUILayout.EnumPopup(_data.op, GUILayout.Width(128 - labelWith)); GUILayout.EndHorizontal(); GUILayout.Space(2); SWWindowMain.Instance.Factor_Pick(ref _data.param, PickParamType.node, "Factor", null, 128); GUILayout.Space(2); GUILayout.BeginHorizontal(); GUILayout.Label("Depth", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(labelWith)); var dep = EditorGUILayout.IntField(nodeCode.data.depth, GUILayout.Width(128 - labelWith)); if (dep != 0 && dep != nodeCode.data.depth) { SWUndo.Record(this); nodeCode.data.depth = dep; } GUILayout.EndHorizontal(); } else if (nodeCode.data.GetCodeType() == SWDataType._UV) { EffectDataUV dataUV = nodeCode.data.effectDataUV; GUILayout.Space(2); GUILayout.BeginHorizontal(); GUILayout.Label("Op", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(labelWith)); dataUV.op = (SWUVop)EditorGUILayout.EnumPopup(dataUV.op, GUILayout.Width(128 - labelWith)); GUILayout.EndHorizontal(); GUILayout.Space(2); SWWindowMain.Instance.Factor_Pick(ref dataUV.param, PickParamType.node, "Factor", null, 128); } else if (nodeCode.data.GetCodeType() == SWDataType._Alpha) { var data = nodeCode.data; GUILayout.BeginHorizontal(); GUILayout.Label("Final", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(SWGlobalSettings.LabelWidthLong)); data.effectData.pop_final = EditorGUILayout.Toggle(data.effectData.pop_final, GUILayout.Width(SWGlobalSettings.FieldWidth)); GUILayout.EndHorizontal(); Tooltip_Rec(SWTipsText.Right_AlphaFinal, new Rect(rightUpRect.x, GUILayoutUtility.GetLastRect().y, rightUpRect.width, GUILayoutUtility.GetLastRect().height)); } }
protected void OpBlend() { float labelWith = 42; if (nodeCode.data.GetCodeType() == SWDataType._Color) { EffectDataColor _data = nodeCode.data.effectDataColor; GUILayout.Space(2); GUILayout.BeginHorizontal(); GUILayout.Label("Op", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(labelWith)); _data.op = (SWOutputOP)EditorGUILayout.EnumPopup(_data.op, GUILayout.Width(128 - labelWith)); GUILayout.EndHorizontal(); GUILayout.Space(2); SWWindowMain.Instance.Factor_Pick(ref _data.param, PickParamType.node, "Factor", null, 128); GUILayout.Space(2); GUILayout.BeginHorizontal(); GUILayout.Label("Depth", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(labelWith)); var dep = EditorGUILayout.IntField(nodeCode.data.depth, GUILayout.Width(128 - labelWith)); if (dep != 0 && dep != nodeCode.data.depth) { SWUndo.Record(this); nodeCode.data.depth = dep; } GUILayout.EndHorizontal(); } else if (nodeCode.data.GetCodeType() == SWDataType._UV) { EffectDataUV dataUV = nodeCode.data.effectDataUV; GUILayout.Space(2); GUILayout.BeginHorizontal(); GUILayout.Label("Op", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(labelWith)); dataUV.op = (SWUVop)EditorGUILayout.EnumPopup(dataUV.op, GUILayout.Width(128 - labelWith)); GUILayout.EndHorizontal(); GUILayout.Space(2); SWWindowMain.Instance.Factor_Pick(ref dataUV.param, PickParamType.node, "Factor", null, 128); } else if (nodeCode.data.GetCodeType() == SWDataType._Alpha) { } }
protected override void DrawExtra() { base.DrawExtra(); DrawModuleTitle("Blend"); Tooltip_Rec(SWTipsText.Right_BlendModule, new Rect(rightUpRect.x, GUILayoutUtility.GetLastRect().y, rightUpRect.width, GUILayoutUtility.GetLastRect().height)); GUILayout.BeginHorizontal(); EffectDataUV dataUV = data.effectDataUV; var temp = (SWUVop)UI_PopEnum("Blend Op", dataUV.op, true); if (dataUV.op != temp) { SWUndo.Record(info.effector); dataUV.op = temp; } GUILayout.EndHorizontal(); Tooltip_Rec(SWTipsText.Right_BlendOp, new Rect(rightUpRect.x, GUILayoutUtility.GetLastRect().y, rightUpRect.width, GUILayoutUtility.GetLastRect().height)); Tooltip_Rec(SWTipsText.Right_BlendFactor, new Rect(rightUpRect.x, GUILayoutUtility.GetLastRect().yMax, rightUpRect.width, GUILayoutUtility.GetLastRect().height)); Factor_Pick(ref dataUV.param, true, "Blend Factor"); }