|
5 | 5 | using System.Globalization;
|
6 | 6 | using System.Linq;
|
7 | 7 |
|
8 |
| - using UnityEngine; |
9 |
| - |
10 |
| - using Graphics = System.Drawing.Graphics; |
11 |
| - |
12 | 8 | internal delegate void DragDropRenderHandler(Graphics g);
|
13 | 9 |
|
14 | 10 | public class Application
|
@@ -71,17 +67,6 @@ public enum KeyEvents
|
71 | 67 | }
|
72 | 68 |
|
73 | 69 | internal static bool IsDraging { get { return dragndrop; } }
|
74 |
| - internal static bool IsStandalone |
75 |
| - { |
76 |
| - get |
77 |
| - { |
78 |
| -#if UNITY_STANDALONE |
79 |
| - return true; |
80 |
| -#else |
81 |
| - return false; |
82 |
| -#endif |
83 |
| - } |
84 |
| - } |
85 | 70 | internal static float ScaleX
|
86 | 71 | {
|
87 | 72 | get { return scaleX; }
|
@@ -133,14 +118,14 @@ public void ProccessKeys(KeyEventArgs args, KeyEvents keyEventType)
|
133 | 118 | var keyControl = Control.lastSelected;
|
134 | 119 |
|
135 | 120 | // Tab switching through controls.
|
136 |
| - if (TabSwitching && Event.current.keyCode == KeyCode.Tab && keyEventType == KeyEvents.Down) |
| 121 | + if (TabSwitching && args.KeyCode == Keys.Tab && keyEventType == KeyEvents.Down) |
137 | 122 | {
|
138 | 123 | var containerControl = GetRootControl(keyControl) as ContainerControl;
|
139 | 124 | if (containerControl != null)
|
140 | 125 | {
|
141 |
| - if (Event.current.modifiers == EventModifiers.None) |
| 126 | + if (args.Modifiers == Keys.None) |
142 | 127 | containerControl.RaiseProcessTabKey(true, keyControl);
|
143 |
| - else if (Event.current.modifiers == EventModifiers.Shift) |
| 128 | + else if (args.Shift) |
144 | 129 | containerControl.RaiseProcessTabKey(false, keyControl);
|
145 | 130 | }
|
146 | 131 | }
|
@@ -214,11 +199,6 @@ public void ProccessMouse(MouseEvents mE, float mX, float mY, MouseButtons mButt
|
214 | 199 | MouseHook.RaiseMouseUp(hoveredControl, upArgs);
|
215 | 200 | }
|
216 | 201 | }
|
217 |
| - public void RaiseMouseEvent(MouseEvents mEv, MouseEventArgs mArgs) |
218 |
| - { |
219 |
| - if (mArgs != null) |
220 |
| - ProccessMouse(mEv, mArgs.X, mArgs.Y, mArgs.Button, mArgs.Clicks, mArgs.Delta); |
221 |
| - } |
222 | 202 | /// <summary>
|
223 | 203 | /// Redrawing the whole screen.
|
224 | 204 | /// </summary>
|
|
0 commit comments