This commit is contained in:
niko
2026-06-04 11:42:34 +02:00
parent f39ba70a9f
commit e720b98cd1
7488 changed files with 2493818 additions and 0 deletions
@@ -0,0 +1,114 @@
using System;
namespace UnityEngine.Experimental.UIElements
{
// Token: 0x02000325 RID: 805
internal class IMRepeatButton : IMElement
{
// Token: 0x060032AD RID: 12973 RVA: 0x0004CDE0 File Offset: 0x0004AFE0
public IMRepeatButton()
{
base.focusType = FocusType.Keyboard;
}
// Token: 0x17000B81 RID: 2945
// (get) Token: 0x060032AE RID: 12974 RVA: 0x0004CDF0 File Offset: 0x0004AFF0
// (set) Token: 0x060032AF RID: 12975 RVA: 0x0004CE0C File Offset: 0x0004B00C
public bool isPressed { get; private set; }
// Token: 0x060032B0 RID: 12976 RVA: 0x0004CE18 File Offset: 0x0004B018
public override bool OnGUI(Event evt)
{
this.isPressed = false;
return base.OnGUI(evt);
}
// Token: 0x060032B1 RID: 12977 RVA: 0x0004CE3C File Offset: 0x0004B03C
protected override int DoGenerateControlID()
{
return GUIUtility.GetControlID("IMRepeatButton".GetHashCode(), base.focusType, base.position);
}
// Token: 0x060032B2 RID: 12978 RVA: 0x0004CE6C File Offset: 0x0004B06C
internal override void DoRepaint(IStylePainter args)
{
base.style.Draw(base.position, GUIContent.Temp(base.text), base.id);
if (GUIUtility.hotControl == base.id)
{
this.isPressed = base.position.Contains(args.mousePosition);
}
}
// Token: 0x060032B3 RID: 12979 RVA: 0x0004CEC8 File Offset: 0x0004B0C8
protected override bool DoMouseDown(MouseEventArgs args)
{
bool flag;
if (base.position.Contains(args.mousePosition))
{
GUIUtility.hotControl = base.id;
flag = true;
}
else
{
flag = false;
}
return flag;
}
// Token: 0x060032B4 RID: 12980 RVA: 0x0004CF0C File Offset: 0x0004B10C
protected override bool DoMouseUp(MouseEventArgs args)
{
bool flag;
if (GUIUtility.hotControl == base.id)
{
GUIUtility.hotControl = 0;
this.isPressed = base.position.Contains(args.mousePosition);
flag = true;
}
else
{
flag = false;
}
return flag;
}
// Token: 0x060032B5 RID: 12981 RVA: 0x0004CF5C File Offset: 0x0004B15C
protected override bool DoMouseDrag(MouseEventArgs args)
{
return GUIUtility.hotControl == base.id;
}
// Token: 0x060032B6 RID: 12982 RVA: 0x0004CF8C File Offset: 0x0004B18C
protected override bool DoKeyDown(KeyboardEventArgs args)
{
bool flag;
if (args.character == ' ' && GUIUtility.keyboardControl == base.id)
{
GUIUtility.SetChanged(true);
this.isPressed = true;
flag = true;
}
else
{
flag = false;
}
return flag;
}
// Token: 0x060032B7 RID: 12983 RVA: 0x0004CFD8 File Offset: 0x0004B1D8
protected override bool DoKeyUp(KeyboardEventArgs args)
{
bool flag;
if (args.character == ' ' && GUIUtility.keyboardControl == base.id)
{
this.isPressed = false;
flag = true;
}
else
{
flag = false;
}
return flag;
}
}
}