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