Mostly Harmless

Legacy:P2Screen

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 00:30, 15 May 2005 by Kamek (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Postal 2 :: Interactions >> Interaction >> P2Screen

Base class for Postal 2's in-game screens.

Properties[edit]

Main[edit]

Name AfterFadeInScreen 
state to use after fading in screen
Name AfterStartupState 
state to use after startup
name BackgroundName 
name of background texture
Texture BackgroundTex 
background texture (set directly or use BackgroundName for dynamic load)
bool bDontPauseGame 
don't pause game while screen is running
bool bEndWhenTraveling 
whether to end screen when player travels
bool bFadeGameInOut 
whether to fade game in/out
bool bFadeScreenInOut 
whether to fade screen in/out
bool bWantInputEvents 
true to get input events
float FadeInGameTime 
time for fading in game
Sound FadeInScreenSound 
sound to play when screen fades in
float FadeInScreenTime 
float FadeInSongTime 
float FadeOutGameTime 
time for fading out game
Sound FadeOutScreenSound 
sound to play when screen fades out
float FadeOutScreenTime 
float FadeOutSongTime 
String Message [localized]
message
float MsgFlashRate 
message flag rate
float MsgX 
message x position (% of screen width)
float MsgY 
message y position (% of screen height)
String Song 
name of song to play

Hidden[edit]

bool bDelayedGoto 
whether a delayed goto is being used
bool bEnableLogging 
bool bEnableRender 
bool bEndNow 
whether to end screen
bool bFadeScreen 
whether to fade the screen in/out
bool bIsRunning 
whether screen is showing
bool bMsgFlashOn 
used to flash message on/off
bool bPlayerWantsToEnd 
true if player wants to end
bool bShowMsg 
whether to show message
bool bTraveling 
whether screen was active during travel
bool bTravelRenderMode 
bool bWaitForEnd 
whether waiting for end before going to state
int ConsecGoodFrames 
Name DelayedState 
the state to goto after the delay
float DelayTime 
how long to delay the state
float FadeDuration 
how long fade should take
Material FadeScreenMat 
material used to fade screen
float FadeStartTime 
time at which fade was started
float FirstFrameTime 
string FontInfoClass 
which FontInfo class to use
float LastFrameTime 
string MinRes [globalconfig]
minimum resolution
float MsgFlashTime 
message flag time
float OldPlayerFOV 
FOV player was using on way in (abnormal if he was in
name PostSendState 
string SavedRes 
saved resolution to restore after screen ends
float ScaleX 
scaling factor in X
float ScaleY 
scaling factor in Y
string SendPlayerURL 
int SongHandle [transient]
song handle
int TravelRenderCount 
Name WaitState 
the state to goto afterwards

Methods[edit]

Useful Methods[edit]

Start() 
Call this to start the screen.
End()
Call this to end the screen. Note that this merely gets the ball rolling and that due to fade outs and such it may take a while for the screen to be fully shutdown.
ShuttingDown()
This is called when this screen is about to shutdown. Derived classes can use this to do any required cleanup.
bool IsRunning()
Check if screen is running. This will be true as long as the screen is active in any way, from the initial fade in through the final fade out.
bool IsEnding()
Check if screen is ending. This indicates that the screen is in the process of ending. Use IsRunning() to determine the actual screen status.
bool ShouldDrawHUD()
This is called by the HUD to see if it should draw itself.
P2Player GetPlayer()
Returns P2Player version of the PlayerController.
P2GameInfoSingle GetGameSingle()
Returns P2GameInfoSingle version of the GameInfo.
Actor GetSoundActor()
Returns the actor through which sounds should be played. Attempts to use the pawn, unless something like a cinematic is playing, then returns the viewtarget of the player.
float GetSoundDuration(Sound snd)
Same as Actor version.
ShowMsg()
Shows the message
SetFadeIn(float time, optional bool bScreen)
Setup fade-in effect so FadeAlpha goes from 1 to 255 in the specified time. Derived classes are free to use FadeAlpha for any purpose. Setting bScreen causes this class to fade in the full screen from black.
SetFadeOut(float time, optional bool bScreen)
Opposite of SetFadeIn.
DrawScaled(Canvas Canvas, Texture tex, float BackX, float BackY, optional bool bPositionByCenter, optional bool bAlpha,optional float Alpha)
Draw texture at specified position on the background texture. The position and size of the texture is scaled to match the background scaling.

Internal functions[edit]

TickFade()
Updates the fade effect. Called by Actor.Tick()

Known Subclasses[edit]