ImitateInput.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // Copyright aXiuShen. All Rights Reserved.
  2. #pragma once
  3. #include "CoreMinimal.h"
  4. #include "Layout/Visibility.h"
  5. #include "Input/Reply.h"
  6. #include "Widgets/DeclarativeSyntaxSupport.h"
  7. #include "Widgets/SCompoundWidget.h"
  8. #include "Framework/SlateDelegates.h"
  9. #include "ImitateInput.generated.h"
  10. UENUM(BlueprintType, Category = "Web View", meta = (DisplayName = "Imitate Input Mouse"))
  11. enum class WebView_ImitateInput_Mouse : uint8
  12. {
  13. WebView_ImitateInput_Mouse_Down = 0 UMETA(DisplayName = "MouseDown"),
  14. WebView_ImitateInput_Mouse_Up = 1 UMETA(DisplayName = "MouseUp"),
  15. WebView_ImitateInput_Mouse_Move = 2 UMETA(DisplayName = "MouseMove"),
  16. };
  17. UENUM(BlueprintType, Category = "Web View", meta = (DisplayName = "Imitate Input Key"))
  18. enum class WebView_ImitateInput_Key : uint8
  19. {
  20. WebView_ImitateInput_Key_Down = 0 UMETA(DisplayName = "KeyDown"),
  21. WebView_ImitateInput_Key_Up = 1 UMETA(DisplayName = "KeyUp"),
  22. WebView_ImitateInput_Key_Char = 2 UMETA(DisplayName = "KeyChar"),
  23. };
  24. USTRUCT(BlueprintType)
  25. struct BASEBROWSER_API FImitateInput //public UObject
  26. {
  27. public:
  28. GENERATED_USTRUCT_BODY()
  29. /*
  30. * Show web content when Imitate Input
  31. */
  32. UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Web View")
  33. bool Show = true;
  34. /*
  35. * Time interval between events .ms , If the interval time is insufficient, call the AddDelay node to increase
  36. */
  37. UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (UIMin = 10, UIMax = 10000), Category = "Web View")
  38. int interval = 20;
  39. /*
  40. * Simulate event screen resolution. After setting, it can adapt to any resolution.
  41. * Please keep the size and webpixel values the same in the editor
  42. */
  43. UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Web View")
  44. FIntPoint Size= FIntPoint(0, 0);
  45. /*
  46. {"type":"delay","ms":3000}
  47. {"type":"input","text":"content"}
  48. {"type":"key_down","code":0,"character":0,"modify":0}
  49. {"type":"key_char","code":0,"character":0,"modify":0}
  50. {"type":"key_up","code":0,"character":0,"modify":0}
  51. {"type":"mouse_down","pos":{"x":128,"y":256}}
  52. {"type":"mouse_move","pos":{"x":128,"y":256}}
  53. {"type":"mouse_up","pos":{"x":128,"y":256}}
  54. */
  55. UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Web View")
  56. TArray<FString> Event;
  57. };
  58. UENUM(BlueprintType, Category = "Web View")
  59. enum class WebView_Keyboard_Mode: uint8
  60. {
  61. WebView_Keyboard_Mode_Scenes = 1 UMETA(DisplayName = "Scenes"),
  62. WebView_Keyboard_Mode_Blend = 0 UMETA(DisplayName = "Blend"),
  63. WebView_Keyboard_Mode_Both = 2 UMETA(DisplayName = "Both"),
  64. };