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 00192 |
//NEW: Implementation factored out to DefaultConsole.uc //============================================================================= // Console: A player console, associated with a viewport. // This is a built-in Unreal class and it shouldn't be modified. //============================================================================= class Console extends Object native noexport config //NEW transient; // Internal. var private const int vtblOut; // Variables. var viewport Viewport; var float FrameX, FrameY; var bool bNoDrawWorld; var config array<Object> PlugIn; //NEW: Must be a subclass of ConsolePlugIn var private array<Object> ExecListeners; //NEW: PlugIns are automatically added as ExecListeners. Use AddExecListener to add additional components that require exec support. var float LevelLoadingPct; //NEW (arl) LevelLoading //----------------------------------------------------------------------------- // Input. // Input system states. enum EInputAction { IST_None, // Not performing special input processing. IST_Press, // Handling a keypress or button press. IST_Hold, // Handling holding a key or button. IST_Release, // Handling a key or button release. IST_Axis, // Handling analog axis movement. }; // Input keys. enum EInputKey { /*00*/ IK_None ,IK_LeftMouse ,IK_RightMouse ,IK_Cancel , /*04*/ IK_MiddleMouse ,IK_Unknown05 ,IK_Unknown06 ,IK_Unknown07 , /*08*/ IK_Backspace ,IK_Tab ,IK_Unknown0A ,IK_Unknown0B , /*0C*/ IK_Unknown0C ,IK_Enter ,IK_Unknown0E ,IK_Unknown0F , /*10*/ IK_Shift ,IK_Ctrl ,IK_Alt ,IK_Pause , /*14*/ IK_CapsLock ,IK_Unknown15 ,IK_Unknown16 ,IK_Unknown17 , /*18*/ IK_Unknown18 ,IK_Unknown19 ,IK_Unknown1A ,IK_Escape , /*1C*/ IK_Unknown1C ,IK_Unknown1D ,IK_Unknown1E ,IK_Unknown1F , /*20*/ IK_Space ,IK_PageUp ,IK_PageDown ,IK_End , /*24*/ IK_Home ,IK_Left ,IK_Up ,IK_Right , /*28*/ IK_Down ,IK_Select ,IK_Print ,IK_Execute , /*2C*/ IK_PrintScrn ,IK_Insert ,IK_Delete ,IK_Help , /*30*/ IK_0 ,IK_1 ,IK_2 ,IK_3 , /*34*/ IK_4 ,IK_5 ,IK_6 ,IK_7 , /*38*/ IK_8 ,IK_9 ,IK_Unknown3A ,IK_Unknown3B , /*3C*/ IK_Unknown3C ,IK_Unknown3D ,IK_Unknown3E ,IK_Unknown3F , /*40*/ IK_Unknown40 ,IK_A ,IK_B ,IK_C , /*44*/ IK_D ,IK_E ,IK_F ,IK_G , /*48*/ IK_H ,IK_I ,IK_J ,IK_K , /*4C*/ IK_L ,IK_M ,IK_N ,IK_O , /*50*/ IK_P ,IK_Q ,IK_R ,IK_S , /*54*/ IK_T ,IK_U ,IK_V ,IK_W , /*58*/ IK_X ,IK_Y ,IK_Z ,IK_Unknown5B , /*5C*/ IK_Unknown5C ,IK_Unknown5D ,IK_Unknown5E ,IK_Unknown5F , /*60*/ IK_NumPad0 ,IK_NumPad1 ,IK_NumPad2 ,IK_NumPad3 , /*64*/ IK_NumPad4 ,IK_NumPad5 ,IK_NumPad6 ,IK_NumPad7 , /*68*/ IK_NumPad8 ,IK_NumPad9 ,IK_GreyStar ,IK_GreyPlus , /*6C*/ IK_Separator ,IK_GreyMinus ,IK_NumPadPeriod,IK_GreySlash , /*70*/ IK_F1 ,IK_F2 ,IK_F3 ,IK_F4 , /*74*/ IK_F5 ,IK_F6 ,IK_F7 ,IK_F8 , /*78*/ IK_F9 ,IK_F10 ,IK_F11 ,IK_F12 , /*7C*/ IK_F13 ,IK_F14 ,IK_F15 ,IK_F16 , /*80*/ IK_F17 ,IK_F18 ,IK_F19 ,IK_F20 , /*84*/ IK_F21 ,IK_F22 ,IK_F23 ,IK_F24 , /*88*/ IK_Unknown88 ,IK_Unknown89 ,IK_Unknown8A ,IK_Unknown8B , /*8C*/ IK_Unknown8C ,IK_Unknown8D ,IK_Unknown8E ,IK_Unknown8F , /*90*/ IK_NumLock ,IK_ScrollLock ,IK_Unknown92 ,IK_Unknown93 , /*94*/ IK_Unknown94 ,IK_Unknown95 ,IK_Unknown96 ,IK_Unknown97 , /*98*/ IK_Unknown98 ,IK_Unknown99 ,IK_Unknown9A ,IK_Unknown9B , /*9C*/ IK_Unknown9C ,IK_Unknown9D ,IK_Unknown9E ,IK_Unknown9F , /*A0*/ IK_LShift ,IK_RShift ,IK_LControl ,IK_RControl , /*A4*/ IK_UnknownA4 ,IK_UnknownA5 ,IK_UnknownA6 ,IK_UnknownA7 , /*A8*/ IK_UnknownA8 ,IK_UnknownA9 ,IK_UnknownAA ,IK_UnknownAB , /*AC*/ IK_UnknownAC ,IK_UnknownAD ,IK_UnknownAE ,IK_UnknownAF , /*B0*/ IK_UnknownB0 ,IK_UnknownB1 ,IK_UnknownB2 ,IK_UnknownB3 , /*B4*/ IK_UnknownB4 ,IK_UnknownB5 ,IK_UnknownB6 ,IK_UnknownB7 , /*B8*/ IK_UnknownB8 ,IK_UnknownB9 ,IK_Semicolon ,IK_Equals , /*BC*/ IK_Comma ,IK_Minus ,IK_Period ,IK_Slash , /*C0*/ IK_Tilde ,IK_UnknownC1 ,IK_UnknownC2 ,IK_UnknownC3 , /*C4*/ IK_UnknownC4 ,IK_UnknownC5 ,IK_UnknownC6 ,IK_UnknownC7 , /*C8*/ IK_Joy1 ,IK_Joy2 ,IK_Joy3 ,IK_Joy4 , /*CC*/ IK_Joy5 ,IK_Joy6 ,IK_Joy7 ,IK_Joy8 , /*D0*/ IK_Joy9 ,IK_Joy10 ,IK_Joy11 ,IK_Joy12 , /*D4*/ IK_Joy13 ,IK_Joy14 ,IK_Joy15 ,IK_Joy16 , /*D8*/ IK_UnknownD8 ,IK_UnknownD9 ,IK_UnknownDA ,IK_LeftBracket , /*DC*/ IK_Backslash ,IK_RightBracket,IK_SingleQuote ,IK_UnknownDF , /*E0*/ IK_JoyX ,IK_JoyY ,IK_JoyZ ,IK_JoyR , /*E4*/ IK_MouseX ,IK_MouseY ,IK_MouseZ ,IK_MouseW , /*E8*/ IK_JoyU ,IK_JoyV ,IK_UnknownEA ,IK_UnknownEB , /*EC*/ IK_MouseWhlUp ,IK_MouseWhlDn ,IK_Unknown10E ,UK_Unknown10F , /*F0*/ IK_UnknownF0 ,IK_UnknownF1 ,IK_UnknownF2 ,IK_UnknownF3 , /*F4*/ IK_UnknownF4 ,IK_UnknownF5 ,IK_Attn ,IK_CrSel , /*F8*/ IK_ExSel ,IK_ErEof ,IK_Play ,IK_Zoom , /*FC*/ IK_NoName ,IK_PA1 ,IK_OEMClear }; //----------------------------------------------------------------------------- // natives. // Execute a command on this console. native function bool ConsoleCommand( coerce string S ); native function string ConsoleCommandEx( coerce string S ); //NEW (arl) native final function TextSize( font Font, coerce string String, out float XL, out float YL ); native function AddExecListener( Object Listener ); native function RemoveExecListener( Object Listener ); //----------------------------------------------------------------------------- // Exec functions accessible from the console and key bindings. // Begin typing a command on the console. exec function Type(); exec function Talk(); exec function TeamTalk(); //----------------------------------------------------------------------------- // Functions. // Write a message to the console. event Message( coerce string Msg, float MsgLife); // Easy messaging. function AddString( coerce string Msg ){ Message(Msg, 1.0); } 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 ); //NEW // Clear messages. function ClearMessages(); //NEW function EnableDrawWorld() { bNoDrawWorld=true; } function DisableDrawWorld(){ bNoDrawWorld=false; } //OLD // Fix ARL: Add KeyListeners. // Fix ARL: Verify which of these events are still getting sent. // Called by the engine when a single key is typed. event bool KeyType( EInputKey Key ); // Called by the engine when a key, mouse, or joystick button is pressed // or released, or any analog axis movement is processed. event bool KeyEvent( EInputKey Key, EInputAction Action, FLOAT Delta ); // Called each rendering iteration to update any time-based display. event Tick( float Delta ); // Called before rendering the world view. event PreRender( canvas C ); // Called after rendering the world view. event PostRender( canvas C ); // Called when video settings change (resolution, driver, color depth). event VideoChange(); event NotifyLevelChange(){ ClearMessages(); } event ConnectFailure( string FailCode, string URL ); final function string FormatFloat( float f) { local string s; local int i; s = string(f); i = InStr(s, "."); if(i != -1) s = Left(s, i+3); return s; } //OLD defaultproperties { PlugIn(0)=Class'Engine.TimeDemoPlugin' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |