Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 00189 00190 00191 |
//============================================================================= // $Author: Aleiby $ // $Date: 2/25/03 10:40a $ // $Revision: 21 $ //============================================================================= //------------------------------------------------------------------------------ // Name: UIConsole.uc // Author: Aaron R Leiby // Date: 21 September 2000 //------------------------------------------------------------------------------ // Description: //------------------------------------------------------------------------------ // Notes: // + Our Root component will automatically get deleted when we are destroyed. // (This is performed in UUIConsole.cpp) //------------------------------------------------------------------------------ // How to use this class: //------------------------------------------------------------------------------ class UIConsole extends Console native; var() public config string Filename; var() public config float ScaleX,ScaleY; var() public config float OffsetX,OffsetY; var() public bool bShift, bCtrl, bAlt; var() public bool bHideUI; //!!ARL (mdf) tbd: var bool bEchoToHUD; var bool bRendering; var string LastLevelAction; var int FrameIndex; // useful for caching things on a per-tick basis (like keyframe calculations). updated once per frame regardless of pausing. be wary of wrapping. var ComponentHandle Root; var array<UIHelper> Helpers; var array<Object> Assets; // Assets we are using -- keep a pointer around so they don't get garbage collected. var private const native noexport array<int> MessageAreas; //TArray<UTextArea*> // throw components here if you want them to be destroyed at the end of the current Update. (useful for destroying components during an Update without screwing up the parent's iteration) var private const native noexport array<int> Incinerator; //TArray<UComponent*> var private const native noexport array<int> TickListeners; //TArray<UComponent*> var private const native noexport array<int> HelperTickListeners; //TArray<UUIHelper*> var private const native noexport array<int> ActionTickListeners; //TArray<ActionEvent*> var private const native noexport array<int> KeyListeners; // TArray<ActionEvent*> var private const native noexport array<int> KeyEventListeners; // TArray<ActionEvent*> var private const native noexport int InputActionListenerTable; // TMap< EInputAction, TArray<NotifyInfo>* >* native static function UIConsole GetInstance(); //------------------------------------------------------------------------------ function string GetLevelAction(){ return LastLevelAction; } //------------------------------------------------------------------------------ static native function AddWatch( name ObjName, name VarName, optional int ArrayIndex ); //----------------------------------------------------------------------------- static function ShowStatusMessage( PlayerController P, coerce string Msg, optional float Time, optional font Font, optional color Color, optional sound Sound, optional float Volume, optional float Pitch, optional string Holder, optional bool bClearExisting, optional float WrapX, optional bool bReverseOrder ) { if( P != None && P.Player != None && P.Player.Console != None ) { P.Player.Console.TimedMessage( Msg, Time, Font, Color, Holder, bClearExisting, WrapX, bReverseOrder ); if( Sound!=None ) { if(Volume==0) Volume=1; if(Pitch==0) Pitch=1; P.PlaySound( Sound, SLOT_Interface, Volume,,, Pitch ); } } } //----------------------------------------------------------------------------- static function BroadcastStatusMessage( Actor ContextActor, coerce string Msg, optional float Time, optional font Font, optional color Color, optional sound Sound, optional float Volume, optional float Pitch, optional string Holder, optional bool bClearExisting, optional float WrapX, optional bool bReverseOrder ) { local Controller C; for( C=ContextActor.Level.ControllerList; C!=None; C=C.NextController ) { if( PlayerController(C) != None ) ShowStatusMessage( PlayerController(C), Msg, Time, Font, Color, Sound, Volume, Pitch, Holder, bClearExisting, WrapX, bReverseOrder ); } } //----------------------------------------------------------------------------- static function ClearProgressMessages( PlayerController P ) { // Fix ARL: Implement me!! } //------------------------------------------------------------------------------ // Sends notifications to specified object.function once per frame. // Specified function must take one parameter: Canvas. //------------------------------------------------------------------------------ static native function RegisterRenderListener( object TargetObj, string TargetFunc ); static native function UnRegisterRenderListener( object TargetObj, string TargetFunc ); //------------------------------------------------------------------------------ static native function SendEvent( string EventName, optional ComponentHandle Target ); //------------------------------------------------------------------------------ static native exec function ComponentHandle LoadComponent( string Filename, optional string Component ); static native function ComponentHandle DestroyComponent( ComponentHandle Component ); //------------------------------------------------------------------------------ static native function AddComponent( ComponentHandle Component, optional ComponentHandle Container ); static native function SetOwner( ComponentHandle Component, Object Owner ); //------------------------------------------------------------------------------ static native function ComponentHandle GetComponent( string Name, optional ComponentHandle Root ); static native function ComponentHandle FindLooseComponent( string Name, optional ComponentHandle Root ); static native function GetLooseComponents( string Name, out array<ComponentHandle> Components, optional ComponentHandle Root ); //------------------------------------------------------------------------------ public native function DispatchMessage( coerce string Msg ); //------------------------------------------------------------------------------ public native function AddTickListener( Object A ); public native function RemoveTickListener( Object A ); //------------------------------------------------------------------------------ static native function int AddKeyListener( object Target, string TargetFunc ); static native function RemoveKeyListener( int MagicKey ); // MagicKey is returned from AddKeyListener. //------------------------------------------------------------------------------ static native function int AddKeyEventListener( object Target, string TargetFunc ); static native function RemoveKeyEventListener( int MagicKey ); // MagicKey is returned from AddKeyEventListener. //------------------------------------------------------------------------------ static native function Console GetConsole(); static native function UIConsole GetUIConsole(); static native function PlayerController GetPlayerOwner(); static native function float GetTimeSeconds(); static native function Client GetClient(); //------------------------------------------------------------------------------ static native function Dimension GetComponentSize( ComponentHandle Root ); //------------------------------------------------------------------------------ event Message( coerce string Msg, float MsgLife) { DispatchMessage(Msg); //!!ARL (mdf) tbd: // Optionally echo anything that goes to console to HUD if( bEchoToHUD && Viewport.Actor.myHUD != None ) //NEW Viewport.Actor.myHUD.Message( None, Msg, '' ); } //------------------------------------------------------------------------------ native function TimedMessage( coerce string Msg, optional float Duration, optional font Font, optional color Color, optional string Holder, optional bool bClearExisting, optional float WrapX, optional bool bReverseOrder ); //!!ARL (mdf) tbd: exec function ToggleEchoToHUD() { local bool bNewVal; bNewVal = !bEchoToHUD; if( Viewport.Actor != None ) { // make sure message not sent while echo enabled or might get echoed... bEchoToHUD = false; if( bNewVal ) { Viewport.Actor.ClientMessage( "ToggleEchoToHUD: enabled" ); } else { Viewport.Actor.ClientMessage( "ToggleEchoToHUD: disabled" ); } } bEchoToHUD = bNewVal; } defaultproperties { Filename="ModUI" ScaleX=1.000000 ScaleY=1.000000 PlugIn(0)=Class'Engine.TimeDemoPlugin' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |