engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
FViewportClient类 参考

An abstract interface to a viewport's client. 更多...

#include <UnrealClient.h>

+ 类 FViewportClient 继承关系图:

Public 成员函数

virtual void CapturedMouseMove (FViewport *InViewport, int32 InMouseX, int32 InMouseY)
 Called when the mouse is moved while a window input capture is in effect 更多...
 
virtual bool CaptureMouseOnLaunch ()
 Gets whether or not the viewport captures the Mouse on launch of the application Technically this controls capture on the first window activate, so in situations where the application is launched but isn't activated the effect is delayed until activation.
 
virtual void ConditionalRestoreWorld (class UWorld *InWorld)
 Restores GWorld to InWorld 更多...
 
virtual class UWorld * ConditionalSetWorld ()
 Sets GWorld to the appropriate world for this client 更多...
 
virtual EMouseCursor::Type GetCursor (FViewport *Viewport, int32 X, int32 Y)
 Retrieves the cursor that should be displayed by the OS 更多...
 
virtual float GetDPIScale () const
 
virtual const TArray< FString > * GetEnabledStats () const
 Get a ptr to the enabled stats list
 
virtual EMouseCaptureMode GetMouseCaptureMode () const
 Gets the mouse capture behavior when the viewport is clicked
 
virtual FStatHitchesData * GetStatHitchesData () const
 Get a ptr to the stat unit data for this viewport
 
virtual FStatUnitData * GetStatUnitData () const
 Get a ptr to the stat unit data for this viewport
 
virtual bool HandleNavigation (const uint32 InUserIndex, TSharedPtr< SWidget > InDestination)
 Optionally do custom handling of a navigation.
 
virtual bool HideCursorDuringCapture () const
 Gets whether or not the cursor is hidden when the viewport captures the mouse
 
virtual bool IgnoreInput ()
 Check whether we should ignore input.
 
virtual bool InputAxis (FViewport *Viewport, int32 ControllerId, FKey Key, float Delta, float DeltaTime, int32 NumSamples=1, bool bGamepad=false)
 Check an axis movement received by the viewport. 更多...
 
virtual bool InputChar (FViewport *Viewport, int32 ControllerId, TCHAR Character)
 Check a character input received by the viewport. 更多...
 
virtual bool InputGesture (FViewport *Viewport, EGestureEvent GestureType, const FVector2D &GestureDelta, bool bIsDirectionInvertedFromDevice)
 Check a gesture event received by the viewport. 更多...
 
virtual bool InputKey (const FInputKeyEventArgs &EventArgs)
 Check a key event received by the viewport. 更多...
 
virtual bool InputMotion (FViewport *Viewport, int32 ControllerId, const FVector &Tilt, const FVector &RotationRate, const FVector &Gravity, const FVector &Acceleration)
 Each frame, the input system will update the motion data. 更多...
 
virtual bool InputTouch (FViewport *Viewport, int32 ControllerId, uint32 Handle, ETouchType::Type Type, const FVector2D &TouchLocation, float Force, FDateTime DeviceTimestamp, uint32 TouchpadIndex)
 Check a key event received by the viewport. 更多...
 
virtual bool IsInGameView () const
 Returns true if this viewport is excluding non-game elements from its display
 
virtual bool IsOrtho () const
 Returns true if this viewport is orthogonal. 更多...
 
virtual bool IsStatEnabled (const FString &InName) const
 Check whether a specific stat is enabled for this viewport
 
virtual bool LockDuringCapture ()
 Gets whether or not the cursor is locked to the viewport when the viewport captures the mouse
 
virtual TOptional< TSharedRef< SWidget > > MapCursor (FViewport *Viewport, const FCursorReply &CursorReply)
 Called to map a cursor reply to an actual widget to render. 更多...
 
virtual FPopupMethodReply OnQueryPopupMethod () const
 Should we make new windows for popups or create an overlay in the current window.
 
virtual bool OverrideHighResScreenshotCaptureRegion (FIntRect &OutCaptureRegion)
 Allow viewport client to override the current capture region 更多...
 
virtual void ProcessAccumulatedPointerInput (FViewport *InViewport)
 Called from slate when input is finished for this frame, and we should process any queued mouse moves.
 
virtual TOptional< bool > QueryShowFocus (const EFocusCause InFocusCause) const
 Called to determine if we should render the focus brush. 更多...
 
