Maze / Library /PackageCache /com.unity.ugui@1.0.0 /Tests /Runtime /EventSystem /InputModuleTests /FakeBaseInput.cs
| using System; | |
| using UnityEngine; | |
| using UnityEngine.EventSystems; | |
| public class FakeBaseInput : BaseInput | |
| { | |
| [] | |
| public String CompositionString = ""; | |
| private IMECompositionMode m_ImeCompositionMode = IMECompositionMode.Auto; | |
| private Vector2 m_CompositionCursorPos = Vector2.zero; | |
| [] | |
| public bool MousePresent = false; | |
| [] | |
| public bool[] MouseButtonDown = new bool[3]; | |
| [] | |
| public bool[] MouseButtonUp = new bool[3]; | |
| [] | |
| public bool[] MouseButton = new bool[3]; | |
| [] | |
| public Vector2 MousePosition = Vector2.zero; | |
| [] | |
| public Vector2 MouseScrollDelta = Vector2.zero; | |
| [] | |
| public bool TouchSupported = false; | |
| [] | |
| public int TouchCount = 0; | |
| [] | |
| public Touch TouchData; | |
| [] | |
| public float AxisRaw = 0f; | |
| [] | |
| public bool ButtonDown = false; | |
| public override string compositionString | |
| { | |
| get { return CompositionString; } | |
| } | |
| public override IMECompositionMode imeCompositionMode | |
| { | |
| get { return m_ImeCompositionMode; } | |
| set { m_ImeCompositionMode = value; } | |
| } | |
| public override Vector2 compositionCursorPos | |
| { | |
| get { return m_CompositionCursorPos; } | |
| set { m_CompositionCursorPos = value; } | |
| } | |
| public override bool mousePresent | |
| { | |
| get { return MousePresent; } | |
| } | |
| public override bool GetMouseButtonDown(int button) | |
| { | |
| return MouseButtonDown[button]; | |
| } | |
| public override bool GetMouseButtonUp(int button) | |
| { | |
| return MouseButtonUp[button]; | |
| } | |
| public override bool GetMouseButton(int button) | |
| { | |
| return MouseButton[button]; | |
| } | |
| public override Vector2 mousePosition | |
| { | |
| get { return MousePosition; } | |
| } | |
| public override Vector2 mouseScrollDelta | |
| { | |
| get { return MouseScrollDelta; } | |
| } | |
| public override bool touchSupported | |
| { | |
| get { return TouchSupported; } | |
| } | |
| public override int touchCount | |
| { | |
| get { return TouchCount; } | |
| } | |
| public override Touch GetTouch(int index) | |
| { | |
| return TouchData; | |
| } | |
| public override float GetAxisRaw(string axisName) | |
| { | |
| return AxisRaw; | |
| } | |
| public override bool GetButtonDown(string buttonName) | |
| { | |
| return ButtonDown; | |
| } | |
| } | |