58 public bool Any {
get;
set; }
60 public bool Ok {
get;
set; }
64 public bool Back {
get;
set; }
66 public bool Left {
get;
set; }
70 public bool Up {
get;
set; }
72 public bool Down {
get;
set; }
100 for (
int i = 0; i < 4; i++) {
101 if (((uint)
Devices & (uint)(2 << i)) != 0) {
117 for (
int i = 0; i < 4; i++) {
118 if (((uint)
Devices & (uint)(2 << i)) != 0) {
155 for (
int i = 0; i < 4; i++) {
156 if (((uint)
Devices & (uint)(64 << i)) != 0) {
169 vector =
Widget.GlobalBounds.Min;
170 vector2 =
Widget.GlobalBounds.Max;
180 Math.Clamp(value.Value.X, vector.
X, vector2.
X - 1f),
181 Math.Clamp(value.Value.Y, vector.
Y, vector2.
Y - 1f)
189 for (
int i = 0; i < 4; i++) {
192 Math.Clamp(value.Value.X, vector.
X, vector2.
X - 1f),
193 Math.Clamp(value.Value.Y, vector.
Y, vector2.
Y - 1f)
206 for (
int i = 0; i < 4; i++) {
207 if (((uint)
Devices & (uint)(64 << i)) != 0) {
221 for (
int i = 0; i < 4; i++) {
222 if (((uint)
Devices & (uint)(64 << i)) != 0) {
254 corner1 =
Widget.GlobalBounds.Min;
255 corner2 =
Widget.GlobalBounds.Max;
261 value.X = Math.
Clamp(value.X, corner1.
X, corner2.
X);
262 value.Y = Math.
Clamp(value.Y, corner1.
Y, corner2.
Y);
273 return ReadOnlyList<TouchLocation>.Empty;
306 for (
int i = 0; i < 4; i++) {
307 if (((uint)
Devices & (uint)(2 << i)) != 0) {
321 for (
int i = 0; i < 4; i++) {
322 if (((uint)
Devices & (uint)(2 << i)) != 0) {
336 for (
int i = 0; i < 4; i++) {
337 if (((uint)
Devices & (uint)(2 << i)) != 0) {
355 && key1 !=
Key.Null) {
372 && key1 !=
Key.Null) {
413 object modifier = combo.GetValue<
object>(
"ModifierKey",
null);
414 bool modifierHolding =
false;
422 if (modifierHolding) {
423 object action = combo.GetValue<
object>(
"ActionKey",
null);
444 if (s.Length > maxLength) {
445 s = s.Substring(0, maxLength);
449 delegate { handler(
null); }
458 for (
int i = 0; i < 4; i++) {
459 if (((uint)
Devices & (uint)(64 << i)) != 0) {
471 for (
int i = 0; i < 4; i++) {
472 if (((uint)
Devices & (uint)(64 << i)) != 0) {
484 for (
int i = 0; i < 4; i++) {
485 if (((uint)
Devices & (uint)(2048 << i)) != 0) {
500 for (
int i = 0; i < 4; i++) {
501 if (((uint)
Devices & (uint)(2048 << i)) != 0) {
512 for (
int i = 0; i < 4; i++) {
513 if (((uint)
Devices & (uint)(2048 << i)) != 0
525 for (
int i = 0; i < 4; i++) {
526 if (((uint)
Devices & (uint)(2048 << i)) != 0
538 for (
int i = 0; i < 4; i++) {
539 if (((uint)
Devices & (uint)(2048 << i)) != 0) {
549 for (
int i = 0; i < 4; i++) {
550 if (((uint)
Devices & (uint)(2048 << i)) != 0
562 for (
int i = 0; i < 4; i++) {
563 if (((uint)
Devices & (uint)(2048 << i)) != 0
575 for (
int i = 0; i < 4; i++) {
576 if (((uint)
Devices & (uint)(2048 << i)) != 0
588 for (
int i = 0; i < 4; i++) {
589 if (((uint)
Devices & (uint)(2048 << i)) != 0
695 TexturedBatch2D texturedBatch2D = dc.CursorPrimitivesRenderer2D.TexturedBatch(texture2D);
699 int count = texturedBatch2D.TriangleVertices.Count;
701 texturedBatch2D.TransformTriangles(
Widget.GlobalTransform, count);
710 TexturedBatch2D texturedBatch2D2 = dc.CursorPrimitivesRenderer2D.TexturedBatch(texture2D2);
714 int count2 = texturedBatch2D2.TriangleVertices.Count;
716 texturedBatch2D2.TransformTriangles(
Widget.GlobalTransform, count2);
906 Vector2 v2 =
new(padStickPosition.
X, 0f - padStickPosition.
Y);
static int Min(int x1, int x2)
static float PowSign(float x, float n)
static float FrameDuration
static double FrameStartTime
static object Get(Type type, string name)
static float MinimumDragDistance
static float MinimumHoldDuration
static object GetKeyboardMapping(string keyName, bool throwIfNotFound=true)
static float GamepadCursorSpeed
static float GamepadTriggerThreshold
手柄扳机触发阈值,范围0~1,默认0.5。扳机的按压幅度只有超过这个数时才会被视为“按下”状态,越小则越容易触发。
static float GamepadDeadZone
static object GetGamepadMapping(string keyName, bool throwIfNotFound=true)
static float GetTriggerPosition(VrController controller, float deadZone=0f)
static bool IsButtonDown(VrController controller, VrControllerButton button)
static ? Vector2 GetTouchpadPosition(VrController controller, float deadZone=0f)
static bool IsButtonDownOnce(VrController controller, VrControllerButton button)
static Vector2 GetStickPosition(VrController controller, float deadZone=0f)
static bool IsKeyDownRepeat(int keyboardIndex, Key key)
static bool IsKeyDownOnce(int keyboardIndex, Key key)
static bool IsKeyDown(int keyboardIndex, Key key)
static ? char LastChar(int keyboardIndex)
static ? Key LastKey(int keyboardIndex)
static int MouseWheelMovement(int mouseIndex)
static bool IsMouseButtonDown(int mouseIndex, MouseButton mouseButton)
static Point2 MousePosition(int mouseIndex)
static Point2 MouseMovement(int mouseIndex)
static bool IsMouseButtonDownOnce(int mouseIndex, MouseButton mouseButton)
static readonly Point2 Zero
static Vector2 Clamp(Vector2 v, float min, float max)
static readonly Vector2 Zero
static readonly Vector2 One
static Vector2 Transform(Vector2 v, Matrix m)
static Vector2 Normalize(Vector2 v)
static float Distance(Vector2 v1, Vector2 v2)