public EditorButton() { _localSize = new Rect(Vector2.zero, Size); OnSizeChange.Add(OnRectChange); _bg = AssetDatabase.LoadAssetAtPath <Texture2D>("Assets/Editor/Resources/NodeSelectBtn.png"); _hover = AssetDatabase.LoadAssetAtPath <Texture2D>("Assets/Editor/Resources/NodeSelectBtnHover.png"); _onDown = AssetDatabase.LoadAssetAtPath <Texture2D>("Assets/Editor/Resources/NodeSelectBtnDown.png"); OnMouseClick.Add((c, e) => { e.Use(); }); InitStyle(); }
public EditorText() { InitStyle(); OnPositionChange.Add(PositionChange); OnSizeChange.Add(OnRectChange); Content = ""; OnKeyDown.Add((ec, ee) => { if (Editable) { ee.Use(); } }); }
/// <summary>Clears all events on this document.</summary> public void ClearEvents() { KeyUp = null; KeyDown = null; MouseMove = null; OnTitleChange = null; OnTooltipChange = null; OnResized = null; onresize = null; onkeydown = null; onkeyup = null; onmousemove = null; }
public frmBackgroundResize(int AHValue, int AVValue, OnSizeChange AEvent) { InitializeComponent(); StartHValue = AHValue; StartVValue = AVValue; OnSizeChangeEvent = AEvent; if (StartHValue >= tbrHZoom.Maximum) { tbrHZoom.Maximum = StartHValue * 2; } if (StartVValue >= tbrVZoom.Maximum) { tbrVZoom.Maximum = StartVValue * 2; } tbrHZoom.Value = StartHValue; tbrVZoom.Value = StartVValue; }
public frmBackgroundResize(int AHValue, int AVValue, OnSizeChange AEvent) { InitializeComponent(); StartHValue = AHValue; StartVValue = AVValue; OnSizeChangeEvent = AEvent; if (StartHValue >= tbrHZoom.Maximum) { tbrHZoom.Maximum = StartHValue * 2; } if (StartVValue >= tbrVZoom.Maximum) { tbrVZoom.Maximum = StartVValue * 2; } tbrHZoom.Value = StartHValue; tbrVZoom.Value = StartVValue; }
public EditorImage() { OnSizeChange.Add(OnSizeChangeResetImageType); }
public EditorPanel() { OnChildAdd.Add(AddChild); OnChildRemove.Add(RemoveChild); OnSizeChange.Add(OnSizeChangeEvent); }
/// <summary>Clears all events on this document.</summary> public void ClearEvents(){ KeyUp=null; KeyDown=null; MouseMove=null; OnTitleChange=null; OnTooltipChange=null; OnResized=null; onresize=null; onkeydown=null; onkeyup=null; onmousemove=null; }