fix code style
This commit is contained in:
parent
f63b4a80a3
commit
db98f33e40
@ -3,7 +3,7 @@ Class ClassicStyle extends KF2Style;
|
||||
`include(Build.uci)
|
||||
`include(Logger.uci)
|
||||
|
||||
function RenderFramedWindow( KFGUI_FloatingWindow P)
|
||||
function RenderFramedWindow(KFGUI_FloatingWindow P)
|
||||
{
|
||||
local int XS, YS, TitleHeight;
|
||||
local float XL, YL, FontScale;
|
||||
@ -35,7 +35,7 @@ function RenderFramedWindow( KFGUI_FloatingWindow P)
|
||||
}
|
||||
}
|
||||
|
||||
function RenderWindow( KFGUI_Page P)
|
||||
function RenderWindow(KFGUI_Page P)
|
||||
{
|
||||
local int XS, YS;
|
||||
|
||||
@ -51,7 +51,7 @@ function RenderWindow( KFGUI_Page P)
|
||||
Canvas.DrawTileStretched(BorderTextures[`BOX_SMALL_SLIGHTTRANSPARENT], XS, YS, 0,0, 128, 128);
|
||||
}
|
||||
|
||||
function RenderToolTip( KFGUI_Tooltip TT)
|
||||
function RenderToolTip(KFGUI_Tooltip TT)
|
||||
{
|
||||
local int i;
|
||||
local float X, Y,XS, YS, TX, TY, TS, DefFontHeight;
|
||||
@ -110,7 +110,7 @@ function RenderToolTip( KFGUI_Tooltip TT)
|
||||
}
|
||||
}
|
||||
|
||||
function RenderScrollBar( KFGUI_ScrollBarBase S)
|
||||
function RenderScrollBar(KFGUI_ScrollBarBase S)
|
||||
{
|
||||
local float A;
|
||||
local byte i;
|
||||
@ -165,7 +165,7 @@ function RenderScrollBar( KFGUI_ScrollBarBase S)
|
||||
}
|
||||
}
|
||||
|
||||
function RenderCheckbox( KFGUI_CheckBox C)
|
||||
function RenderCheckbox(KFGUI_CheckBox C)
|
||||
{
|
||||
local Texture CheckMark;
|
||||
|
||||
@ -185,7 +185,7 @@ function RenderCheckbox( KFGUI_CheckBox C)
|
||||
}
|
||||
}
|
||||
|
||||
function RenderComboBox( KFGUI_ComboBox C)
|
||||
function RenderComboBox(KFGUI_ComboBox C)
|
||||
{
|
||||
if (C.bDisabled)
|
||||
Canvas.SetDrawColor(64, 64, 64, 255);
|
||||
@ -211,7 +211,7 @@ function RenderComboBox( KFGUI_ComboBox C)
|
||||
}
|
||||
}
|
||||
|
||||
function RenderComboList( KFGUI_ComboSelector C)
|
||||
function RenderComboList(KFGUI_ComboSelector C)
|
||||
{
|
||||
local float X, Y,YL, YP, Edge;
|
||||
local int i;
|
||||
@ -263,7 +263,7 @@ function RenderComboList( KFGUI_ComboSelector C)
|
||||
}
|
||||
}
|
||||
|
||||
function RenderRightClickMenu( KFGUI_RightClickMenu C)
|
||||
function RenderRightClickMenu(KFGUI_RightClickMenu C)
|
||||
{
|
||||
local float X, Y,XL, YL, YP, Edge, TextScale;
|
||||
local int i;
|
||||
@ -324,7 +324,7 @@ function RenderRightClickMenu( KFGUI_RightClickMenu C)
|
||||
}
|
||||
}
|
||||
|
||||
function RenderButton( KFGUI_Button B)
|
||||
function RenderButton(KFGUI_Button B)
|
||||
{
|
||||
local float XL, YL, TS, AX, AY, GamepadTexSize;
|
||||
local Texture2D Mat, ButtonTex;
|
||||
@ -360,7 +360,7 @@ function RenderButton( KFGUI_Button B)
|
||||
TS = GetFontScaler();
|
||||
TS *= B.FontScale;
|
||||
|
||||
while( true)
|
||||
while (true)
|
||||
{
|
||||
Canvas.TextSize(B.ButtonText, XL, YL, TS, TS);
|
||||
if (XL < (B.CompPos[2]*0.9) && YL < (B.CompPos[3]*0.9))
|
||||
@ -381,12 +381,12 @@ function RenderButton( KFGUI_Button B)
|
||||
if (ButtonTex != None)
|
||||
{
|
||||
B.GetRealtivePos(AX, AY);
|
||||
while( (Canvas.CurX-(GamepadTexSize*1.25)) < AX)
|
||||
while ((Canvas.CurX-(GamepadTexSize*1.25)) < AX)
|
||||
{
|
||||
GamepadTexSize *= 0.95;
|
||||
}
|
||||
|
||||
switch(ButtonTex.Name)
|
||||
switch (ButtonTex.Name)
|
||||
{
|
||||
case 'XboxTypeS_A_Asset':
|
||||
case 'XboxTypeS_B_Asset':
|
||||
|
@ -131,18 +131,18 @@ function InitStyle()
|
||||
ColorCodes.AddItem(ColorInfo);
|
||||
}
|
||||
|
||||
function RenderFramedWindow( KFGUI_FloatingWindow P );
|
||||
function RenderWindow( KFGUI_Page P );
|
||||
function RenderToolTip( KFGUI_Tooltip TT );
|
||||
function RenderButton( KFGUI_Button B );
|
||||
function RenderScrollBar( KFGUI_ScrollBarBase S );
|
||||
function RenderColumnHeader( KFGUI_ColumnTop C, float XPos, float Width, int Index, bool bFocus, bool bSort );
|
||||
function RenderRightClickMenu( KFGUI_RightClickMenu C );
|
||||
function RenderCheckbox( KFGUI_CheckBox C );
|
||||
function RenderComboBox( KFGUI_ComboBox C );
|
||||
function RenderComboList( KFGUI_ComboSelector C );
|
||||
function RenderFramedWindow(KFGUI_FloatingWindow P);
|
||||
function RenderWindow(KFGUI_Page P);
|
||||
function RenderToolTip(KFGUI_Tooltip TT);
|
||||
function RenderButton(KFGUI_Button B);
|
||||
function RenderScrollBar(KFGUI_ScrollBarBase S);
|
||||
function RenderColumnHeader(KFGUI_ColumnTop C, float XPos, float Width, int Index, bool bFocus, bool bSort);
|
||||
function RenderRightClickMenu(KFGUI_RightClickMenu C);
|
||||
function RenderCheckbox(KFGUI_CheckBox C);
|
||||
function RenderComboBox(KFGUI_ComboBox C);
|
||||
function RenderComboList(KFGUI_ComboSelector C);
|
||||
|
||||
function Font PickFont( out float Scaler, optional bool bNumbersOnly, optional bool bInfinite)
|
||||
function Font PickFont(out float Scaler, optional bool bNumbersOnly, optional bool bInfinite)
|
||||
{
|
||||
Scaler = GetFontScaler();
|
||||
|
||||
@ -154,7 +154,7 @@ function Font PickFont( out float Scaler, optional bool bNumbersOnly, optional b
|
||||
return MainFont;
|
||||
}
|
||||
|
||||
function PickDefaultFontSize( float YRes)
|
||||
function PickDefaultFontSize(float YRes)
|
||||
{
|
||||
local int XL, YL;
|
||||
local string S;
|
||||
@ -164,22 +164,22 @@ function PickDefaultFontSize( float YRes)
|
||||
|
||||
DefaultHeight=float(YL)*YRes;
|
||||
}
|
||||
final function float ScreenScale( float Size, optional float MaxRes=1080.f)
|
||||
final function float ScreenScale(float Size, optional float MaxRes=1080.f)
|
||||
{
|
||||
return Size * ( HUDOwner.SizeY / MaxRes );
|
||||
return Size * ( HUDOwner.SizeY / MaxRes);
|
||||
}
|
||||
final function float GetFontScaler(optional float Scaler=0.750f, optional float Min=0.175f, optional float Max=1.0f)
|
||||
{
|
||||
return FClamp((HUDOwner.SizeY / 1080.f) * Scaler, Min, Max);
|
||||
}
|
||||
final function DrawText( coerce string S)
|
||||
final function DrawText(coerce string S)
|
||||
{
|
||||
local float Scale;
|
||||
|
||||
Canvas.Font=PickFont(Scale);
|
||||
Canvas.DrawText(S, ,Scale, Scale);
|
||||
}
|
||||
final function DrawCenteredText( coerce string S, float X, float Y, optional float Scale=1.f, optional bool bVertical, optional bool bUseOutline)
|
||||
final function DrawCenteredText(coerce string S, float X, float Y, optional float Scale=1.f, optional bool bVertical, optional bool bUseOutline)
|
||||
{
|
||||
local float XL, YL;
|
||||
|
||||
@ -192,12 +192,12 @@ final function DrawCenteredText( coerce string S, float X, float Y, optional flo
|
||||
DrawTextShadow(S, Canvas.CurX, Canvas.CurY, 1, Scale);
|
||||
else Canvas.DrawText(S, ,Scale, Scale);
|
||||
}
|
||||
final function string StripColorTags( coerce string S)
|
||||
final function string StripColorTags(coerce string S)
|
||||
{
|
||||
local int Pos;
|
||||
|
||||
Pos = InStr(S, "\\c");
|
||||
while( Pos != INDEX_NONE)
|
||||
while (Pos != INDEX_NONE)
|
||||
{
|
||||
S = Left(S, Pos) $ Mid(S, Pos+3);
|
||||
Pos = InStr(S, "\\c");
|
||||
@ -205,7 +205,7 @@ final function string StripColorTags( coerce string S)
|
||||
|
||||
return S;
|
||||
}
|
||||
final function DrawColoredText( coerce string S, float X, float Y, optional float Scale=1.f, optional bool bUseOutline)
|
||||
final function DrawColoredText(coerce string S, float X, float Y, optional float Scale=1.f, optional bool bUseOutline)
|
||||
{
|
||||
local float XL, YL;
|
||||
local int i, Index;
|
||||
@ -271,7 +271,7 @@ final function DrawColoredText( coerce string S, float X, float Y, optional floa
|
||||
}
|
||||
}
|
||||
}
|
||||
final function DrawTextBlurry( coerce string S, float X, float Y, optional float Scale=1.f)
|
||||
final function DrawTextBlurry(coerce string S, float X, float Y, optional float Scale=1.f)
|
||||
{
|
||||
local Color OldDrawColor;
|
||||
|
||||
@ -291,7 +291,7 @@ final function DrawTextBlurry( coerce string S, float X, float Y, optional float
|
||||
Canvas.SetPos(X, Y);
|
||||
Canvas.DrawText(S, ,Scale, Scale);
|
||||
}
|
||||
final function DrawTextOutline( coerce string S, float X, float Y, int Size, Color OutlineColor, optional float Scale=1.f, optional FontRenderInfo FRI)
|
||||
final function DrawTextOutline(coerce string S, float X, float Y, int Size, Color OutlineColor, optional float Scale=1.f, optional FontRenderInfo FRI)
|
||||
{
|
||||
local Color OldDrawColor;
|
||||
local int XS, YS, Steps;
|
||||
@ -320,7 +320,7 @@ final function DrawTextOutline( coerce string S, float X, float Y, int Size, Col
|
||||
Canvas.SetPos(X, Y);
|
||||
Canvas.DrawText(S, , Scale, Scale, FRI);
|
||||
}
|
||||
final function DrawTextShadow( coerce string S, float X, float Y, float ShadowSize, optional float Scale=1.f)
|
||||
final function DrawTextShadow(coerce string S, float X, float Y, float ShadowSize, optional float Scale=1.f)
|
||||
{
|
||||
local Color OldDrawColor;
|
||||
|
||||
@ -334,7 +334,7 @@ final function DrawTextShadow( coerce string S, float X, float Y, float ShadowSi
|
||||
Canvas.DrawColor = OldDrawColor;
|
||||
Canvas.DrawText(S, , Scale, Scale);
|
||||
}
|
||||
final function DrawTexturedString( coerce string S, float X, float Y, optional float TextScaler=1.f, optional FontRenderInfo FRI, optional bool bUseOutline, optional bool bOnlyTexture)
|
||||
final function DrawTexturedString(coerce string S, float X, float Y, optional float TextScaler=1.f, optional FontRenderInfo FRI, optional bool bUseOutline, optional bool bOnlyTexture)
|
||||
{
|
||||
local Texture2D Mat;
|
||||
local string D;
|
||||
@ -345,7 +345,7 @@ final function DrawTexturedString( coerce string S, float X, float Y, optional f
|
||||
OrgC = Canvas.DrawColor;
|
||||
|
||||
Mat = FindNextTexture(S);
|
||||
while( Mat != None)
|
||||
while (Mat != None)
|
||||
{
|
||||
i = InStr(S, " < TEXTURE");
|
||||
j = InStr(S, " > ");
|
||||
@ -416,7 +416,7 @@ final function string StripTextureFromString(string S, optional bool bNoStringAd
|
||||
{
|
||||
local int i, j;
|
||||
|
||||
while( true)
|
||||
while (true)
|
||||
{
|
||||
i = InStr(S, " < Icon > ");
|
||||
if (i == INDEX_NONE)
|
||||
@ -454,9 +454,9 @@ final function string GetTimeString(int Seconds)
|
||||
return Time;
|
||||
}
|
||||
|
||||
final function DrawCornerTexNU( int SizeX, int SizeY, byte Dir ) // Draw non-uniform corner.
|
||||
final function DrawCornerTexNU(int SizeX, int SizeY, byte Dir ) // Draw non-uniform corner.
|
||||
{
|
||||
switch( Dir)
|
||||
switch (Dir)
|
||||
{
|
||||
case 0: // Up-left
|
||||
Canvas.DrawTile(ItemTex, SizeX, SizeY, 77, 15, -66, 58);
|
||||
@ -471,9 +471,9 @@ final function DrawCornerTexNU( int SizeX, int SizeY, byte Dir ) // Draw non-uni
|
||||
Canvas.DrawTile(ItemTex, SizeX, SizeY, 11, 73, 66, -58);
|
||||
}
|
||||
}
|
||||
final function DrawCornerTex( int Size, byte Dir)
|
||||
final function DrawCornerTex(int Size, byte Dir)
|
||||
{
|
||||
switch( Dir)
|
||||
switch (Dir)
|
||||
{
|
||||
case 0: // Up-left
|
||||
Canvas.DrawTile(ItemTex, Size, Size, 77, 15, -66, 58);
|
||||
@ -488,12 +488,12 @@ final function DrawCornerTex( int Size, byte Dir)
|
||||
Canvas.DrawTile(ItemTex, Size, Size, 11, 73, 66, -58);
|
||||
}
|
||||
}
|
||||
final function DrawWhiteBox( float XS, float YS, optional bool bClip)
|
||||
final function DrawWhiteBox(float XS, float YS, optional bool bClip)
|
||||
{
|
||||
Canvas.DrawTile(ItemTex, XS, YS, 19, 45, 1,1, ,bClip);
|
||||
}
|
||||
|
||||
final function DrawRectBox( float X, float Y, float Width, float Height, int Edge, optional byte Extrav)
|
||||
final function DrawRectBox(float X, float Y, float Width, float Height, int Edge, optional byte Extrav)
|
||||
{
|
||||
if (Extrav == 2)
|
||||
Edge=Min(FMin(Edge, (Width)*0.5), Height);// Verify size.
|
||||
@ -663,7 +663,7 @@ final function DrawRectBox( float X, float Y, float Width, float Height, int Edg
|
||||
}
|
||||
}
|
||||
|
||||
final function DrawBoxHollow( float X, float Y, float Width, float Height, float Thickness)
|
||||
final function DrawBoxHollow(float X, float Y, float Width, float Height, float Thickness)
|
||||
{
|
||||
Canvas.PreOptimizeDrawTiles(4, ItemTex);
|
||||
|
||||
@ -680,7 +680,7 @@ final function DrawBoxHollow( float X, float Y, float Width, float Height, float
|
||||
DrawWhiteBox(Thickness, Height);
|
||||
}
|
||||
|
||||
final function DrawOutlinedBox( float X, float Y, float Width, float Height, float Thickness, Color BoxColor, Color OutlineColor)
|
||||
final function DrawOutlinedBox(float X, float Y, float Width, float Height, float Thickness, Color BoxColor, Color OutlineColor)
|
||||
{
|
||||
Canvas.DrawColor = BoxColor;
|
||||
Canvas.SetPos(X + Thickness, Y + Thickness);
|
||||
@ -717,12 +717,12 @@ final function DrawBoxCorners(float BorderSize, float X, float Y, float W, float
|
||||
else DrawWhiteBox(BorderSize, BorderSize);
|
||||
}
|
||||
|
||||
final function DrawRoundedBox( float BorderSize, float X, float Y, float W, float H, Color BoxColor)
|
||||
final function DrawRoundedBox(float BorderSize, float X, float Y, float W, float H, Color BoxColor)
|
||||
{
|
||||
DrawRoundedBoxEx(BorderSize, X, Y, W, H, BoxColor, true, true, true, true);
|
||||
}
|
||||
|
||||
final function DrawRoundedBoxEx( float BorderSize, float X, float Y, float W, float H, Color BoxColor, optional bool TopLeft, optional bool TopRight, optional bool BottomLeft, optional bool BottomRight)
|
||||
final function DrawRoundedBoxEx(float BorderSize, float X, float Y, float W, float H, Color BoxColor, optional bool TopLeft, optional bool TopRight, optional bool BottomLeft, optional bool BottomRight)
|
||||
{
|
||||
Canvas.DrawColor = BoxColor;
|
||||
|
||||
@ -749,12 +749,12 @@ final function DrawRoundedBoxEx( float BorderSize, float X, float Y, float W, fl
|
||||
DrawBoxCorners(BorderSize, X, Y, W, H, TopLeft, TopRight, BottomLeft, BottomRight);
|
||||
}
|
||||
|
||||
final function DrawRoundedBoxHollow( float BorderSize, float X, float Y, float W, float H, Color BoxColor)
|
||||
final function DrawRoundedBoxHollow(float BorderSize, float X, float Y, float W, float H, Color BoxColor)
|
||||
{
|
||||
DrawRoundedBoxHollowEx(BorderSize, X, Y, W, H, BoxColor, true, true, true, true);
|
||||
}
|
||||
|
||||
final function DrawRoundedBoxHollowEx( float BorderSize, float X, float Y, float W, float H, Color BoxColor, optional bool TopLeft, optional bool TopRight, optional bool BottomLeft, optional bool BottomRight)
|
||||
final function DrawRoundedBoxHollowEx(float BorderSize, float X, float Y, float W, float H, Color BoxColor, optional bool TopLeft, optional bool TopRight, optional bool BottomLeft, optional bool BottomRight)
|
||||
{
|
||||
Canvas.PreOptimizeDrawTiles(8, ItemTex);
|
||||
|
||||
@ -777,7 +777,7 @@ final function DrawRoundedBoxHollowEx( float BorderSize, float X, float Y, float
|
||||
DrawBoxCorners(BorderSize, X, Y, W, H, TopLeft, TopRight, BottomLeft, BottomRight);
|
||||
}
|
||||
|
||||
final function DrawRoundedBoxOutlined( float BorderSize, float X, float Y, float Width, float Height, Color BoxColor, Color OutlineColor)
|
||||
final function DrawRoundedBoxOutlined(float BorderSize, float X, float Y, float Width, float Height, Color BoxColor, Color OutlineColor)
|
||||
{
|
||||
Canvas.DrawColor = BoxColor;
|
||||
Canvas.SetPos(X + BorderSize, Y + BorderSize);
|
||||
@ -786,7 +786,7 @@ final function DrawRoundedBoxOutlined( float BorderSize, float X, float Y, float
|
||||
DrawRoundedBoxHollow(BorderSize, X, Y, Width, Height, OutlineColor);
|
||||
}
|
||||
|
||||
final function DrawRoundedBoxOutlinedEx( float BorderSize, float X, float Y, float Width, float Height, Color BoxColor, Color OutlineColor, optional bool TopLeft, optional bool TopRight, optional bool BottomLeft, optional bool BottomRight)
|
||||
final function DrawRoundedBoxOutlinedEx(float BorderSize, float X, float Y, float Width, float Height, Color BoxColor, Color OutlineColor, optional bool TopLeft, optional bool TopRight, optional bool BottomLeft, optional bool BottomRight)
|
||||
{
|
||||
Canvas.DrawColor = BoxColor;
|
||||
Canvas.SetPos(X + BorderSize, Y + BorderSize);
|
||||
@ -795,11 +795,11 @@ final function DrawRoundedBoxOutlinedEx( float BorderSize, float X, float Y, flo
|
||||
DrawRoundedBoxHollowEx(BorderSize, X, Y, Width, Height, OutlineColor, TopLeft, TopRight, BottomLeft, BottomRight);
|
||||
}
|
||||
|
||||
final function DrawArrowBox( int Direction, float X, float Y, float Width, float Height)
|
||||
final function DrawArrowBox(int Direction, float X, float Y, float Width, float Height)
|
||||
{
|
||||
local Texture2D DirectionMat;
|
||||
|
||||
switch( Direction)
|
||||
switch (Direction)
|
||||
{
|
||||
case 0:
|
||||
DirectionMat=ArrowTextures[`ARROW_UP];
|
||||
@ -822,7 +822,7 @@ final function DrawArrowBox( int Direction, float X, float Y, float Width, float
|
||||
DrawTileStretched(DirectionMat, X,Y, Width, Height);
|
||||
}
|
||||
|
||||
final function DrawTileStretched( Texture Tex, float X, float Y, float XS, float YS)
|
||||
final function DrawTileStretched(Texture Tex, float X, float Y, float XS, float YS)
|
||||
{
|
||||
local float mW, mH, MidX, MidY, SmallTileW, SmallTileH, fX, fY;
|
||||
local int OptimizeTiles;
|
||||
@ -903,7 +903,7 @@ final function DrawTileStretched( Texture Tex, float X, float Y, float XS, float
|
||||
Canvas.DrawTile(Tex, fX, fY, mW-fX, mH-fY, fX, fY);
|
||||
}
|
||||
|
||||
final function DrawTextJustified( byte Justification, float X1, float Y1, float X2, float Y2, coerce string S, optional float XS, optional float YS)
|
||||
final function DrawTextJustified(byte Justification, float X1, float Y1, float X2, float Y2, coerce string S, optional float XS, optional float YS)
|
||||
{
|
||||
local float XL, YL;
|
||||
local float CurY, CurX;
|
||||
@ -931,7 +931,7 @@ final function DrawTextJustified( byte Justification, float X1, float Y1, float
|
||||
Canvas.DrawText(S, ,XS, YS);
|
||||
}
|
||||
|
||||
static final function float TimeFraction( float Start, float End, float Current)
|
||||
static final function float TimeFraction(float Start, float End, float Current)
|
||||
{
|
||||
return FClamp((Current - Start) / (End - Start), 0.f, 1.f);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ var int FontBlurX, FontBlurX2, FontBlurY, FontBlurY2, FastFontBlurX, FastFontBlu
|
||||
|
||||
var bool bMouseWasIdle, bIsInMenuState, bAbsorbInput, bIsInvalid, bHideCursor, bUsingGamepad, bForceEngineCursor, bNoInputReset;
|
||||
|
||||
static function KF2GUIController GetGUIController( PlayerController PC)
|
||||
static function KF2GUIController GetGUIController(PlayerController PC)
|
||||
{
|
||||
local KF2GUIController G;
|
||||
|
||||
@ -155,7 +155,7 @@ simulated function HandleDrawMenu()
|
||||
if (bIsInMenuState ) PlayerOwner.PlayerInput = CustomInput;
|
||||
}
|
||||
}
|
||||
simulated function RenderMenu( Canvas C)
|
||||
simulated function RenderMenu(Canvas C)
|
||||
{
|
||||
local int i;
|
||||
local float OrgX, OrgY, ClipX, ClipY;
|
||||
@ -242,7 +242,7 @@ simulated final function InventoryChanged(optional KFWeapon Wep, optional bool b
|
||||
}
|
||||
}
|
||||
|
||||
simulated final function SetMenuState( bool bActive)
|
||||
simulated final function SetMenuState(bool bActive)
|
||||
{
|
||||
if (PlayerOwner.PlayerInput == None)
|
||||
{
|
||||
@ -430,7 +430,7 @@ simulated function MouseMove()
|
||||
}
|
||||
}
|
||||
|
||||
simulated final function int GetFreeIndex( bool bNewAlwaysTop ) // Find first allowed top index of the stack.
|
||||
simulated final function int GetFreeIndex(bool bNewAlwaysTop ) // Find first allowed top index of the stack.
|
||||
{
|
||||
local int i;
|
||||
|
||||
@ -444,7 +444,7 @@ simulated final function int GetFreeIndex( bool bNewAlwaysTop ) // Find first al
|
||||
ActiveMenus.Length = i+1;
|
||||
return i;
|
||||
}
|
||||
simulated function KFGUI_Base InitializeHUDWidget( class < KFGUI_Base> GUIClass)
|
||||
simulated function KFGUI_Base InitializeHUDWidget(class < KFGUI_Base> GUIClass)
|
||||
{
|
||||
local KFGUI_Base Widget;
|
||||
|
||||
@ -466,7 +466,7 @@ simulated function KFGUI_Base InitializeHUDWidget( class < KFGUI_Base> GUIClass)
|
||||
|
||||
return Widget;
|
||||
}
|
||||
simulated function KFGUI_Page OpenMenu( class < KFGUI_Page> MenuClass)
|
||||
simulated function KFGUI_Page OpenMenu(class < KFGUI_Page> MenuClass)
|
||||
{
|
||||
local int i;
|
||||
local KFGUI_Page M;
|
||||
@ -527,7 +527,7 @@ simulated function KFGUI_Page OpenMenu( class < KFGUI_Page> MenuClass)
|
||||
M.ShowMenu();
|
||||
return M;
|
||||
}
|
||||
simulated function CloseMenu( class < KFGUI_Page> MenuClass, optional bool bCloseAll)
|
||||
simulated function CloseMenu(class < KFGUI_Page> MenuClass, optional bool bCloseAll)
|
||||
{
|
||||
local int i, j;
|
||||
local KFGUI_Page M;
|
||||
@ -565,7 +565,7 @@ simulated function CloseMenu( class < KFGUI_Page> MenuClass, optional bool bClos
|
||||
SetMenuState(false);
|
||||
}
|
||||
}
|
||||
simulated function PopCloseMenu( KFGUI_Base Item)
|
||||
simulated function PopCloseMenu(KFGUI_Base Item)
|
||||
{
|
||||
local int i;
|
||||
local KFGUI_Page M;
|
||||
@ -602,7 +602,7 @@ simulated function PopCloseMenu( KFGUI_Base Item)
|
||||
if (ActiveMenus.Length == 0)
|
||||
SetMenuState(false);
|
||||
}
|
||||
simulated function BringMenuToFront( KFGUI_Page Page)
|
||||
simulated function BringMenuToFront(KFGUI_Page Page)
|
||||
{
|
||||
local int i;
|
||||
|
||||
@ -623,7 +623,7 @@ simulated function BringMenuToFront( KFGUI_Page Page)
|
||||
ActiveMenus.Insert(0, 1);
|
||||
ActiveMenus[0] = Page;
|
||||
}
|
||||
simulated final function bool MenuIsOpen( optional class < KFGUI_Page> MenuClass)
|
||||
simulated final function bool MenuIsOpen(optional class < KFGUI_Page> MenuClass)
|
||||
{
|
||||
local int i;
|
||||
|
||||
@ -632,7 +632,7 @@ simulated final function bool MenuIsOpen( optional class < KFGUI_Page> MenuClass
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
simulated final function GrabInputFocus( KFGUI_Base Comp, optional bool bForce)
|
||||
simulated final function GrabInputFocus(KFGUI_Base Comp, optional bool bForce)
|
||||
{
|
||||
if (Comp == KeyboardFocus && !bForce)
|
||||
return;
|
||||
@ -654,7 +654,7 @@ simulated final function GrabInputFocus( KFGUI_Base Comp, optional bool bForce)
|
||||
KeyboardFocus = Comp;
|
||||
}
|
||||
|
||||
simulated final function GUI_InputMouse( bool bPressed, bool bRight)
|
||||
simulated final function GUI_InputMouse(bool bPressed, bool bRight)
|
||||
{
|
||||
local byte i;
|
||||
|
||||
@ -708,11 +708,11 @@ simulated final function GUI_InputMouse( bool bPressed, bool bRight)
|
||||
MouseFocus.MouseRelease(bRight);
|
||||
}
|
||||
}
|
||||
simulated final function bool CheckMouse( name Key, EInputEvent Event)
|
||||
simulated final function bool CheckMouse(name Key, EInputEvent Event)
|
||||
{
|
||||
if (Event == IE_Pressed)
|
||||
{
|
||||
switch( Key)
|
||||
switch (Key)
|
||||
{
|
||||
case 'XboxTypeS_A':
|
||||
case 'LeftMouseButton':
|
||||
@ -726,7 +726,7 @@ simulated final function bool CheckMouse( name Key, EInputEvent Event)
|
||||
}
|
||||
else if (Event == IE_Released)
|
||||
{
|
||||
switch( Key)
|
||||
switch (Key)
|
||||
{
|
||||
case 'XboxTypeS_A':
|
||||
case 'LeftMouseButton':
|
||||
@ -740,7 +740,7 @@ simulated final function bool CheckMouse( name Key, EInputEvent Event)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
simulated function bool ReceivedInputKey( int ControllerId, name Key, EInputEvent Event, optional float AmountDepressed=1.f, optional bool bGamepad)
|
||||
simulated function bool ReceivedInputKey(int ControllerId, name Key, EInputEvent Event, optional float AmountDepressed=1.f, optional bool bGamepad)
|
||||
{
|
||||
local KFPlayerInput KFInput;
|
||||
local KeyBind BoundKey;
|
||||
@ -785,7 +785,7 @@ simulated function bool ReceivedInputKey( int ControllerId, name Key, EInputEven
|
||||
return true;
|
||||
}
|
||||
|
||||
switch( Key)
|
||||
switch (Key)
|
||||
{
|
||||
case 'XboxTypeS_Start':
|
||||
case 'Escape':
|
||||
@ -808,7 +808,7 @@ simulated function bool ReceivedInputKey( int ControllerId, name Key, EInputEven
|
||||
|
||||
return true;
|
||||
}
|
||||
simulated function bool ReceivedInputAxis( int ControllerId, name Key, float Delta, float DeltaTime, bool bGamepad)
|
||||
simulated function bool ReceivedInputAxis(int ControllerId, name Key, float Delta, float DeltaTime, bool bGamepad)
|
||||
{
|
||||
local Vector2D V;
|
||||
local KFPlayerInput KFInput;
|
||||
@ -832,7 +832,7 @@ simulated function bool ReceivedInputAxis( int ControllerId, name Key, float Del
|
||||
MoveDelta = Delta * (KFInput.bInvertController ? -GamepadSensitivity : GamepadSensitivity);
|
||||
MoveDeltaInvert = Delta * (KFInput.bInvertController ? GamepadSensitivity : -GamepadSensitivity);
|
||||
|
||||
switch(Key)
|
||||
switch (Key)
|
||||
{
|
||||
case 'XboxTypeS_LeftX':
|
||||
case 'XboxTypeS_RightX':
|
||||
@ -858,30 +858,30 @@ simulated function bool ReceivedInputAxis( int ControllerId, name Key, float Del
|
||||
}
|
||||
return OnReceivedInputAxis(ControllerId, Key, Delta, DeltaTime, bGamepad);
|
||||
}
|
||||
simulated function bool ReceivedInputChar( int ControllerId, string Unicode)
|
||||
simulated function bool ReceivedInputChar(int ControllerId, string Unicode)
|
||||
{
|
||||
if (!bIsInMenuState)
|
||||
return false;
|
||||
return OnReceivedInputChar(ControllerId, Unicode);
|
||||
}
|
||||
|
||||
simulated Delegate bool OnInputKey( int ControllerId, name Key, EInputEvent Event, optional float AmountDepressed=1.f, optional bool bGamepad)
|
||||
simulated Delegate bool OnInputKey(int ControllerId, name Key, EInputEvent Event, optional float AmountDepressed=1.f, optional bool bGamepad)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
simulated Delegate bool OnReceivedInputAxis( int ControllerId, name Key, float Delta, float DeltaTime, bool bGamepad)
|
||||
simulated Delegate bool OnReceivedInputAxis(int ControllerId, name Key, float Delta, float DeltaTime, bool bGamepad)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
simulated Delegate bool OnReceivedInputChar( int ControllerId, string Unicode)
|
||||
simulated Delegate bool OnReceivedInputChar(int ControllerId, string Unicode)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
simulated Delegate bool InternalInputKey( int ControllerId, name Key, EInputEvent Event, optional float AmountDepressed=1.f, optional bool bGamepad)
|
||||
simulated Delegate bool InternalInputKey(int ControllerId, name Key, EInputEvent Event, optional float AmountDepressed=1.f, optional bool bGamepad)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
simulated Delegate bool InternalReceivedInputChar( int ControllerId, string Unicode)
|
||||
simulated Delegate bool InternalReceivedInputChar(int ControllerId, string Unicode)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -8,11 +8,11 @@ class KF2GUIInput extends KFPlayerInput;
|
||||
var KF2GUIController ControllerOwner;
|
||||
var PlayerInput BaseInput;
|
||||
|
||||
function DrawHUD( HUD H)
|
||||
function DrawHUD(HUD H)
|
||||
{
|
||||
//ControllerOwner.RenderMenu(H.Canvas);
|
||||
}
|
||||
function PostRender( Canvas Canvas)
|
||||
function PostRender(Canvas Canvas)
|
||||
{
|
||||
if (ControllerOwner.bIsInMenuState)
|
||||
ControllerOwner.HandleDrawMenu();
|
||||
@ -20,7 +20,7 @@ function PostRender( Canvas Canvas)
|
||||
}
|
||||
|
||||
// Postprocess the player's input.
|
||||
function PlayerInput( float DeltaTime)
|
||||
function PlayerInput(float DeltaTime)
|
||||
{
|
||||
// Do not move.
|
||||
ControllerOwner.MenuInput(DeltaTime);
|
||||
@ -54,7 +54,7 @@ function PlayerInput( float DeltaTime)
|
||||
}
|
||||
}
|
||||
|
||||
function PreClientTravel( string PendingURL, ETravelType TravelType, bool bIsSeamlessTravel)
|
||||
function PreClientTravel(string PendingURL, ETravelType TravelType, bool bIsSeamlessTravel)
|
||||
{
|
||||
`Log("PreClientTravel"@PendingURL@TravelType@bIsSeamlessTravel);
|
||||
ControllerOwner.BackupInput.PreClientTravel(PendingURL, TravelType, bIsSeamlessTravel); // Let original mod do stuff too!
|
||||
|
@ -20,7 +20,7 @@ function InitStyle()
|
||||
LoadedTex[i] = Texture2D'EngineMaterials.DefaultWhiteGrid';
|
||||
}
|
||||
}
|
||||
function RenderFramedWindow( KFGUI_FloatingWindow P)
|
||||
function RenderFramedWindow(KFGUI_FloatingWindow P)
|
||||
{
|
||||
local int XS, YS, CornerSlope, TitleHeight;
|
||||
|
||||
@ -77,7 +77,7 @@ function RenderFramedWindow( KFGUI_FloatingWindow P)
|
||||
DrawText(P.WindowTitle);
|
||||
}
|
||||
}
|
||||
function RenderWindow( KFGUI_Page P)
|
||||
function RenderWindow(KFGUI_Page P)
|
||||
{
|
||||
local int XS, YS, CornerSlope;
|
||||
|
||||
@ -106,7 +106,7 @@ function RenderWindow( KFGUI_Page P)
|
||||
Canvas.SetPos(XS-CornerSlope, CornerSlope);
|
||||
DrawWhiteBox(CornerSlope, YS-(CornerSlope*2));
|
||||
}
|
||||
function RenderToolTip( KFGUI_Tooltip TT)
|
||||
function RenderToolTip(KFGUI_Tooltip TT)
|
||||
{
|
||||
local int i;
|
||||
local float X, Y,XS, YS, TX, TY, TS, DefFontHeight;
|
||||
@ -164,7 +164,7 @@ function RenderToolTip( KFGUI_Tooltip TT)
|
||||
Y+=DefFontHeight;
|
||||
}
|
||||
}
|
||||
function RenderScrollBar( KFGUI_ScrollBarBase S)
|
||||
function RenderScrollBar(KFGUI_ScrollBarBase S)
|
||||
{
|
||||
local float A;
|
||||
local byte i;
|
||||
@ -210,7 +210,7 @@ function RenderScrollBar( KFGUI_ScrollBarBase S)
|
||||
DrawRectBox (0.f, S.ButtonOffset, S.CompPos[2], S.SliderScale, 4);
|
||||
else DrawRectBox (S.ButtonOffset, 0.f, S.SliderScale, S.CompPos[3], 4);
|
||||
}
|
||||
function RenderColumnHeader( KFGUI_ColumnTop C, float XPos, float Width, int Index, bool bFocus, bool bSort)
|
||||
function RenderColumnHeader(KFGUI_ColumnTop C, float XPos, float Width, int Index, bool bFocus, bool bSort)
|
||||
{
|
||||
local int XS;
|
||||
|
||||
@ -236,7 +236,7 @@ function RenderColumnHeader( KFGUI_ColumnTop C, float XPos, float Width, int Ind
|
||||
Canvas.SetPos(XPos+XS, (C.CompPos[3]-C.ListOwner.TextHeight)*0.5f);
|
||||
C.ListOwner.DrawStrClipped(C.ListOwner.Columns[Index].Text);
|
||||
}
|
||||
function RenderCheckbox( KFGUI_CheckBox C)
|
||||
function RenderCheckbox(KFGUI_CheckBox C)
|
||||
{
|
||||
if (C.bDisabled)
|
||||
Canvas.SetDrawColor(86, 86, 86, 255);
|
||||
@ -258,7 +258,7 @@ function RenderCheckbox( KFGUI_CheckBox C)
|
||||
Canvas.DrawTile(LoadedTex[1], C.CompPos[2], C.CompPos[3], 0,0, LoadedTex[1].GetSurfaceWidth(), LoadedTex[1].GetSurfaceHeight());
|
||||
}
|
||||
}
|
||||
function RenderComboBox( KFGUI_ComboBox C)
|
||||
function RenderComboBox(KFGUI_ComboBox C)
|
||||
{
|
||||
if (C.bDisabled)
|
||||
Canvas.SetDrawColor(64, 4,4, 255);
|
||||
@ -282,7 +282,7 @@ function RenderComboBox( KFGUI_ComboBox C)
|
||||
Canvas.PopMaskRegion();
|
||||
}
|
||||
}
|
||||
function RenderComboList( KFGUI_ComboSelector C)
|
||||
function RenderComboList(KFGUI_ComboSelector C)
|
||||
{
|
||||
local float X, Y,YL, YP, Edge;
|
||||
local int i;
|
||||
@ -337,7 +337,7 @@ function RenderComboList( KFGUI_ComboSelector C)
|
||||
C.PlayMenuSound(MN_DropdownChange);
|
||||
}
|
||||
}
|
||||
function RenderRightClickMenu( KFGUI_RightClickMenu C)
|
||||
function RenderRightClickMenu(KFGUI_RightClickMenu C)
|
||||
{
|
||||
local float X, Y,YP, Edge, TextScale, TexDefHieght;
|
||||
local int i;
|
||||
@ -399,7 +399,7 @@ function RenderRightClickMenu( KFGUI_RightClickMenu C)
|
||||
C.PlayMenuSound(MN_DropdownChange);
|
||||
}
|
||||
}
|
||||
function RenderButton( KFGUI_Button B)
|
||||
function RenderButton(KFGUI_Button B)
|
||||
{
|
||||
local float XL, YL, TS;
|
||||
local byte i;
|
||||
@ -433,7 +433,7 @@ function RenderButton( KFGUI_Button B)
|
||||
{
|
||||
// Chose the best font to fit this button.
|
||||
i = Min(B.FontScale, MaxFontScale);
|
||||
while( true)
|
||||
while (true)
|
||||
{
|
||||
Canvas.Font = PickFont(TS);
|
||||
Canvas.TextSize(B.ButtonText, XL, YL, TS, TS);
|
||||
|
@ -52,7 +52,7 @@ function PreDraw()
|
||||
function DrawMenu(); // Draw menu now.
|
||||
function CloseMenu(); // Menu was closed.
|
||||
function InventoryChanged(optional KFWeapon Wep, optional bool bRemove); // Called when a players inventory is changed.
|
||||
function MenuTick( float DeltaTime );
|
||||
function MenuTick(float DeltaTime);
|
||||
|
||||
final function SetTimer(float InRate, optional bool inbLoop, optional Name inTimerFunc='Timer')
|
||||
{
|
||||
@ -67,7 +67,7 @@ final function SetTimer(float InRate, optional bool inbLoop, optional Name inTim
|
||||
TimerNames.AddItem(inTimerFunc);
|
||||
}
|
||||
|
||||
`TimerHelper.SetTimer( InRate, inbLoop, inTimerFunc, self );
|
||||
`TimerHelper.SetTimer(InRate, inbLoop, inTimerFunc, self);
|
||||
}
|
||||
final function ClearTimer(optional Name inTimerFunc='Timer')
|
||||
{
|
||||
@ -76,7 +76,7 @@ final function ClearTimer(optional Name inTimerFunc='Timer')
|
||||
TimerNames.RemoveItem(inTimerFunc);
|
||||
}
|
||||
|
||||
`TimerHelper.ClearTimer( inTimerFunc, self );
|
||||
`TimerHelper.ClearTimer(inTimerFunc, self);
|
||||
}
|
||||
function Timer();
|
||||
|
||||
@ -90,14 +90,14 @@ function MouseLeave()
|
||||
bFocused = false;
|
||||
OnFocus(Self, False);
|
||||
}
|
||||
function MouseClick( bool bRight );
|
||||
function MouseRelease( bool bRight );
|
||||
function DoubleMouseClick( bool bRight ) // User rapidly double clicked this component.
|
||||
function MouseClick(bool bRight);
|
||||
function MouseRelease(bool bRight);
|
||||
function DoubleMouseClick(bool bRight ) // User rapidly double clicked this component.
|
||||
{
|
||||
MouseClick(bRight);
|
||||
}
|
||||
|
||||
function ScrollMouseWheel( bool bUp );
|
||||
function ScrollMouseWheel(bool bUp);
|
||||
|
||||
function bool ReceievedControllerInput(int ControllerId, name Key, EInputEvent Event)
|
||||
{
|
||||
@ -109,12 +109,12 @@ final function PlayerController GetPlayer()
|
||||
return Owner.PlayerOwner;
|
||||
}
|
||||
|
||||
function SetDisabled( bool bDisable)
|
||||
function SetDisabled(bool bDisable)
|
||||
{
|
||||
bDisabled = bDisable;
|
||||
}
|
||||
|
||||
Delegate OnFocus( KFGUI_Base Sender, bool bBecame );
|
||||
Delegate OnFocus(KFGUI_Base Sender, bool bBecame);
|
||||
|
||||
final function ComputeCoords()
|
||||
{
|
||||
@ -126,7 +126,7 @@ final function ComputeCoords()
|
||||
|
||||
function bool CaptureMouse()
|
||||
{
|
||||
return bVisible && ( Owner.MousePosition.X >= CompPos[0] && Owner.MousePosition.Y >= CompPos[1] && Owner.MousePosition.X <= (CompPos[0]+CompPos[2]) && Owner.MousePosition.Y <= (CompPos[1]+CompPos[3]) );
|
||||
return bVisible && ( Owner.MousePosition.X >= CompPos[0] && Owner.MousePosition.Y >= CompPos[1] && Owner.MousePosition.X <= (CompPos[0]+CompPos[2]) && Owner.MousePosition.Y <= (CompPos[1]+CompPos[3]));
|
||||
}
|
||||
|
||||
final function KFGUI_Base GetMouseFocus()
|
||||
@ -186,18 +186,18 @@ final function KFGUI_Page GetPageTop()
|
||||
{}
|
||||
return KFGUI_Page(M);
|
||||
}
|
||||
function KFGUI_Base FindComponentID( name InID)
|
||||
function KFGUI_Base FindComponentID(name InID)
|
||||
{
|
||||
if (ID == InID)
|
||||
return Self;
|
||||
return None;
|
||||
}
|
||||
function FindAllComponentID( name InID, out array < KFGUI_Base> Res)
|
||||
function FindAllComponentID(name InID, out array < KFGUI_Base> Res)
|
||||
{
|
||||
if (ID == InID)
|
||||
Res[Res.Length] = Self;
|
||||
}
|
||||
function RemoveComponent( KFGUI_Base B );
|
||||
function RemoveComponent(KFGUI_Base B);
|
||||
|
||||
function GetInputFocus()
|
||||
{
|
||||
@ -227,11 +227,11 @@ final function ReleaseKeyFocus()
|
||||
}
|
||||
function LostKeyFocus();
|
||||
|
||||
function bool NotifyInputKey( int ControllerId, name Key, EInputEvent Event, float AmountDepressed, bool bGamepad)
|
||||
function bool NotifyInputKey(int ControllerId, name Key, EInputEvent Event, float AmountDepressed, bool bGamepad)
|
||||
{
|
||||
if (bIsHUDWidget && bEnableInputs)
|
||||
{
|
||||
switch( Key)
|
||||
switch (Key)
|
||||
{
|
||||
case 'XboxTypeS_Start':
|
||||
case 'Escape':
|
||||
@ -254,11 +254,11 @@ function bool NotifyInputKey( int ControllerId, name Key, EInputEvent Event, flo
|
||||
|
||||
return false;
|
||||
}
|
||||
function bool NotifyInputAxis( int ControllerId, name Key, float Delta, float DeltaTime, bool bGamepad)
|
||||
function bool NotifyInputAxis(int ControllerId, name Key, float Delta, float DeltaTime, bool bGamepad)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
function bool NotifyInputChar( int ControllerId, string Unicode)
|
||||
function bool NotifyInputChar(int ControllerId, string Unicode)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -269,25 +269,25 @@ function InputMouseMoved();
|
||||
// Notify any focused menu element that mouse has been idle over it.
|
||||
function NotifyMousePaused();
|
||||
|
||||
final function GetActualPos( out float X, out float Y)
|
||||
final function GetActualPos(out float X, out float Y)
|
||||
{
|
||||
X = ((XPosition+X)*InputPos[2]) + InputPos[0];
|
||||
Y = ((YPosition+Y)*InputPos[3]) + InputPos[1];
|
||||
}
|
||||
final function GetRealtivePos( out float X, out float Y)
|
||||
final function GetRealtivePos(out float X, out float Y)
|
||||
{
|
||||
X = X / CompPos[2];
|
||||
Y = Y / CompPos[2];
|
||||
}
|
||||
|
||||
simulated final function PlayMenuSound( EMenuSound Slot)
|
||||
simulated final function PlayMenuSound(EMenuSound Slot)
|
||||
{
|
||||
local SoundCue S;
|
||||
local KFGameEngine Engine;
|
||||
|
||||
Engine = KFGameEngine(class'Engine'.static.GetEngine());
|
||||
|
||||
switch( Slot)
|
||||
switch (Slot)
|
||||
{
|
||||
case MN_FocusHover:
|
||||
case MN_Focus:
|
||||
@ -318,7 +318,7 @@ simulated final function PlayMenuSound( EMenuSound Slot)
|
||||
// Pre level change notification.
|
||||
function NotifyLevelChange();
|
||||
|
||||
final function SetPosition( float X, float Y, float XS, float YS)
|
||||
final function SetPosition(float X, float Y, float XS, float YS)
|
||||
{
|
||||
XPosition = X;
|
||||
YPosition = Y;
|
||||
@ -326,7 +326,7 @@ final function SetPosition( float X, float Y, float XS, float YS)
|
||||
YSize = YS;
|
||||
}
|
||||
|
||||
static final function string MakeSortStr( int Value)
|
||||
static final function string MakeSortStr(int Value)
|
||||
{
|
||||
local string S;
|
||||
local int i;
|
||||
|
@ -21,15 +21,15 @@ function bool GetUsingGamepad()
|
||||
return Owner.bUsingGamepad && GamepadButtonName != "";
|
||||
}
|
||||
|
||||
function HandleMouseClick( bool bRight)
|
||||
function HandleMouseClick(bool bRight)
|
||||
{
|
||||
if (bRight)
|
||||
OnClickRight(Self);
|
||||
else OnClickLeft(Self);
|
||||
}
|
||||
|
||||
Delegate OnClickLeft( KFGUI_Button Sender );
|
||||
Delegate OnClickRight( KFGUI_Button Sender );
|
||||
Delegate OnClickLeft(KFGUI_Button Sender);
|
||||
Delegate OnClickRight(KFGUI_Button Sender);
|
||||
|
||||
Delegate bool DrawOverride(Canvas C, KFGUI_Button B)
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ function DrawMenu()
|
||||
TS = Owner.CurrentStyle.GetFontScaler();
|
||||
TS *= FontScale;
|
||||
|
||||
while( true)
|
||||
while (true)
|
||||
{
|
||||
Canvas.TextSize(ButtonText, XL, YL, TS, TS);
|
||||
if (XL < (CompPos[2]*0.9) && YL < (CompPos[3]*0.9))
|
||||
|
@ -19,13 +19,13 @@ function DrawMenu()
|
||||
Owner.CurrentStyle.RenderCheckbox(Self);
|
||||
}
|
||||
|
||||
function HandleMouseClick( bool bRight)
|
||||
function HandleMouseClick(bool bRight)
|
||||
{
|
||||
bChecked = !bChecked;
|
||||
OnCheckChange(Self);
|
||||
}
|
||||
|
||||
Delegate OnCheckChange( KFGUI_CheckBox Sender );
|
||||
Delegate OnCheckChange(KFGUI_CheckBox Sender);
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ function InitMenu()
|
||||
Super.InitMenu();
|
||||
bClickable = !bDisabled;
|
||||
}
|
||||
function MouseClick( bool bRight)
|
||||
function MouseClick(bool bRight)
|
||||
{
|
||||
if (!bDisabled)
|
||||
{
|
||||
@ -28,7 +28,7 @@ function MouseClick( bool bRight)
|
||||
bPressedDown = true;
|
||||
}
|
||||
}
|
||||
function MouseRelease( bool bRight)
|
||||
function MouseRelease(bool bRight)
|
||||
{
|
||||
if (!bDisabled && PressedDown[byte(bRight)] == 1)
|
||||
{
|
||||
@ -52,7 +52,7 @@ function MouseEnter()
|
||||
PlayMenuSound(MN_FocusHover);
|
||||
}
|
||||
|
||||
function SetDisabled( bool bDisable)
|
||||
function SetDisabled(bool bDisable)
|
||||
{
|
||||
Super.SetDisabled(bDisable);
|
||||
bClickable = !bDisable;
|
||||
@ -79,7 +79,7 @@ function NotifyMousePaused()
|
||||
ToolTipItem.GetInputFocus();
|
||||
}
|
||||
}
|
||||
final function ChangeToolTip( string S)
|
||||
final function ChangeToolTip(string S)
|
||||
{
|
||||
if (ToolTipItem != None)
|
||||
ToolTipItem.SetText(S);
|
||||
@ -91,7 +91,7 @@ function SetVisibility(bool Visible)
|
||||
SetDisabled(!Visible);
|
||||
}
|
||||
|
||||
function HandleMouseClick( bool bRight );
|
||||
function HandleMouseClick(bool bRight);
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ function SetDefaultColor(Color Def)
|
||||
ASlider.UpdateListVis();
|
||||
}
|
||||
|
||||
final function KFGUI_Slider AddSlider( string Cap, name IDN, int MinValue, int MaxValue, out KFGUI_TextLable Label, out KFGUI_TextLable ColorValueLabel)
|
||||
final function KFGUI_Slider AddSlider(string Cap, name IDN, int MinValue, int MaxValue, out KFGUI_TextLable Label, out KFGUI_TextLable ColorValueLabel)
|
||||
{
|
||||
local KFGUI_Slider SL;
|
||||
local KFGUI_MultiComponent MC;
|
||||
@ -72,7 +72,7 @@ final function KFGUI_Slider AddSlider( string Cap, name IDN, int MinValue, int M
|
||||
|
||||
function OnValueChanged(KFGUI_Slider Sender, int Value)
|
||||
{
|
||||
switch(Sender.ID)
|
||||
switch (Sender.ID)
|
||||
{
|
||||
case 'ColorSliderR':
|
||||
RedValue.SetText(string(Value));
|
||||
|
@ -34,9 +34,9 @@ var bool bLastSortedReverse;
|
||||
var() bool bShouldSortList; // Should sort any new items added to the list instantly.
|
||||
var() bool bCanSortColumn; // Allow user to sort columns.
|
||||
|
||||
delegate OnSelectedRow( KFGUI_ListItem Item, int Row, bool bRight, bool bDblClick );
|
||||
delegate OnSelectedRow(KFGUI_ListItem Item, int Row, bool bRight, bool bDblClick);
|
||||
|
||||
function KFGUI_ListItem AddLine( string Value, optional int iValue, optional string SortValue, optional int Index=-1)
|
||||
function KFGUI_ListItem AddLine(string Value, optional int iValue, optional string SortValue, optional int Index=-1)
|
||||
{
|
||||
local KFGUI_ListItem N, O;
|
||||
local int i;
|
||||
@ -125,7 +125,7 @@ function KFGUI_ListItem AddLine( string Value, optional int iValue, optional str
|
||||
|
||||
return N;
|
||||
}
|
||||
final function RemoveLine( KFGUI_ListItem I)
|
||||
final function RemoveLine(KFGUI_ListItem I)
|
||||
{
|
||||
local KFGUI_ListItem N;
|
||||
|
||||
@ -176,7 +176,7 @@ final function EmptyList()
|
||||
UpdateListSize();
|
||||
}
|
||||
|
||||
final function KFGUI_ListItem GetFromIndex( int Index)
|
||||
final function KFGUI_ListItem GetFromIndex(int Index)
|
||||
{
|
||||
local KFGUI_ListItem N;
|
||||
|
||||
@ -188,7 +188,7 @@ final function KFGUI_ListItem GetFromIndex( int Index)
|
||||
return None;
|
||||
}
|
||||
|
||||
function SortColumn( int Column, optional bool bReverse)
|
||||
function SortColumn(int Column, optional bool bReverse)
|
||||
{
|
||||
local array < KFGUI_ListItem> List;
|
||||
local KFGUI_ListItem Sel, N,P;
|
||||
@ -247,7 +247,7 @@ function SortColumn( int Column, optional bool bReverse)
|
||||
}
|
||||
}
|
||||
|
||||
function ChangeListSize( int NewSize );
|
||||
function ChangeListSize(int NewSize);
|
||||
|
||||
final function UpdateListSize()
|
||||
{
|
||||
@ -266,7 +266,7 @@ function InitMenu()
|
||||
ColumnComp = KFGUI_ColumnTop(FindComponentID('Columns'));
|
||||
}
|
||||
|
||||
final function DrawStrClipped( string S, optional bool bOnlyTextures)
|
||||
final function DrawStrClipped(string S, optional bool bOnlyTextures)
|
||||
{
|
||||
Canvas.PushMaskRegion(Canvas.OrgX, Canvas.OrgY, Canvas.ClipX, Canvas.ClipY);
|
||||
Owner.CurrentStyle.DrawTexturedString(S, Canvas.CurX, Canvas.CurY, TextScaler, LineFontInfo, false, bOnlyTextures);
|
||||
@ -411,12 +411,12 @@ function PreDraw()
|
||||
CompPos[2] += SpaceX;
|
||||
CompPos[3] += ColumnComp.CompPos[3];
|
||||
}
|
||||
function InternalClickedItem( int Index, bool bRight, int MouseX, int MouseY)
|
||||
function InternalClickedItem(int Index, bool bRight, int MouseX, int MouseY)
|
||||
{
|
||||
SelectedRowIndex = Index;
|
||||
OnSelectedRow(GetFromIndex(Index), Index, bRight, false);
|
||||
}
|
||||
function InternalDblClickedItem( int Index, bool bRight, int MouseX, int MouseY)
|
||||
function InternalDblClickedItem(int Index, bool bRight, int MouseX, int MouseY)
|
||||
{
|
||||
SelectedRowIndex = Index;
|
||||
OnSelectedRow(GetFromIndex(Index), Index, bRight, true);
|
||||
|
@ -134,7 +134,7 @@ function DrawMenu()
|
||||
}
|
||||
}
|
||||
|
||||
function MouseClick( bool bRight)
|
||||
function MouseClick(bool bRight)
|
||||
{
|
||||
if (!ListOwner.bDisabled && bClickable)
|
||||
{
|
||||
@ -150,7 +150,7 @@ function MouseClick( bool bRight)
|
||||
}
|
||||
}
|
||||
}
|
||||
function MouseRelease( bool bRight)
|
||||
function MouseRelease(bool bRight)
|
||||
{
|
||||
if (bScaleColumn && !bRight)
|
||||
{
|
||||
|
@ -23,7 +23,7 @@ function DrawMenu()
|
||||
Owner.CurrentStyle.RenderComboBox(Self);
|
||||
}
|
||||
|
||||
function HandleMouseClick( bool bRight)
|
||||
function HandleMouseClick(bool bRight)
|
||||
{
|
||||
PlayMenuSound(MN_Dropdown);
|
||||
if (Selection == None)
|
||||
@ -47,7 +47,7 @@ final function string GetCurrent()
|
||||
return Values[SelectedIndex];
|
||||
return "";
|
||||
}
|
||||
final function bool SetValue( string S)
|
||||
final function bool SetValue(string S)
|
||||
{
|
||||
local int i;
|
||||
|
||||
@ -57,7 +57,7 @@ final function bool SetValue( string S)
|
||||
SelectedIndex = i;
|
||||
return true;
|
||||
}
|
||||
Delegate OnComboChanged( KFGUI_ComboBox Sender );
|
||||
Delegate OnComboChanged(KFGUI_ComboBox Sender);
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
@ -11,7 +11,7 @@ function DrawMenu()
|
||||
Owner.CurrentStyle.RenderComboList(Self);
|
||||
}
|
||||
|
||||
function HandleMouseClick( bool bRight)
|
||||
function HandleMouseClick(bool bRight)
|
||||
{
|
||||
PlayMenuSound(MN_ClickButton);
|
||||
DropInputFocus();
|
||||
|
@ -9,7 +9,7 @@ var() int NumColumns;
|
||||
var array < KFGUI_Base> ItemComponents;
|
||||
|
||||
// REMEMBER to call InitMenu() on the newly created component after values are init!!!
|
||||
final function KFGUI_Base AddListComponent( class < KFGUI_Base> CompClass, optional float XS=1.f, optional float YS=1.f)
|
||||
final function KFGUI_Base AddListComponent(class < KFGUI_Base> CompClass, optional float XS=1.f, optional float YS=1.f)
|
||||
{
|
||||
return AddComponentAtIndex(ItemComponents.Length, CompClass, XS, YS);
|
||||
}
|
||||
@ -30,17 +30,17 @@ final function KFGUI_Base CreateComponent(class < KFGUI_Base> CompClass, optiona
|
||||
return G;
|
||||
}
|
||||
|
||||
final function AddItem( KFGUI_Base Item)
|
||||
final function AddItem(KFGUI_Base Item)
|
||||
{
|
||||
AddItemAtIndex(ItemComponents.Length, Item);
|
||||
}
|
||||
|
||||
final function AddItemAtIndex( int i, KFGUI_Base Item)
|
||||
final function AddItemAtIndex(int i, KFGUI_Base Item)
|
||||
{
|
||||
ItemComponents.InsertItem(i, Item);
|
||||
}
|
||||
|
||||
final function KFGUI_Base AddComponentAtIndex( int i, class < KFGUI_Base> CompClass, optional float XS=1.f, optional float YS=1.f)
|
||||
final function KFGUI_Base AddComponentAtIndex(int i, class < KFGUI_Base> CompClass, optional float XS=1.f, optional float YS=1.f)
|
||||
{
|
||||
local KFGUI_Base G;
|
||||
|
||||
@ -153,10 +153,10 @@ function PreDrawListItems()
|
||||
}
|
||||
}
|
||||
|
||||
function ChangeListSize( int NewSize );
|
||||
function ChangeListSize(int NewSize);
|
||||
|
||||
function MouseClick( bool bRight );
|
||||
function MouseRelease( bool bRight );
|
||||
function MouseClick(bool bRight);
|
||||
function MouseRelease(bool bRight);
|
||||
function MouseLeave()
|
||||
{
|
||||
Super(KFGUI_Base).MouseLeave();
|
||||
@ -207,7 +207,7 @@ function InventoryChanged(optional KFWeapon Wep, optional bool bRemove)
|
||||
for (i=0; i < ItemComponents.Length; ++i)
|
||||
ItemComponents[i].InventoryChanged(Wep, bRemove);
|
||||
}
|
||||
function MenuTick( float DeltaTime)
|
||||
function MenuTick(float DeltaTime)
|
||||
{
|
||||
local int i;
|
||||
|
||||
|
@ -79,7 +79,7 @@ function bool NotifyInputChar(int Key, string Unicode)
|
||||
if ((bConvertSpaces) && ((S == " ") || (S == "?") || (S == "\\")))
|
||||
S = "_";
|
||||
|
||||
if ((TextStr == "") || ( CaretPos == Len(TextStr) ))
|
||||
if ((TextStr == "") || ( CaretPos == Len(TextStr)))
|
||||
{
|
||||
TextStr = TextStr$S;
|
||||
CaretPos=Len(TextStr);
|
||||
@ -101,7 +101,7 @@ function bool NotifyInputChar(int Key, string Unicode)
|
||||
|
||||
function SetInputText(string S)
|
||||
{
|
||||
switch(TextCase)
|
||||
switch (TextCase)
|
||||
{
|
||||
case TXTC_Upper:
|
||||
S = Caps(S);
|
||||
@ -280,7 +280,7 @@ function string ConvertIllegal(string InputStr)
|
||||
C = "";
|
||||
}
|
||||
if (bConvertSpaces &&
|
||||
((C == " ") || (C =="?") || (C == "\\") ))
|
||||
((C == " ") || (C =="?") || (C == "\\")))
|
||||
{
|
||||
C = "_";
|
||||
}
|
||||
@ -389,13 +389,13 @@ function DrawMenu()
|
||||
{
|
||||
Canvas.SetDrawColor(255, 255, 255, 195);
|
||||
Canvas.SetPos(BorderSize, CursorY);
|
||||
Canvas.DrawTile( Owner.DefaultPens[`PEN_WHITE], XL, YL-Owner.HUDOwner.ScaledBorderSize, 0, 0, Owner.DefaultPens[`PEN_WHITE].GetSurfaceWidth(), Owner.DefaultPens[`PEN_WHITE].GetSurfaceHeight() );
|
||||
Canvas.DrawTile(Owner.DefaultPens[`PEN_WHITE], XL, YL-Owner.HUDOwner.ScaledBorderSize, 0, 0, Owner.DefaultPens[`PEN_WHITE].GetSurfaceWidth(), Owner.DefaultPens[`PEN_WHITE].GetSurfaceHeight());
|
||||
}
|
||||
else
|
||||
{
|
||||
Canvas.SetDrawColor(255, 255, 255, Owner.CursorFlash);
|
||||
Canvas.SetPos(XL + (Len(FinalDraw) == 0 ? 0 : 3), CursorY);
|
||||
Canvas.DrawTile( Owner.DefaultPens[`PEN_WHITE], 3, YL-Owner.HUDOwner.ScaledBorderSize, 0, 0, Owner.DefaultPens[`PEN_WHITE].GetSurfaceWidth(), Owner.DefaultPens[`PEN_WHITE].GetSurfaceHeight() );
|
||||
Canvas.DrawTile(Owner.DefaultPens[`PEN_WHITE], 3, YL-Owner.HUDOwner.ScaledBorderSize, 0, 0, Owner.DefaultPens[`PEN_WHITE].GetSurfaceWidth(), Owner.DefaultPens[`PEN_WHITE].GetSurfaceHeight());
|
||||
}
|
||||
}
|
||||
|
||||
@ -404,7 +404,7 @@ function DrawMenu()
|
||||
Canvas.DrawText(FinalDraw, ,FontScale, FontScale, FRI);
|
||||
}
|
||||
|
||||
function HandleMouseClick( bool bRight)
|
||||
function HandleMouseClick(bool bRight)
|
||||
{
|
||||
if (Owner.KeyboardFocus != self)
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ function PreDraw()
|
||||
}
|
||||
}
|
||||
|
||||
final function DrawClippedText( string S, float TScale, float MaxX)
|
||||
final function DrawClippedText(string S, float TScale, float MaxX)
|
||||
{
|
||||
local int i, l;
|
||||
local float X, XL, YL;
|
||||
|
@ -44,7 +44,7 @@ function DrawMenu()
|
||||
HeaderComp.YSize = HeaderComp.CompPos[3] / CompPos[3]; // Keep header height fit the window height.
|
||||
}
|
||||
}
|
||||
function SetWindowDrag( bool bDrag)
|
||||
function SetWindowDrag(bool bDrag)
|
||||
{
|
||||
bDragWindow = bDrag;
|
||||
if (bDrag)
|
||||
|
@ -9,12 +9,12 @@ function PreDraw()
|
||||
{
|
||||
ComputeCoords();
|
||||
}
|
||||
function MouseClick( bool bRight)
|
||||
function MouseClick(bool bRight)
|
||||
{
|
||||
if (!bRight)
|
||||
KFGUI_FloatingWindow(ParentComponent).SetWindowDrag(true);
|
||||
}
|
||||
function MouseRelease( bool bRight)
|
||||
function MouseRelease(bool bRight)
|
||||
{
|
||||
if (!bRight)
|
||||
KFGUI_FloatingWindow(ParentComponent).SetWindowDrag(false);
|
||||
|
@ -16,11 +16,11 @@ var transient int FocusMouseItem, LastFocusItem;
|
||||
var byte PressedDown[2];
|
||||
var bool bPressedDown;
|
||||
|
||||
delegate OnDrawItem( Canvas C, int Index, float YOffset, float Height, float Width, bool bFocus );
|
||||
delegate OnDrawItem(Canvas C, int Index, float YOffset, float Height, float Width, bool bFocus);
|
||||
|
||||
// Requires bClickable=true to receive this event.
|
||||
delegate OnClickedItem( int Index, bool bRight, int MouseX, int MouseY );
|
||||
delegate OnDblClickedItem( int Index, bool bRight, int MouseX, int MouseY );
|
||||
delegate OnClickedItem(int Index, bool bRight, int MouseX, int MouseY);
|
||||
delegate OnDblClickedItem(int Index, bool bRight, int MouseX, int MouseY);
|
||||
|
||||
function InitMenu()
|
||||
{
|
||||
@ -138,7 +138,7 @@ function UpdateListVis()
|
||||
ScrollBar.SetDisabled(false);
|
||||
}
|
||||
}
|
||||
function ChangeListSize( int NewSize)
|
||||
function ChangeListSize(int NewSize)
|
||||
{
|
||||
if (ListCount == NewSize)
|
||||
return;
|
||||
@ -150,7 +150,7 @@ final function int GetListSize()
|
||||
return ListCount;
|
||||
}
|
||||
|
||||
function DoubleMouseClick( bool bRight)
|
||||
function DoubleMouseClick(bool bRight)
|
||||
{
|
||||
if (!bDisabled && bClickable)
|
||||
{
|
||||
@ -159,7 +159,7 @@ function DoubleMouseClick( bool bRight)
|
||||
OnDblClickedItem(FocusMouseItem, bRight, Owner.MousePosition.X-CompPos[0], MouseYHit);
|
||||
}
|
||||
}
|
||||
function MouseClick( bool bRight)
|
||||
function MouseClick(bool bRight)
|
||||
{
|
||||
if (!bDisabled && bClickable)
|
||||
{
|
||||
@ -167,7 +167,7 @@ function MouseClick( bool bRight)
|
||||
bPressedDown = true;
|
||||
}
|
||||
}
|
||||
function MouseRelease( bool bRight)
|
||||
function MouseRelease(bool bRight)
|
||||
{
|
||||
if (!bDisabled && bClickable && PressedDown[byte(bRight)] == 1)
|
||||
{
|
||||
@ -189,7 +189,7 @@ function MouseEnter()
|
||||
LastFocusItem = -1;
|
||||
}
|
||||
|
||||
function ScrollMouseWheel( bool bUp)
|
||||
function ScrollMouseWheel(bool bUp)
|
||||
{
|
||||
if (!ScrollBar.bDisabled)
|
||||
ScrollBar.ScrollMouseWheel(bUp);
|
||||
@ -201,7 +201,7 @@ function NotifyMousePaused()
|
||||
OnMouseRest(FocusMouseItem);
|
||||
}
|
||||
|
||||
Delegate OnMouseRest( int Item );
|
||||
Delegate OnMouseRest(int Item);
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
@ -16,11 +16,11 @@ var transient int FocusMouseItem, LastFocusItem;
|
||||
var byte PressedDown[2];
|
||||
var bool bPressedDown;
|
||||
|
||||
delegate OnDrawItem( Canvas C, int Index, float XOffset, float Height, float Width, bool bFocus );
|
||||
delegate OnDrawItem(Canvas C, int Index, float XOffset, float Height, float Width, bool bFocus);
|
||||
|
||||
// Requires bClickable=true to receive this event.
|
||||
delegate OnClickedItem( int Index, bool bRight, int MouseX, int MouseY );
|
||||
delegate OnDblClickedItem( int Index, bool bRight, int MouseX, int MouseY );
|
||||
delegate OnClickedItem(int Index, bool bRight, int MouseX, int MouseY);
|
||||
delegate OnDblClickedItem(int Index, bool bRight, int MouseX, int MouseY);
|
||||
|
||||
function InitMenu()
|
||||
{
|
||||
@ -140,7 +140,7 @@ function UpdateListVis()
|
||||
ScrollBar.SetDisabled(false);
|
||||
}
|
||||
}
|
||||
function ChangeListSize( int NewSize)
|
||||
function ChangeListSize(int NewSize)
|
||||
{
|
||||
if (ListCount == NewSize)
|
||||
return;
|
||||
@ -152,7 +152,7 @@ final function int GetListSize()
|
||||
return ListCount;
|
||||
}
|
||||
|
||||
function DoubleMouseClick( bool bRight)
|
||||
function DoubleMouseClick(bool bRight)
|
||||
{
|
||||
if (!bDisabled && bClickable)
|
||||
{
|
||||
@ -162,7 +162,7 @@ function DoubleMouseClick( bool bRight)
|
||||
OnDblClickedItem(FocusMouseItem, bRight, MouseXHit, Owner.MousePosition.Y-CompPos[1]);
|
||||
}
|
||||
}
|
||||
function MouseClick( bool bRight)
|
||||
function MouseClick(bool bRight)
|
||||
{
|
||||
if (!bDisabled && bClickable)
|
||||
{
|
||||
@ -170,7 +170,7 @@ function MouseClick( bool bRight)
|
||||
bPressedDown = true;
|
||||
}
|
||||
}
|
||||
function MouseRelease( bool bRight)
|
||||
function MouseRelease(bool bRight)
|
||||
{
|
||||
if (!bDisabled && bClickable && PressedDown[byte(bRight)] == 1)
|
||||
{
|
||||
@ -195,7 +195,7 @@ function MouseEnter()
|
||||
PlayMenuSound(MN_FocusHover);
|
||||
}
|
||||
|
||||
function ScrollMouseWheel( bool bUp)
|
||||
function ScrollMouseWheel(bool bUp)
|
||||
{
|
||||
if (!ScrollBar.bDisabled)
|
||||
ScrollBar.ScrollMouseWheel(bUp);
|
||||
@ -207,7 +207,7 @@ function NotifyMousePaused()
|
||||
OnMouseRest(FocusMouseItem);
|
||||
}
|
||||
|
||||
Delegate OnMouseRest( int Item );
|
||||
Delegate OnMouseRest(int Item);
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ var int Index, Value;
|
||||
|
||||
var transient string Temp; // Cache sorting key.
|
||||
|
||||
function SetValue( string S, int i, string SortStr)
|
||||
function SetValue(string S, int i, string SortStr)
|
||||
{
|
||||
ParseStringIntoArray(S, Columns, "\n", false);
|
||||
if (SortStr == "")
|
||||
@ -20,7 +20,7 @@ function SetValue( string S, int i, string SortStr)
|
||||
}
|
||||
|
||||
// Return string to draw on HUD.
|
||||
function string GetDisplayStr( int Column)
|
||||
function string GetDisplayStr(int Column)
|
||||
{
|
||||
if (Column < Columns.Length)
|
||||
return Columns[Column];
|
||||
@ -28,7 +28,7 @@ function string GetDisplayStr( int Column)
|
||||
}
|
||||
|
||||
// Return string to compare string with.
|
||||
function string GetSortStr( int Column)
|
||||
function string GetSortStr(int Column)
|
||||
{
|
||||
if (SortColumns.Length > 0)
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ function InventoryChanged(optional KFWeapon Wep, optional bool bRemove)
|
||||
for (i=0; i < Components.Length; ++i)
|
||||
Components[i].InventoryChanged(Wep, bRemove);
|
||||
}
|
||||
function MenuTick( float DeltaTime)
|
||||
function MenuTick(float DeltaTime)
|
||||
{
|
||||
local int i;
|
||||
|
||||
@ -60,7 +60,7 @@ function MenuTick( float DeltaTime)
|
||||
Components[i].MenuTick(DeltaTime);
|
||||
}
|
||||
|
||||
function AddComponent( KFGUI_Base C)
|
||||
function AddComponent(KFGUI_Base C)
|
||||
{
|
||||
Components[Components.Length] = C;
|
||||
C.Owner = Owner;
|
||||
@ -104,7 +104,7 @@ function bool ReceievedControllerInput(int ControllerId, name Key, EInputEvent E
|
||||
|
||||
return Super.ReceievedControllerInput(ControllerId, Key, Event);
|
||||
}
|
||||
function KFGUI_Base FindComponentID( name InID)
|
||||
function KFGUI_Base FindComponentID(name InID)
|
||||
{
|
||||
local int i;
|
||||
local KFGUI_Base Result;
|
||||
@ -118,7 +118,7 @@ function KFGUI_Base FindComponentID( name InID)
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
function FindAllComponentID( name InID, out array < KFGUI_Base> Res)
|
||||
function FindAllComponentID(name InID, out array < KFGUI_Base> Res)
|
||||
{
|
||||
local int i;
|
||||
|
||||
@ -127,7 +127,7 @@ function FindAllComponentID( name InID, out array < KFGUI_Base> Res)
|
||||
for (i=0; i < Components.Length; ++i)
|
||||
Components[i].FindAllComponentID(InID, Res);
|
||||
}
|
||||
function RemoveComponent( KFGUI_Base B)
|
||||
function RemoveComponent(KFGUI_Base B)
|
||||
{
|
||||
local int i;
|
||||
|
||||
|
@ -15,7 +15,7 @@ var int OldSizeX;
|
||||
var transient bool bDrawToolTip;
|
||||
var Color BoxColor, OutlineColor;
|
||||
|
||||
function OpenMenu( KFGUI_Base Menu)
|
||||
function OpenMenu(KFGUI_Base Menu)
|
||||
{
|
||||
Owner = Menu.Owner;
|
||||
InitMenu();
|
||||
@ -68,7 +68,7 @@ function ComputePosition()
|
||||
if ((YPosition+YSize) > 1.f)
|
||||
YPosition -= ((YPosition+YSize)-1.f); // Move up until fit on screen.
|
||||
}
|
||||
final function AddRow( string Text, bool bDisable, optional string AltToolTip)
|
||||
final function AddRow(string Text, bool bDisable, optional string AltToolTip)
|
||||
{
|
||||
local int i;
|
||||
|
||||
@ -117,7 +117,7 @@ function DrawToolTip()
|
||||
BoxW = XL * 1.05f;
|
||||
BoxH = YL * 1.25f;
|
||||
|
||||
while( (X + BoxW) > Canvas.ClipX)
|
||||
while ((X + BoxW) > Canvas.ClipX)
|
||||
{
|
||||
X -= 0.01;
|
||||
}
|
||||
@ -131,7 +131,7 @@ function DrawToolTip()
|
||||
Canvas.SetPos(TextX, TextY);
|
||||
Canvas.DrawText(S, ,Scalar, Scalar);
|
||||
}
|
||||
function HandleMouseClick( bool bRight)
|
||||
function HandleMouseClick(bool bRight)
|
||||
{
|
||||
if (CurrentRow >= 0 && (ItemRows[CurrentRow].bSplitter || ItemRows[CurrentRow].bDisabled))
|
||||
return;
|
||||
@ -151,8 +151,8 @@ function NotifyMousePaused()
|
||||
bDrawToolTip = true;
|
||||
}
|
||||
|
||||
Delegate OnSelectedItem( int Index );
|
||||
Delegate OnBecameHidden( KFGUI_RightClickMenu M );
|
||||
Delegate OnSelectedItem(int Index);
|
||||
Delegate OnBecameHidden(KFGUI_RightClickMenu M);
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ var transient bool bGrabbedScroller;
|
||||
|
||||
var bool bVertical, bHideScrollbar;
|
||||
|
||||
final function UpdateScrollSize( int Current, int MxRange, int Stride, int StepStride, optional int MnRange)
|
||||
final function UpdateScrollSize(int Current, int MxRange, int Stride, int StepStride, optional int MnRange)
|
||||
{
|
||||
MaxRange = MxRange;
|
||||
MinRange = MnRange;
|
||||
@ -23,11 +23,11 @@ final function UpdateScrollSize( int Current, int MxRange, int Stride, int StepS
|
||||
PageStep = StepStride;
|
||||
SetValue(Current);
|
||||
}
|
||||
final function AddValue( int V)
|
||||
final function AddValue(int V)
|
||||
{
|
||||
SetValue(CurrentScroll+V);
|
||||
}
|
||||
final function SetValue( int V)
|
||||
final function SetValue(int V)
|
||||
{
|
||||
CurrentScroll = Clamp((V / ScrollStride) * ScrollStride, MinRange, MaxRange);
|
||||
OnScrollChange(Self, CurrentScroll);
|
||||
@ -36,7 +36,7 @@ final function int GetValue()
|
||||
{
|
||||
return CurrentScroll;
|
||||
}
|
||||
Delegate OnScrollChange( KFGUI_ScrollBarBase Sender, int Value );
|
||||
Delegate OnScrollChange(KFGUI_ScrollBarBase Sender, int Value);
|
||||
|
||||
// Get UI width.
|
||||
function float GetWidth()
|
||||
@ -59,7 +59,7 @@ function DrawMenu()
|
||||
Owner.CurrentStyle.RenderScrollBar(Self);
|
||||
}
|
||||
}
|
||||
function MouseClick( bool bRight)
|
||||
function MouseClick(bool bRight)
|
||||
{
|
||||
if (bRight || bDisabled)
|
||||
return;
|
||||
@ -91,7 +91,7 @@ function MouseClick( bool bRight)
|
||||
else AddValue(PageStep);
|
||||
}
|
||||
}
|
||||
function MouseRelease( bool bRight)
|
||||
function MouseRelease(bool bRight)
|
||||
{
|
||||
if (!bRight)
|
||||
DropInputFocus();
|
||||
@ -103,7 +103,7 @@ function LostInputFocus()
|
||||
bPressedDown = false;
|
||||
}
|
||||
|
||||
function ScrollMouseWheel( bool bUp)
|
||||
function ScrollMouseWheel(bool bUp)
|
||||
{
|
||||
if (bDisabled)
|
||||
return;
|
||||
|
@ -38,7 +38,7 @@ function UpdateListVis()
|
||||
ScrollBar.UpdateScrollSize(CurrentValue, MaxValue, 1,1, MinValue);
|
||||
}
|
||||
|
||||
function ScrollMouseWheel( bool bUp)
|
||||
function ScrollMouseWheel(bool bUp)
|
||||
{
|
||||
if (!ScrollBar.bDisabled)
|
||||
ScrollBar.ScrollMouseWheel(bUp);
|
||||
|
@ -25,7 +25,7 @@ function CloseMenu()
|
||||
}
|
||||
|
||||
// Remember to call InitMenu() on the newly created page after.
|
||||
final function KFGUI_Base AddPage( class < KFGUI_Base> PageClass, string Caption, string Hint, optional out KFGUI_Button Button)
|
||||
final function KFGUI_Base AddPage(class < KFGUI_Base> PageClass, string Caption, string Hint, optional out KFGUI_Button Button)
|
||||
{
|
||||
local KFGUI_Base P;
|
||||
local KFGUI_Button B;
|
||||
@ -77,12 +77,12 @@ final function KFGUI_Base AddPage( class < KFGUI_Base> PageClass, string Caption
|
||||
return P;
|
||||
}
|
||||
|
||||
function PageSwitched( KFGUI_Button Sender)
|
||||
function PageSwitched(KFGUI_Button Sender)
|
||||
{
|
||||
SelectPage(Sender.IDValue);
|
||||
}
|
||||
|
||||
final function SelectPage( int Index)
|
||||
final function SelectPage(int Index)
|
||||
{
|
||||
PlayMenuSound(MN_LostFocus);
|
||||
|
||||
@ -124,7 +124,7 @@ function PreDraw()
|
||||
Components[i].InputPos[j] = CompPos[j];
|
||||
if (i == PageComponentIndex)
|
||||
{
|
||||
switch( ButtonPosition)
|
||||
switch(ButtonPosition)
|
||||
{
|
||||
case 0:
|
||||
Components[i].InputPos[1] += (InputPos[3]*BorderWidth*PagePadding);
|
||||
|
@ -41,7 +41,7 @@ var transient float MaxHeight, ScrollWidth, OldSize[2], InitFontScale, TextHeigh
|
||||
var transient Font InitFont;
|
||||
var transient bool bShowScrollbar, bTextParsed;
|
||||
|
||||
function SetText( string S)
|
||||
function SetText(string S)
|
||||
{
|
||||
if (Text == S)
|
||||
return;
|
||||
@ -51,7 +51,7 @@ function SetText( string S)
|
||||
OrgLines.Length = 0;
|
||||
bTextParsed = false;
|
||||
}
|
||||
function AddText( string S, optional bool bIgnoreSpam)
|
||||
function AddText(string S, optional bool bIgnoreSpam)
|
||||
{
|
||||
Text $= S;
|
||||
OldSize[0] = -1;
|
||||
@ -85,7 +85,7 @@ final function ParseTextLines()
|
||||
continue;
|
||||
|
||||
z = 0;
|
||||
while( true)
|
||||
while (true)
|
||||
{
|
||||
j = InStr(S, "#{");
|
||||
if (j > 0)
|
||||
@ -147,7 +147,7 @@ final function ParseTextLines()
|
||||
}
|
||||
OrgLines = Lines; // Create a backup.
|
||||
}
|
||||
final function byte GrabHexValue( string S)
|
||||
final function byte GrabHexValue(string S)
|
||||
{
|
||||
local byte n;
|
||||
|
||||
@ -155,7 +155,7 @@ final function byte GrabHexValue( string S)
|
||||
S = Mid(S, 2);
|
||||
return n;
|
||||
}
|
||||
final function byte HexToInt( byte n)
|
||||
final function byte HexToInt(byte n)
|
||||
{
|
||||
if (n >= 48 && n <= 57 ) // '0' - '9'
|
||||
return n-48;
|
||||
@ -233,7 +233,7 @@ function InitSize()
|
||||
}
|
||||
|
||||
// Parse textlines to see if they're too long.
|
||||
final function ParseLines( float ClipX)
|
||||
final function ParseLines(float ClipX)
|
||||
{
|
||||
local float X, XS, YS;
|
||||
local int i, j,z, n;
|
||||
@ -279,7 +279,7 @@ final function ParseLines( float ClipX)
|
||||
}
|
||||
|
||||
// Slow, find wrapped splitting point in text.
|
||||
final function int FindSplitPoint( string S, float X, float ClipX)
|
||||
final function int FindSplitPoint(string S, float X, float ClipX)
|
||||
{
|
||||
local int i, l,PrevWord;
|
||||
local float XL, YL;
|
||||
@ -292,7 +292,7 @@ final function int FindSplitPoint( string S, float X, float ClipX)
|
||||
l = Len(S);
|
||||
PrevWord = 0;
|
||||
bWasWhite = true;
|
||||
while( i < l)
|
||||
while (i < l)
|
||||
{
|
||||
if (Mid(S, i,1) == " ")
|
||||
{
|
||||
@ -318,7 +318,7 @@ final function int FindSplitPoint( string S, float X, float ClipX)
|
||||
}
|
||||
return l;
|
||||
}
|
||||
final function string StripWhiteSpaces( string S)
|
||||
final function string StripWhiteSpaces(string S)
|
||||
{
|
||||
if (Left(S, 1) == " ")
|
||||
S = Mid(S, 1);
|
||||
@ -461,7 +461,7 @@ function bool CaptureMouse()
|
||||
return (bShowScrollbar ? Super.CaptureMouse() : false); // Nope.
|
||||
}
|
||||
|
||||
function ScrollMouseWheel( bool bUp)
|
||||
function ScrollMouseWheel(bool bUp)
|
||||
{
|
||||
if (bShowScrollbar)
|
||||
ScrollBar.ScrollMouseWheel(bUp);
|
||||
|
@ -24,7 +24,7 @@ function InitSize()
|
||||
TS = Owner.CurrentStyle.GetFontScaler();
|
||||
TS *= FontScale;
|
||||
|
||||
while( true)
|
||||
while (true)
|
||||
{
|
||||
Canvas.Font = Owner.CurrentStyle.MainFont;
|
||||
if (TextFontInfo.bClipText)
|
||||
@ -51,7 +51,7 @@ function InitSize()
|
||||
InitFont = Canvas.Font;
|
||||
InitFontScale = TS;
|
||||
|
||||
switch( AlignX)
|
||||
switch (AlignX)
|
||||
{
|
||||
case 0:
|
||||
InitOffset[0] = 0;
|
||||
@ -62,7 +62,7 @@ function InitSize()
|
||||
default:
|
||||
InitOffset[0] = CompPos[2]-(XL+1);
|
||||
}
|
||||
switch( AlignY)
|
||||
switch (AlignY)
|
||||
{
|
||||
case 0:
|
||||
InitOffset[1] = 0;
|
||||
@ -74,7 +74,7 @@ function InitSize()
|
||||
InitOffset[1] = CompPos[3]-YL;
|
||||
}
|
||||
}
|
||||
function SetText( string S)
|
||||
function SetText(string S)
|
||||
{
|
||||
if (Text == S)
|
||||
return;
|
||||
|
@ -10,7 +10,7 @@ var transient bool bScrollCompleted, bTextDirty;
|
||||
var transient array < bool> RowsCompleted;
|
||||
var transient int MaxIndex, RowsDropped;
|
||||
|
||||
function SetText( string S)
|
||||
function SetText(string S)
|
||||
{
|
||||
Super.SetText(S);
|
||||
|
||||
@ -168,7 +168,7 @@ function bool CaptureMouse()
|
||||
return (!bScrollCompleted && Super(KFGUI_MultiComponent).CaptureMouse()) || Super.CaptureMouse();
|
||||
}
|
||||
|
||||
function MouseClick( bool bRight)
|
||||
function MouseClick(bool bRight)
|
||||
{
|
||||
if (bScrollCompleted)
|
||||
return;
|
||||
|
@ -11,11 +11,11 @@ function InputMouseMoved()
|
||||
{
|
||||
DropInputFocus();
|
||||
}
|
||||
function MouseClick( bool bRight)
|
||||
function MouseClick(bool bRight)
|
||||
{
|
||||
DropInputFocus();
|
||||
}
|
||||
function MouseRelease( bool bRight)
|
||||
function MouseRelease(bool bRight)
|
||||
{
|
||||
DropInputFocus();
|
||||
}
|
||||
@ -24,7 +24,7 @@ function ShowMenu()
|
||||
CurrentAlpha = 1;
|
||||
}
|
||||
|
||||
final function SetText( string S)
|
||||
final function SetText(string S)
|
||||
{
|
||||
ParseStringIntoArray(S, Lines, " < SEPERATOR > ", false);
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ static function CheckAvatar(KFPlayerReplicationInfo KFPRI, KFPlayerController PC
|
||||
}
|
||||
}
|
||||
|
||||
delegate bool InOrder( KFPlayerReplicationInfo P1, KFPlayerReplicationInfo P2)
|
||||
delegate bool InOrder(KFPlayerReplicationInfo P1, KFPlayerReplicationInfo P2)
|
||||
{
|
||||
if (P1 == None || P2 == None)
|
||||
return true;
|
||||
@ -241,8 +241,7 @@ function DrawMenu()
|
||||
YPos += YL;
|
||||
BoxH = YL + BorderSize;
|
||||
SetDrawColor(Canvas, Settings.Style.ListHeaderBoxColor);
|
||||
Owner.CurrentStyle.DrawRectBox(
|
||||
XPos - BorderSize * 2,
|
||||
Owner.CurrentStyle.DrawRectBox( XPos - BorderSize * 2,
|
||||
YPos,
|
||||
Width + BorderSize * 4,
|
||||
BoxH,
|
||||
@ -316,7 +315,7 @@ function SetDrawColor(Canvas C, ColorRGBA RGBA)
|
||||
C.SetDrawColor(RGBA.R, RGBA.G, RGBA.B, RGBA.A);
|
||||
}
|
||||
|
||||
function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, float Width, bool bFocus)
|
||||
function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float Width, bool bFocus)
|
||||
{
|
||||
local string S, StrValue;
|
||||
local float FontScalar, TextYOffset, XL, YL, PerkIconPosX, PerkIconPosY, PerkIconSize, PrestigeIconScale;
|
||||
@ -408,8 +407,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
|
||||
SetDrawColor(C, Settings.Style.LeftStateBoxColor);
|
||||
|
||||
BoxWidth = Owner.HUDOwner.ScaledBorderSize * 8;
|
||||
Owner.CurrentStyle.DrawRectBox(
|
||||
XPos,
|
||||
Owner.CurrentStyle.DrawRectBox( XPos,
|
||||
YOffset,
|
||||
BoxWidth,
|
||||
Height,
|
||||
@ -431,8 +429,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
|
||||
// Right stats box
|
||||
BoxWidth = Width - XPos;
|
||||
SetDrawColor(C, Settings.Style.StatsBoxColor);
|
||||
Owner.CurrentStyle.DrawRectBox(
|
||||
XPos,
|
||||
Owner.CurrentStyle.DrawRectBox( XPos,
|
||||
YOffset,
|
||||
BoxWidth,
|
||||
Height,
|
||||
@ -659,7 +656,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
|
||||
DrawPingBars(C, YOffset + (Height/2) - ((Height*0.5)/2), Width - (Height*0.5) - (Owner.HUDOwner.ScaledBorderSize*2), Height*0.5, Height*0.5, float(Ping));
|
||||
}
|
||||
|
||||
final function DrawPingBars( Canvas C, float YOffset, float XOffset, float W, float H, float Ping)
|
||||
final function DrawPingBars(Canvas C, float YOffset, float XOffset, float W, float H, float Ping)
|
||||
{
|
||||
local float PingMul, BarW, BarH, BaseH, XPos, YPos;
|
||||
local byte i;
|
||||
@ -693,7 +690,7 @@ final function DrawPingBars( Canvas C, float YOffset, float XOffset, float W, fl
|
||||
}
|
||||
}
|
||||
|
||||
static final function Texture2D FindAvatar( KFPlayerController PC, UniqueNetId ClientID)
|
||||
static final function Texture2D FindAvatar(KFPlayerController PC, UniqueNetId ClientID)
|
||||
{
|
||||
local string S;
|
||||
|
||||
@ -712,7 +709,7 @@ final static function string GetNiceSize(int Num)
|
||||
return (Num / 1000000000) $ "B";
|
||||
}
|
||||
|
||||
function ScrollMouseWheel( bool bUp)
|
||||
function ScrollMouseWheel(bool bUp)
|
||||
{
|
||||
PlayersList.ScrollMouseWheel(bUp);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user