virtual bool RequiresKeyboardInput () const
 Determine if the viewport client is going to need any keyboard input 更多...
 
virtual bool RequiresUncapturedAxisInput () const
 Determines whether this viewport client should receive calls to InputAxis() if the game's window is not currently capturing the mouse. 更多...
 
virtual void SetEnabledStats (const TArray< FString > &InEnabledStats)
 Sets all the stats that should be enabled for the viewport
 
virtual void SetShowStats (bool bWantStats)
 Sets whether stats should be visible for the viewport
 
virtual bool ShouldAlwaysLockMouse ()
 Gets whether or not the cursor should always be locked to the viewport.
 
virtual bool ShouldDPIScaleSceneCanvas () const
 
virtual bool WindowCloseRequested ()
 Called when the top level window associated with the viewport has been requested to close. 更多...
 

详细描述

An abstract interface to a viewport's client.

The viewport's client processes input received by the viewport, and draws the viewport.

成员函数说明

◆ CapturedMouseMove()

virtual void FViewportClient::CapturedMouseMove ( FViewport *  InViewport,
int32  InMouseX,
int32  InMouseY 
)
inlinevirtual

Called when the mouse is moved while a window input capture is in effect

参数
InViewportViewport that captured the mouse input
InMouseXNew mouse cursor X coordinate
InMouseYNew mouse cursor Y coordinate

◆ ConditionalRestoreWorld()

virtual void FViewportClient::ConditionalRestoreWorld ( class UWorld *  InWorld)
inlinevirtual

Restores GWorld to InWorld

参数
InWorldThe world to restore

◆ ConditionalSetWorld()

virtual class UWorld * FViewportClient::ConditionalSetWorld ( )
inlinevirtual

Sets GWorld to the appropriate world for this client

返回
the previous GWorld

◆ GetCursor()

virtual EMouseCursor::Type FViewportClient::GetCursor ( FViewport *  Viewport,
int32  X,
int32  Y 
)
inlinevirtual

Retrieves the cursor that should be displayed by the OS

参数
Viewportthe viewport that contains the cursor
Xthe x position of the cursor
Ythe Y position of the cursor
返回
the cursor that the OS should display

被 UGameViewportClient 重载.

◆ GetDPIScale()

virtual float FViewportClient::GetDPIScale ( ) const
inlinevirtual
返回
The DPI Scale of this viewport

被 FCommonViewportClient 重载.

◆ InputAxis()

virtual bool FViewportClient::InputAxis ( FViewport *  Viewport,
int32  ControllerId,
FKey  Key,
float  Delta,
float  DeltaTime,
int32  NumSamples = 1,
bool  bGamepad = false 
)
inlinevirtual

Check an axis movement received by the viewport.

If the viewport client uses the movement, it should return true to consume it.

参数
Viewport- The viewport which the axis movement is from.
ControllerId- The controller which the axis movement is from.
Key- The name of the axis which moved.
Delta- The axis movement delta.
DeltaTime- The time since the last axis update.
NumSamples- The number of device samples that contributed to this Delta, useful for things like smoothing
bGamepad- input came from gamepad (ie xbox controller)
返回
True to consume the axis movement, false to pass it on.

被 UGameViewportClient 重载.

◆ InputChar()

virtual bool FViewportClient::InputChar ( FViewport *  Viewport,
int32  ControllerId,
TCHAR  Character 
)
inlinevirtual

Check a character input received by the viewport.

If the viewport client uses the character, it should return true to consume it.

参数
Viewport- The viewport which the axis movement is from.
ControllerId- The controller which the axis movement is from.
Character- The character.
返回
True to consume the character, false to pass it on.

被 UGameViewportClient 重载.

◆ InputGesture()

virtual bool FViewportClient::InputGesture ( FViewport *  Viewport,
EGestureEvent  GestureType,
const FVector2D &  GestureDelta,
bool  bIsDirectionInvertedFromDevice 
)
inlinevirtual

Check a gesture event received by the viewport.

If the viewport client uses the event, it should return true to consume it.

参数
Viewport- The viewport which the event is from.
GestureType-
待办事项:
desc
参数
GestureDelta-
待办事项:
desc
返回
True to consume the gesture event, false to pass it on.

◆ InputKey()

virtual bool FViewportClient::InputKey ( const FInputKeyEventArgs &  EventArgs)
inlinevirtual

Check a key event received by the viewport.

If the viewport client uses the event, it should return true to consume it.

