My program doesn't have bugs. It just develops random features.
UE3:GameViewportClient (UT3)
Object >> GameViewportClient |
Contents
- 1 Properties
- 1.1 bDisableWorldRendering
- 1.2 bDisplayingUIMouseCursor
- 1.3 bShowTitleSafeZone
- 1.4 bUIMouseCaptureOverride
- 1.5 ConnectingMessage
- 1.6 Default2PSplitType
- 1.7 Default3PSplitType
- 1.8 GlobalInteractions
- 1.9 LoadingMessage
- 1.10 PausedMessage
- 1.11 PrecachingMessage
- 1.12 SavingMessage
- 1.13 ShowFlags
- 1.14 SplitscreenInfo
- 1.15 SplitscreenType
- 1.16 TitleSafeZone
- 1.17 UIController
- 1.18 UIControllerClass
- 1.19 Viewport
- 1.20 ViewportConsole
- 1.21 ViewportFrame
- 2 Enums
- 3 Structs
- 4 Delegates
- 5 Functions
- 5.1 Exec functions
- 5.2 Native functions
- 5.3 Events
- 5.4 Other instance functions
- 5.4.1 AddLocalPlayer
- 5.4.2 CalculateDeadZone
- 5.4.3 CalculatePixelCenter
- 5.4.4 CalculateSafeZoneValues
- 5.4.5 ConvertLocalPlayerToGamePlayerIndex
- 5.4.6 DrawTitleSafeArea
- 5.4.7 DrawTransition
- 5.4.8 DrawTransitionMessage
- 5.4.9 GetPixelSizeOfScreen
- 5.4.10 HasBottomSafeZone
- 5.4.11 HasLeftSafeZone
- 5.4.12 HasRightSafeZone
- 5.4.13 HasTopSafeZone
- 5.4.14 NotifyPlayerAdded
- 5.4.15 NotifyPlayerRemoved
- 5.4.16 RemoveLocalPlayer
- 5.4.17 SetSplitscreenConfiguration
- Package:
- Engine
- Within class:
- Engine
- Known classes within GameViewportClient:
- Console, PlayerManagerInteraction, UIInteraction, UTConsole, UTGameInteraction
- Direct subclass:
- UTGameViewportClient
- This class in other games:
- UDK
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
A game viewport (FViewport) is a high-level abstract interface for the platform specific rendering, audio, and input subsystems. GameViewportClient is the engine's interface to a game viewport. Exactly one GameViewportClient is created for each instance of the game. The only case (so far) where you might have a single instance of Engine, but multiple instances of the game (and thus multiple GameViewportClients) is when you have more than PIE window running.
Responsibilities: propagating input events to the global interactions list
Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
Properties
bDisableWorldRendering
Type: bool
set to disable world rendering
bDisplayingUIMouseCursor
Type: bool
Modifiers: transient
Indicates whether the UI is currently displaying a mouse cursor. Prevents GameEngine::Tick() from recapturing mouse input while the UI has active scenes that mouse input.
bShowTitleSafeZone
Type: bool
if TRUE then the title safe border is drawn
bUIMouseCaptureOverride
Type: bool
Modifiers: transient
Indicates that the UI needs to receive all mouse input events. Usually enabled when the user is interacting with a draggable widget, such as a scrollbar or slider.
ConnectingMessage
Type: string
Modifiers: localized
Default value: "CONNECTING"
Default2PSplitType
Type: ESplitScreenType
Modifiers: const
Defaults for intances where there are multiple configs for a certain number of players
Default value: eSST_2P_HORIZONTAL
Default3PSplitType
Type: ESplitScreenType
Modifiers: const
Default value: eSST_3P_FAVOR_TOP
GlobalInteractions
Type: array<Interaction>
Modifiers: init
A list of interactions which have a chance at all input before the player's interactions.
LoadingMessage
Type: string
Modifiers: localized
Name: Localized transition messages.
Default value: "LOADING"
PausedMessage
Type: string
Modifiers: localized
Default value: "PAUSED"
PrecachingMessage
Type: string
Modifiers: localized
Default value: "PRECACHING"
SavingMessage
Type: string
Modifiers: localized
Default value: "SAVING"
ShowFlags
Type: Object.qword
Modifiers: const
The show flags used by the viewport's players.
SplitscreenInfo
Type: array<SplitscreenData>
Array of the screen data needed for all the different splitscreen configurations
Default value, index 0:
Member | Value | ||||||
---|---|---|---|---|---|---|---|
PlayerData |
|
Default value, index 1:
Member | Value | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PlayerData |
|
Default value, index 2:
Member | Value | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PlayerData |
|
Default value, index 3:
Member | Value | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PlayerData |
|
Default value, index 4:
Member | Value | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PlayerData |
|
Default value, index 5:
Member | Value | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PlayerData |
|
SplitscreenType
Type: ESplitScreenType
Current splitscreen type being used
Default value: eSST_NOVALUE
TitleSafeZone
Type: TitleSafeZoneArea
border of safe area
Default value:
Member | Value |
---|---|
MaxPercentX | 0.9 |
MaxPercentY | 0.9 |
RecommendedPercentX | 0.8 |
RecommendedPercentY | 0.8 |
UIController
Type: UIInteraction
The viewport's UI controller
UIControllerClass
Type: class<UIInteraction>
The class for the UI controller
Default value: Class'Engine.UIInteraction'
Viewport
Type: pointer{FViewport}
Modifiers: const
The platform-specific viewport which this viewport client is attached to.
ViewportConsole
Type: Console
The viewport's console. Might be null on consoles
ViewportFrame
Type: pointer{FViewportFrame}
Modifiers: const
The platform-specific viewport frame which this viewport is contained by.
Enums
ESafeZoneType
The 4 different kinds of safezones
- eSZ_TOP
- eSZ_BOTTOM
- eSZ_LEFT
- eSZ_RIGHT
ESplitScreenType
Enum of the different splitscreen types
- eSST_NONE
- No split
- eSST_2P_HORIZONTAL
- 2 player horizontal split
- eSST_2P_VERTICAL
- 2 player vertical split
- eSST_3P_FAVOR_TOP
- 3 Player split with 1 player on top and 2 on bottom
- eSST_3P_FAVOR_BOTTOM
- 3 Player split with 1 player on bottom and 2 on top
- eSST_4P
- 4 Player split
- eSST_COUNT
- eSST_NOVALUE
Structs
PerPlayerSplitscreenData
Modifiers: native
Structure to store splitscreen data.
SplitscreenData
Modifiers: native
Structure containing all the player splitscreen datas per splitscreen configuration.
- array<PerPlayerSplitscreenData> PlayerData
TitleSafeZoneArea
Modifiers: native
Max/Recommended screen viewable extents as a percentage
Delegates
HandleInputAxis
Provides script-only child classes the opportunity to handle input axis events received from the viewport. This delegate is called before the input axis event is passed to the interactions array for processing.
Parameters:
- ControllerId - the controller that generated this input axis event
- Key - the name of the axis that moved (KEY_MouseX, KEY_XboxTypeS_LeftX, etc.)
- Delta - the movement delta for the axis
- DeltaTime - the time (in seconds) since the last axis update.
- bGamepad - input came from gamepad (ie xbox controller)
Returns:
- return TRUE to indicate that the input event was handled. if the return value is TRUE, this input event will not be passed to the interactions array.
HandleInputChar
Provides script-only child classes the opportunity to handle character input (typing) events received from the viewport. This delegate is called before the character event is passed to the interactions array for processing.
Parameters:
- ControllerId - the controller that generated this character input event
- Unicode - the character that was typed
Returns:
- return TRUE to indicate that the input event was handled. if the return value is TRUE, this input event will not be passed to the interactions array.
HandleInputKey
Provides script-only child classes the opportunity to handle input key events received from the viewport. This delegate is called before the input key event is passed to the interactions array for processing.
Parameters:
- ControllerId - the controller that generated this input key event
- Key - the name of the key which an event occured for (KEY_Up, KEY_Down, etc.)
- EventType - the type of event which occured (pressed, released, etc.)
- AmountDepressed - for analog keys, the depression percent.
- bGamepad - input came from gamepad (ie xbox controller)
Returns:
- return TRUE to indicate that the input event was handled. if the return value is TRUE, this input event will not be passed to the interactions array.
Functions
Exec functions
DebugCreatePlayer
Debug console command to create a player.
Parameters:
- ControllerId - The controller ID the player should accept input from.
DebugRemovePlayer
Debug console command to remove the player with a given controller ID.
Parameters:
- ControllerId - The controller ID to search for.
SetConsoleTarget
Sets the player which console commands will be executed in the context of.
SetSplit
debug test for testing splitscreens
ShowTitleSafeArea
Exec for toggling the display of the title safe area
SSSwapControllers
Rotates controller ids among gameplayers, useful for testing splitscreen with only one controller.
Native functions
ConsoleCommand
Executes a console command in the context of this viewport.
Parameters:
- Command - The command to execute.
Returns:
- The output of the command will be returned.
GetViewportSize
Retrieve the size of the main viewport.
Parameters:
- out_ViewportSize - out] will be filled in with the size of the main viewport
IsFullScreenViewport
Returns:
- Whether or not the main viewport is fullscreen or windowed.
Events
CreatePlayer
Adds a new player.
Parameters:
- ControllerId - The controller ID the player should accept input from.
- OutError - If no player is returned, OutError will contain a string describing the reason.
- SpawnActor - True if an actor should be spawned for the new player.
Returns:
- The player which was created.
FindPlayerByControllerId
Finds a player by controller ID.
Parameters:
- ControllerId - The controller ID to search for.
Returns:
- None or the player with matching controller ID.
GameSessionEnded
Called when the current map is being unloaded. Cleans up any references which would prevent garbage collection.
GetSubtitleRegion
called before rending subtitles to allow the game viewport to determine the size of the subtitle area
Parameters:
- Min - top left bounds of subtitle region (0 to 1)
- Max - bottom right bounds of subtitle region (0 to 1)
Init
Initialize the game viewport.
Parameters:
- OutError - If an error occurs, returns the error description.
Returns:
- False if an error occurred, true if the viewport was initialized successfully.
InsertInteraction
Inserts an interaction into the GlobalInteractions array at the specified index
Parameters:
- NewInteraction - the interaction that should be inserted into the array
- Index - the position in the GlobalInteractions array to insert the element. if no value (or -1) is specified, inserts the interaction at the end of the array
Returns:
- the position in the GlobalInteractions array where the element was placed, or -1 if the element wasn't added to the array for some reason
LayoutPlayers
Called before rendering to allow the game viewport to allocate subregions to players.
PostRender
Called after rendering the player views and HUDs to render menus, the console, etc. This is the last rendering call in the render loop
Parameters:
- Canvas - The canvas to use for rendering.
RemovePlayer
Removes a player.
Parameters:
- Player - The player to remove.
Returns:
- whether the player was successfully removed. Removal is not allowed while connected to a server.
Tick
Called every frame to allow the game viewport to update time based state.
Parameters:
- DeltaTime - The time since the last call to Tick.
Other instance functions
AddLocalPlayer
Adds a LocalPlayer to the local and global list of Players.
Parameters:
- NewPlayer - the player to add
CalculateDeadZone
CalculatePixelCenter
Calculate the pixel value of the center of the viewport - this takes the safezones into consideration.
CalculateSafeZoneValues
Calculate the amount of safezone needed for a single side for both vertical and horizontal dimensions
ConvertLocalPlayerToGamePlayerIndex
Convert a LocalPlayer to it's index in the GamePlayer array Returns -1 if the index could not be found.
DrawTitleSafeArea
Draw the safe area using the current TitleSafeZone settings
DrawTransition
Displays the transition screen.
Parameters:
- Canvas - The canvas to use for rendering.
DrawTransitionMessage
Print a centered transition message with a drop shadow.
GetPixelSizeOfScreen
Get the total pixel size of the screen. This is different from the pixel size of the viewport since we could be in splitscreen
HasBottomSafeZone
Whether the player at LocalPlayerIndex's viewport has a "bottom of viewport" safezone or not.
HasLeftSafeZone
Whether the player at LocalPlayerIndex's viewport has a "left of viewport" safezone or not.
HasRightSafeZone
Whether the player at LocalPlayerIndex's viewport has a "right of viewport" safezone or not.
HasTopSafeZone
Whether the player at LocalPlayerIndex's viewport has a "top of viewport" safezone or not.
NotifyPlayerAdded
Notifies all interactions that a new player has been added to the list of active players.
Parameters:
- PlayerIndex - the index [into the GamePlayers array] where the player was inserted
- AddedPlayer - the player that was added
NotifyPlayerRemoved
Notifies all interactions that a new player has been added to the list of active players.
Parameters:
- PlayerIndex - the index [into the GamePlayers array] where the player was located
- RemovedPlayer - the player that was removed
RemoveLocalPlayer
Removes a LocalPlayer from the local and global list of Players.
Parameters:
- ExistingPlayer - the player to remove
SetSplitscreenConfiguration
Sets up the splitscreen configuration and does some sanity checking