protected override void DrawNodeWindow(int id) { base.DrawNodeWindow(id); GUILayout.Space(gap + 2); ePopup_coordMode.Show(nodeWidth - 40, "Src", 25); DrawNodeWindowEnd(); }
public override void DrawTop() { Rect llRect = new Rect(0, 0, 0, 0); base.DrawTop(); if (brush.mode == SWBrushMode.wand || brush.mode == SWBrushMode.dropper) { GUILayout.Label("Tolerance:", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight)); llRect = GUILayoutUtility.GetLastRect(); EditorGUILayout.IntSlider(spTolerance, 0, 255, "", GUILayout.Width(SWGlobalSettings.SliderWidth)); Tooltip_Rec(SWTipsText.Mask_Tolerance, -llRect.width - 10, 0); } else { GUILayout.Label("Size:", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight)); llRect = GUILayoutUtility.GetLastRect(); EditorGUILayout.IntSlider(spBrushsize, BrushSizeMin, BrushSizeMax, "", GUILayout.Width(SWGlobalSettings.SliderWidth)); Tooltip_Rec(SWTipsText.Mask_Size, -llRect.width - 10, 0); GUILayout.Space(al_spacingBig); GUILayout.Label("Opacity:", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight)); llRect = GUILayoutUtility.GetLastRect(); EditorGUILayout.Slider(spBrushTrans, 0, 1, "", GUILayout.Width(SWGlobalSettings.SliderWidth)); Tooltip_Rec(SWTipsText.Mask_Opacity, -llRect.width - 10, 0); } GUI.color = SWEditorUI.ColorPalette(SWColorPl.light); Rect btRect2 = TopElementRect(position.width - 200, position.width - 100 - SWGlobalSettings.UIGap); ePopup_texRes.Show(btRect2); Tooltip_Rec(SWTipsText.Mask_TexSize, btRect2); Rect btRect = TopElementRect(position.width - 100, position.width - SWGlobalSettings.UIGap); if (GUI.Button(btRect, "Invert", SWEditorUI.MainSkin.button)) { SWTextureProcess.ProcessMask_Invert(node.texMask); } GUI.color = Color.white; Tooltip_Rec(SWTipsText.Mask_Invert, btRect); }
protected override void DrawNodeWindow(int id) { base.DrawNodeWindow(id); GUILayout.Space(7); GUILayout.BeginHorizontal(); GUILayout.Space(7); GUILayout.BeginVertical(); float labelWith = 42; EffectDataColor _data = data.effectDataColor; string name = _data.hdr ? "[HDR]" : "Color"; GUILayout.BeginHorizontal(); GUILayout.Label(name, SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(labelWith)); SWCommon.HRDColor_Switch(window, ref data.effectDataColor.hdr); SWCommon.HRDColor_Field(_data.color, true, _data.hdr, 128 - labelWith, delegate(Color c) { _data.color = c; SWProperties.SetColor(data, _data.color); } ); GUILayout.EndHorizontal(); GUILayout.Space(2); ePopup_op.Show(128 - labelWith, "Op", labelWith); 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(data.depth, GUILayout.Width(128 - labelWith)); if (dep != 0 && dep != data.depth) { SWUndo.Record(this); data.depth = dep; } GUILayout.EndHorizontal(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); DrawNodeWindowEnd(); }
protected override void DrawExtra() { base.DrawExtra(); DrawModuleTitle("Alpha"); Tooltip_Rec(SWTipsText.Right_AlphaModule, new Rect(rightUpRect.x, GUILayoutUtility.GetLastRect().y, rightUpRect.width, GUILayoutUtility.GetLastRect().height)); 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)); GUILayout.BeginHorizontal(); float wid = SWGlobalSettings.LabelWidthLong + SWGlobalSettings.FieldWidth - 8; wid *= 0.25f; GUILayout.Label("Min", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(wid)); data.effectData.pop_min = EditorGUILayout.FloatField(data.effectData.pop_min, GUILayout.Width(wid)); GUILayout.Label("Max", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(wid)); data.effectData.pop_max = EditorGUILayout.FloatField(data.effectData.pop_max, GUILayout.Width(wid)); GUILayout.EndHorizontal(); Tooltip_Rec(SWTipsText.Right_AlphaMinMax, new Rect(rightUpRect.x, GUILayoutUtility.GetLastRect().y, rightUpRect.width, GUILayoutUtility.GetLastRect().height)); ePopup_Chn.Show(SWGlobalSettings.FieldWidth, "Channel", SWGlobalSettings.LabelWidthLong); Tooltip_Rec(SWTipsText.Right_AlphaChannel, new Rect(rightUpRect.x, GUILayoutUtility.GetLastRect().y, rightUpRect.width, GUILayoutUtility.GetLastRect().height)); UI_Float("Start", ref data.effectData.pop_startValue, null, false, false, true); Tooltip_Rec(SWTipsText.Right_AlphaStart, new Rect(rightUpRect.x, GUILayoutUtility.GetLastRect().y, rightUpRect.width, GUILayoutUtility.GetLastRect().height)); UI_Float("Spd", ref data.effectData.pop_speed, null, false, false, true); Tooltip_Rec(SWTipsText.Right_AlphaSpeed, new Rect(rightUpRect.x, GUILayoutUtility.GetLastRect().y, rightUpRect.width, GUILayoutUtility.GetLastRect().height)); Tooltip_Rec(SWTipsText.Right_AlphaSpeedFactor, new Rect(rightUpRect.x, GUILayoutUtility.GetLastRect().yMax, rightUpRect.width, GUILayoutUtility.GetLastRect().height)); Factor_Pick(ref data.effectData.pop_Param, true, "Spd Factor"); Tooltip_Rec(SWTipsText.Right_BlendFactor, new Rect(rightUpRect.x, GUILayoutUtility.GetLastRect().yMax, rightUpRect.width, GUILayoutUtility.GetLastRect().height)); Factor_Pick(ref data.effectDataColor.param, true, "Blend Factor"); }
void DrawRightUp_Settings() { GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Space(5); DrawModuleTitle("Settings"); Tooltip_Rec(SWTipsText.Settings_Module); GUILayout.EndHorizontal(); GUILayout.Space(10); GUILayout.BeginHorizontal(GUILayout.Width(170)); newName = EditorGUILayout.TextField(newName, GUILayout.Width(96)); if (GUILayout.Button("Rename")) { PressRename(); } GUILayout.EndHorizontal(); GUILayout.Space(10); GUILayout.BeginHorizontal(); GUILayout.Label("Shader Name:", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(leftWidth)); var tmpName = EditorGUILayout.TextField(data.sn, GUILayout.Width(rightupWidth - 10 - leftWidth)); if (data.sn != tmpName) { SWUndo.Record(this); data.sn = tmpName; } GUILayout.EndHorizontal(); SWTooltip.Rec(this, SWTipsText.Settings_ShaderName); string[] strs = { "Default", "Sprite", "UI", "Text", "UI2D Sprite (NGUI)" }; GUILayout.BeginHorizontal(); GUILayout.Label("Shader Type:", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(leftWidth)); var tmpType = (SWShaderType)EditorGUILayout.Popup((int)data.shaderType, strs, GUILayout.Width(rightupWidth - 10 - leftWidth)); if (data.shaderType != tmpType) { SWUndo.Record(this); data.shaderType = tmpType; if (tmpType == SWShaderType.normal) { nRoot.texture = nRoot.texForNormal; } else { nRoot.texture = nRoot.texForSprite; } } GUILayout.EndHorizontal(); SWTooltip.Rec(this, SWTipsText.Settings_Type); ChooseSpriteLightType(); ChooseShaderModel(); GUILayout.BeginHorizontal(); GUILayout.Label("Exclude Root:", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(leftWidth)); var tmp0 = EditorGUILayout.Toggle(data.excludeRoot, GUILayout.Width(rightupWidth - 10 - leftWidth)); if (data.excludeRoot != tmp0) { SWUndo.Record(this); data.excludeRoot = tmp0; } GUILayout.EndHorizontal(); SWTooltip.Rec(this, SWTipsText.Settings_ExcludeRoot); ePopup_blendMode.Show(rightupWidth - 10 - leftWidth, "Blend Mode:", leftWidth); SWTooltip.Rec(this, SWTipsText.Settings_Blend); GUILayout.BeginHorizontal(); ePopup_renderOrder.Show(170 - leftWidth, "Render Order:", leftWidth, false); GUILayout.Label("+", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(14)); var tmp4 = EditorGUILayout.IntField(data.shaderQueueOffset, GUILayout.Width(30)); if (tmp4 != data.shaderQueueOffset) { SWUndo.Record(this); data.shaderQueueOffset = tmp4; } GUILayout.Label("= " + ((int)data.shaderQueue + data.shaderQueueOffset), SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(60)); GUILayout.EndHorizontal(); SWTooltip.Rec(this, SWTipsText.Settings_Queue); GUILayout.BeginHorizontal(); ePopup_renderType.Show(rightupWidth - 10 - leftWidth, "Render Type:", leftWidth, false); GUILayout.EndHorizontal(); SWTooltip.Rec(this, SWTipsText.Settings_RenderType); GUILayout.BeginHorizontal(); GUILayout.Label("Alpha Clip:", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(leftWidth)); var tmp5 = EditorGUILayout.FloatField(data.clipValue, GUILayout.Width(rightupWidth - 10 - leftWidth)); if (data.clipValue != tmp5) { SWUndo.Record(this); data.clipValue = tmp5; } GUILayout.EndHorizontal(); SWTooltip.Rec(this, SWTipsText.Settings_Clip); GUILayout.BeginHorizontal(); GUILayout.Label("Fallback:", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(leftWidth)); var fallbackPress = GUILayout.Button(data.fallback, GUILayout.Width(rightupWidth - 10 - leftWidth)); var xtype = Event.current.type; var xrect = GUILayoutUtility.GetLastRect(); if (xtype == EventType.Repaint) { fallbackRect = new Rect(xrect.x, xrect.y, xrect.width, xrect.height); } if (fallbackPress) { DisplayShaderContext(fallbackRect); } GUILayout.EndHorizontal(); SWTooltip.Rec(this, SWTipsText.Settings_Fallback); GUI.color = Color.gray; GUILayout.Label("_______________________________________", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight)); GUI.color = Color.white; DrawModuleTitle("Preview"); SWTooltip.Rec(this, SWTipsText.Settings_ModulePreview); GUILayout.BeginHorizontal(); GUILayout.Label("Update On Mouse Over", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight)); data.pum = EditorGUILayout.Toggle(data.pum); GUILayout.EndHorizontal(); SWTooltip.Rec(this, SWTipsText.Settings_PreviewUpdateOnMouseOver); GUILayout.BeginHorizontal(); GUILayout.Label("Size", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(leftWidth + 20)); data.ps = EditorGUILayout.Slider(data.ps, 1, 5, GUILayout.Width(160)); GUILayout.EndHorizontal(); SWTooltip.Rec(this, SWTipsText.Settings_PreviewSize); GUILayout.BeginHorizontal(); GUILayout.Label("Size(Mouse Over)", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight), GUILayout.Width(leftWidth + 20)); data.psm = EditorGUILayout.Slider(data.psm, viewWindow.scale, 5, GUILayout.Width(160)); GUILayout.EndHorizontal(); SWTooltip.Rec(this, SWTipsText.Settings_PreviewSizeMouseOver); GUI.color = Color.gray; GUILayout.Label("_______________________________________", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight)); GUI.color = Color.white; Factor_CustomParamCreation(); }
public override void DrawTop() { Rect llRect = new Rect(0, 0, 0, 0); base.DrawTop(); if ((DrawRemapMode)slotBox_left.selection == DrawRemapMode.dir) { var tmp = SWEditorUI.Vector2Field("Drag:", rData.d.v); if (tmp != rData.d.v) { SWUndo.Record(this); rData.d.v = tmp; } Tooltip_Rec(SWTipsText.Remap_Drag, TopElementRect(0, 190)); GUILayout.Space(al_spacingBig); GUILayout.Label("Deviation:", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight)); llRect = GUILayoutUtility.GetLastRect(); var tmpPixelBack = EditorGUILayout.IntSlider("", rData.d.pb, -20, 20, GUILayout.Width(SWGlobalSettings.SliderWidth)); if (tmpPixelBack != rData.d.pb) { SWUndo.Record(this); rData.d.pb = tmpPixelBack; } Tooltip_Rec(SWTipsText.Remap_Deviation, -llRect.width - 10, 0); GUILayout.Space(al_spacingBig); GUILayout.Label("Precise:", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight)); Tooltip_Rec(SWTipsText.Remap_Precise, 0, 25); var p = GUILayout.Toggle(rData.d.pre, "", GUILayout.Width(80)); if (p != rData.d.pre) { SWUndo.Record(node.lineInfo); rData.d.pre = p; } } else { GUILayout.Label("Size:", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight)); llRect = GUILayoutUtility.GetLastRect(); var tmpBrushSize = EditorGUILayout.IntSlider("", brushSize, 1, 60, GUILayout.Width(SWGlobalSettings.SliderWidth)); if (tmpBrushSize != brushSize) { SWUndo.Record(this); brushSize = tmpBrushSize; } Tooltip_Rec(SWTipsText.Remap_Size, -llRect.width - 10, 0); GUILayout.Space(al_spacingBig); GUILayout.Label("Stitch:", SWEditorUI.Style_Get(SWCustomStyle.eTxtSmallLight)); Tooltip_Rec(SWTipsText.Remap_Stitch, 0, 25); var stitch = GUILayout.Toggle(rData.l.st, "", GUILayout.Width(80)); if (stitch != rData.l.st) { SWUndo.Record(node.lineInfo); rData.l.st = stitch; } } Rect btRect = TopElementRect(position.width - 100, position.width - SWGlobalSettings.UIGap); ePopup_texRes.Show(btRect); Tooltip_Rec(SWTipsText.Remap_TexSize, btRect); }
protected void TexShowChnEnum() { Rect rect = new Rect(al_leftWidth + 10, al_topHeight + 30, 40, 10); ePopup_texShowChn.Show(rect); }