参数
EventArgs- The Input event args.
返回
True to consume the key event, false to pass it on.

被 UGameViewportClient 重载.

◆ InputMotion()

virtual bool FViewportClient::InputMotion ( FViewport *  Viewport,
int32  ControllerId,
const FVector &  Tilt,
const FVector &  RotationRate,
const FVector &  Gravity,
const FVector &  Acceleration 
)
inlinevirtual

Each frame, the input system will update the motion data.

参数
Viewport- The viewport which the key event is from.
ControllerId- The controller which the key event is from.
TiltThe current orientation of the device
RotationRateHow fast the tilt is changing
GravityDescribes the current gravity of the device
AccelerationDescribes the acceleration of the device
返回
True to consume the motion event, false to pass it on.

被 UGameViewportClient 重载.

◆ InputTouch()

virtual bool FViewportClient::InputTouch ( FViewport *  Viewport,
int32  ControllerId,
uint32  Handle,
ETouchType::Type  Type,
const FVector2D &  TouchLocation,
float  Force,
FDateTime  DeviceTimestamp,
uint32  TouchpadIndex 
)
inlinevirtual

Check a key event received by the viewport.

If the viewport client uses the event, it should return true to consume it.

参数
Viewport- The viewport which the event is from.
ControllerId- The controller which the key event is from.
Handle- Identifier unique to this touch event
Type- What kind of touch event this is (see ETouchType)
TouchLocation- Screen position of the touch
Force- How hard the touch is
DeviceTimestamp- Timestamp of the event
TouchpadIndex- For devices with multiple touchpads, this is the index of which one
返回
True to consume the key event, false to pass it on.

被 UGameViewportClient 重载.

◆ IsOrtho()

virtual bool FViewportClient::IsOrtho ( ) const
inlinevirtual

Returns true if this viewport is orthogonal.

If hit proxies are ever used in-game, this will need to be overridden correctly in GameViewportClient.

被 UGameViewportClient 重载.

◆ MapCursor()

virtual TOptional< TSharedRef< SWidget > > FViewportClient::MapCursor ( FViewport *  Viewport,
const FCursorReply &  CursorReply 
)
inlinevirtual

Called to map a cursor reply to an actual widget to render.

返回
the widget that should be rendered for this cursor, return TOptional<TSharedRef<SWidget>>() if no mapping.

被 UGameViewportClient 重载.

◆ OverrideHighResScreenshotCaptureRegion()

virtual bool FViewportClient::OverrideHighResScreenshotCaptureRegion ( FIntRect &  OutCaptureRegion)
inlinevirtual

Allow viewport client to override the current capture region

参数
OutCaptureRegionRef to rectangle where we will write the overridden region
返回
true if capture region has been overridden, false otherwise

◆ QueryShowFocus()

virtual TOptional< bool > FViewportClient::QueryShowFocus ( const EFocusCause  InFocusCause) const
inlinevirtual

Called to determine if we should render the focus brush.

参数
InFocusCauseThe cause of focus

被 UGameViewportClient 重载.

◆ RequiresKeyboardInput()

virtual bool FViewportClient::RequiresKeyboardInput ( ) const
inlinevirtual

Determine if the viewport client is going to need any keyboard input

返回
true if keyboard input is needed

◆ RequiresUncapturedAxisInput()

virtual bool FViewportClient::RequiresUncapturedAxisInput ( ) const
inlinevirtual

Determines whether this viewport client should receive calls to InputAxis() if the game's window is not currently capturing the mouse.

Used by the UI system to easily receive calls to InputAxis while the viewport's mouse capture is disabled.

被 UGameViewportClient 重载.

◆ ShouldDPIScaleSceneCanvas()

virtual bool FViewportClient::ShouldDPIScaleSceneCanvas ( ) const
inlinevirtual
返回
Whether or not the scene canvas should be scaled. Note: The debug canvas is always scaled

被 UGameViewportClient 重载.

◆ WindowCloseRequested()

virtual bool FViewportClient::WindowCloseRequested ( )
inlinevirtual

Called when the top level window associated with the viewport has been requested to close.

At this point, the viewport has not been closed and the operation may be canceled. This may not called from PIE, Editor Windows, on consoles, or before the game ends from other methods. This is only when the platform specific window is closed.

返回
True if the viewport may be closed, false otherwise.

被 UGameViewportClient 重载.


该类的文档由以下文件生成: