add logger
This commit is contained in:
parent
9d18ad1f39
commit
7cbf4833db
2
ScoreboardExt/Build.uci
Normal file
2
ScoreboardExt/Build.uci
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
`define bEnableCallstack true
|
||||||
|
`define CurrentVersion 1
|
@ -1,5 +1,8 @@
|
|||||||
Class ClassicStyle extends KF2Style;
|
Class ClassicStyle extends KF2Style;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
function RenderFramedWindow( KFGUI_FloatingWindow P )
|
function RenderFramedWindow( KFGUI_FloatingWindow P )
|
||||||
{
|
{
|
||||||
local int XS,YS,TitleHeight;
|
local int XS,YS,TitleHeight;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
class CustomRanks extends Object
|
class CustomRanks extends Object
|
||||||
dependson(Types)
|
dependson(Types)
|
||||||
config(ScoreboardExt);
|
config(ScoreboardExt);
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var config array<RankInfo> Rank;
|
var config array<RankInfo> Rank;
|
||||||
|
@ -2,6 +2,9 @@ class DynamicLevelColor extends Object
|
|||||||
dependson(Types)
|
dependson(Types)
|
||||||
config(ScoreboardExt);
|
config(ScoreboardExt);
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var config bool bEnabled;
|
var config bool bEnabled;
|
||||||
var config int Normal_Low;
|
var config int Normal_Low;
|
||||||
var config int Normal_High;
|
var config int Normal_High;
|
||||||
@ -15,6 +18,9 @@ var config int HellOnEarth_High;
|
|||||||
public static function SCESettingsLevel DefaultSettings()
|
public static function SCESettingsLevel DefaultSettings()
|
||||||
{
|
{
|
||||||
local SCESettingsLevel Settings;
|
local SCESettingsLevel Settings;
|
||||||
|
|
||||||
|
`callstack_static("DefaultSettings");
|
||||||
|
|
||||||
return Settings;
|
return Settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,6 +28,8 @@ public static function SCESettingsLevel Settings()
|
|||||||
{
|
{
|
||||||
local SCESettingsLevel Settings;
|
local SCESettingsLevel Settings;
|
||||||
|
|
||||||
|
`callstack_static("Settings");
|
||||||
|
|
||||||
Settings.Dynamic = default.bEnabled;
|
Settings.Dynamic = default.bEnabled;
|
||||||
Settings.Low[0] = default.Normal_Low;
|
Settings.Low[0] = default.Normal_Low;
|
||||||
Settings.High[0] = default.Normal_High;
|
Settings.High[0] = default.Normal_High;
|
||||||
@ -37,6 +45,8 @@ public static function SCESettingsLevel Settings()
|
|||||||
|
|
||||||
public static function WriteSettings(SCESettingsLevel Settings)
|
public static function WriteSettings(SCESettingsLevel Settings)
|
||||||
{
|
{
|
||||||
|
`callstack_static("WriteSettings");
|
||||||
|
|
||||||
default.bEnabled = Settings.Dynamic;
|
default.bEnabled = Settings.Dynamic;
|
||||||
default.Normal_Low = Settings.Low[0];
|
default.Normal_Low = Settings.Low[0];
|
||||||
default.Normal_High = Settings.High[0];
|
default.Normal_High = Settings.High[0];
|
||||||
|
@ -2,6 +2,9 @@ class DynamicPingColor extends Object
|
|||||||
dependson(Types)
|
dependson(Types)
|
||||||
config(ScoreboardExt);
|
config(ScoreboardExt);
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var config bool bEnabled;
|
var config bool bEnabled;
|
||||||
var config int Low;
|
var config int Low;
|
||||||
var config int High;
|
var config int High;
|
||||||
@ -10,6 +13,9 @@ var config bool bShowPingBars;
|
|||||||
public static function SCESettingsPing DefaultSettings()
|
public static function SCESettingsPing DefaultSettings()
|
||||||
{
|
{
|
||||||
local SCESettingsPing Settings;
|
local SCESettingsPing Settings;
|
||||||
|
|
||||||
|
`callstack_static("DefaultSettings");
|
||||||
|
|
||||||
return Settings;
|
return Settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17,6 +23,8 @@ public static function SCESettingsPing Settings()
|
|||||||
{
|
{
|
||||||
local SCESettingsPing Settings;
|
local SCESettingsPing Settings;
|
||||||
|
|
||||||
|
`callstack_static("Settings");
|
||||||
|
|
||||||
Settings.Dynamic = default.bEnabled;
|
Settings.Dynamic = default.bEnabled;
|
||||||
Settings.Low = default.Low;
|
Settings.Low = default.Low;
|
||||||
Settings.High = default.High;
|
Settings.High = default.High;
|
||||||
@ -27,6 +35,8 @@ public static function SCESettingsPing Settings()
|
|||||||
|
|
||||||
public static function WriteSettings(SCESettingsPing Settings)
|
public static function WriteSettings(SCESettingsPing Settings)
|
||||||
{
|
{
|
||||||
|
`callstack_static("WriteSettings");
|
||||||
|
|
||||||
default.bEnabled = Settings.Dynamic;
|
default.bEnabled = Settings.Dynamic;
|
||||||
default.Low = Settings.Low;
|
default.Low = Settings.Low;
|
||||||
default.High = Settings.High;
|
default.High = Settings.High;
|
||||||
|
@ -2,6 +2,9 @@ class DynamicStateColor extends Object
|
|||||||
dependson(Types)
|
dependson(Types)
|
||||||
config(ScoreboardExt);
|
config(ScoreboardExt);
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var config bool bEnabled;
|
var config bool bEnabled;
|
||||||
var config int Low;
|
var config int Low;
|
||||||
var config int High;
|
var config int High;
|
||||||
@ -9,6 +12,9 @@ var config int High;
|
|||||||
public static function SCESettingsState DefaultSettings()
|
public static function SCESettingsState DefaultSettings()
|
||||||
{
|
{
|
||||||
local SCESettingsState Settings;
|
local SCESettingsState Settings;
|
||||||
|
|
||||||
|
`callstack_static("DefaultSettings");
|
||||||
|
|
||||||
return Settings;
|
return Settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -16,6 +22,8 @@ public static function SCESettingsState Settings()
|
|||||||
{
|
{
|
||||||
local SCESettingsState Settings;
|
local SCESettingsState Settings;
|
||||||
|
|
||||||
|
`callstack_static("Settings");
|
||||||
|
|
||||||
Settings.Dynamic = default.bEnabled;
|
Settings.Dynamic = default.bEnabled;
|
||||||
Settings.Low = default.Low;
|
Settings.Low = default.Low;
|
||||||
Settings.High = default.High;
|
Settings.High = default.High;
|
||||||
@ -25,6 +33,8 @@ public static function SCESettingsState Settings()
|
|||||||
|
|
||||||
public static function WriteSettings(SCESettingsState Settings)
|
public static function WriteSettings(SCESettingsState Settings)
|
||||||
{
|
{
|
||||||
|
`callstack_static("WriteSettings");
|
||||||
|
|
||||||
default.bEnabled = Settings.Dynamic;
|
default.bEnabled = Settings.Dynamic;
|
||||||
default.Low = Settings.Low;
|
default.Low = Settings.Low;
|
||||||
default.High = Settings.High;
|
default.High = Settings.High;
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
Class GUIStyleBase extends Object
|
Class GUIStyleBase extends Object
|
||||||
abstract;
|
abstract;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var Texture2D ItemTex;
|
var Texture2D ItemTex;
|
||||||
var array<Texture2D> BorderTextures, ArrowTextures, ButtonTextures, TabTextures, ItemBoxTextures, PerkBox, CheckBoxTextures, ProgressBarTextures, SliderTextures;
|
var array<Texture2D> BorderTextures, ArrowTextures, ButtonTextures, TabTextures, ItemBoxTextures, PerkBox, CheckBoxTextures, ProgressBarTextures, SliderTextures;
|
||||||
var Texture2D ScrollTexture,FavoriteIcon,BankNoteIcon;
|
var Texture2D ScrollTexture,FavoriteIcon,BankNoteIcon;
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
Class KF2GUIController extends Info
|
Class KF2GUIController extends Info
|
||||||
transient;
|
transient;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var() class<GUIStyleBase> DefaultStyle;
|
var() class<GUIStyleBase> DefaultStyle;
|
||||||
|
|
||||||
var PlayerController PlayerOwner;
|
var PlayerController PlayerOwner;
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
// Input while in a menu.
|
// Input while in a menu.
|
||||||
class KF2GUIInput extends KFPlayerInput;
|
class KF2GUIInput extends KFPlayerInput;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
|
|
||||||
var KF2GUIController ControllerOwner;
|
var KF2GUIController ControllerOwner;
|
||||||
var PlayerInput BaseInput;
|
var PlayerInput BaseInput;
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KF2Style extends GUIStyleBase;
|
Class KF2Style extends GUIStyleBase;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var Texture2D LoadedTex[2];
|
var Texture2D LoadedTex[2];
|
||||||
const TOOLTIP_BORDER=4;
|
const TOOLTIP_BORDER=4;
|
||||||
|
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
class KFColorHelper extends Object
|
class KFColorHelper extends Object
|
||||||
transient;
|
transient;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
|
|
||||||
struct HSVColour
|
struct HSVColour
|
||||||
{
|
{
|
||||||
var() float H, S, V, A;
|
var() float H, S, V, A;
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
// Ugly hack to draw ontop of flash UI!
|
// Ugly hack to draw ontop of flash UI!
|
||||||
Class KFGUIConsoleHack extends Console;
|
Class KFGUIConsoleHack extends Console;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var KF2GUIController OutputObject;
|
var KF2GUIController OutputObject;
|
||||||
|
|
||||||
function PostRender_Console(Canvas Canvas)
|
function PostRender_Console(Canvas Canvas)
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
Class KFGUI_Base extends Object
|
Class KFGUI_Base extends Object
|
||||||
abstract;
|
abstract;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
|
|
||||||
var KF2GUIController Owner;
|
var KF2GUIController Owner;
|
||||||
var ScoreboardExtHUD HUDOwner;
|
var ScoreboardExtHUD HUDOwner;
|
||||||
var KFGUI_Base ParentComponent; // Parent component if any.
|
var KFGUI_Base ParentComponent; // Parent component if any.
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
Class KFGUI_Button extends KFGUI_Clickable;
|
Class KFGUI_Button extends KFGUI_Clickable;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
|
|
||||||
var() Canvas.CanvasIcon OverlayTexture;
|
var() Canvas.CanvasIcon OverlayTexture;
|
||||||
var() string ButtonText,GamepadButtonName;
|
var() string ButtonText,GamepadButtonName;
|
||||||
var() color TextColor;
|
var() color TextColor;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
class KFGUI_CategoryButton extends KFGUI_Button;
|
class KFGUI_CategoryButton extends KFGUI_Button;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
|
|
||||||
var transient bool bOpened;
|
var transient bool bOpened;
|
||||||
var Texture2D Icon;
|
var Texture2D Icon;
|
||||||
var Color IconColor;
|
var Color IconColor;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
class KFGUI_CategoryList extends KFGUI_ComponentList;
|
class KFGUI_CategoryList extends KFGUI_ComponentList;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
|
|
||||||
// Broken, does not work correctly when closing a menu and re-opening it if a category is open
|
// Broken, does not work correctly when closing a menu and re-opening it if a category is open
|
||||||
struct FCategoryItems
|
struct FCategoryItems
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
Class KFGUI_CheckBox extends KFGUI_EditControl;
|
Class KFGUI_CheckBox extends KFGUI_EditControl;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
|
|
||||||
var() Texture CheckMark,CheckDisabled,CheckIdle,CheckFocus,CheckClicked;
|
var() Texture CheckMark,CheckDisabled,CheckIdle,CheckFocus,CheckClicked;
|
||||||
var() bool bForceUniform,bChecked;
|
var() bool bForceUniform,bChecked;
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
Class KFGUI_Clickable extends KFGUI_Base
|
Class KFGUI_Clickable extends KFGUI_Base
|
||||||
abstract;
|
abstract;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
|
|
||||||
var() int IntIndex; // More user variables.
|
var() int IntIndex; // More user variables.
|
||||||
var() string ToolTip;
|
var() string ToolTip;
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
class KFGUI_ColorSlider extends KFGUI_MultiComponent;
|
class KFGUI_ColorSlider extends KFGUI_MultiComponent;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var KFGUI_Slider RSlider,GSlider,BSlider,ASlider;
|
var KFGUI_Slider RSlider,GSlider,BSlider,ASlider;
|
||||||
var KFGUI_TextLable TextLable,RedLabel,GreenLabel,BlueLabel,AlphaLabel,RedValue,GreenValue,BlueValue,AlphaValue;
|
var KFGUI_TextLable TextLable,RedLabel,GreenLabel,BlueLabel,AlphaLabel,RedValue,GreenValue,BlueValue,AlphaValue;
|
||||||
var KFGUI_ComponentList SettingsBox;
|
var KFGUI_ComponentList SettingsBox;
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
// Columned list box (only for text lines).
|
// Columned list box (only for text lines).
|
||||||
Class KFGUI_ColumnList extends KFGUI_List;
|
Class KFGUI_ColumnList extends KFGUI_List;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
struct FColumnItem
|
struct FColumnItem
|
||||||
{
|
{
|
||||||
var() string Text;
|
var() string Text;
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
// Do not use this on your own, it is used by ColumnList
|
// Do not use this on your own, it is used by ColumnList
|
||||||
Class KFGUI_ColumnTop extends KFGUI_Base;
|
Class KFGUI_ColumnTop extends KFGUI_Base;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var() float ColumnMinSize; // Minimum pixels width allowed.
|
var() float ColumnMinSize; // Minimum pixels width allowed.
|
||||||
var KFGUI_ColumnList ListOwner;
|
var KFGUI_ColumnList ListOwner;
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KFGUI_ComboBox extends KFGUI_EditControl;
|
Class KFGUI_ComboBox extends KFGUI_EditControl;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var KFGUI_ComboSelector Selection;
|
var KFGUI_ComboSelector Selection;
|
||||||
|
|
||||||
var float BorderSize;
|
var float BorderSize;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KFGUI_ComboSelector extends KFGUI_Clickable;
|
Class KFGUI_ComboSelector extends KFGUI_Clickable;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var KFGUI_ComboBox Combo;
|
var KFGUI_ComboBox Combo;
|
||||||
var int CurrentRow,OldRow;
|
var int CurrentRow,OldRow;
|
||||||
|
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
// List box with components as items.
|
// List box with components as items.
|
||||||
Class KFGUI_ComponentList extends KFGUI_List;
|
Class KFGUI_ComponentList extends KFGUI_List;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var int VisRange[2];
|
var int VisRange[2];
|
||||||
var() int NumColumns;
|
var() int NumColumns;
|
||||||
var array<KFGUI_Base> ItemComponents;
|
var array<KFGUI_Base> ItemComponents;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KFGUI_EditBox extends KFGUI_Clickable;
|
Class KFGUI_EditBox extends KFGUI_Clickable;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var enum eTextCase
|
var enum eTextCase
|
||||||
{
|
{
|
||||||
TXTC_None,
|
TXTC_None,
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KFGUI_EditControl extends KFGUI_Clickable;
|
Class KFGUI_EditControl extends KFGUI_Clickable;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var export editinline KFGUI_TextLable TextLable;
|
var export editinline KFGUI_TextLable TextLable;
|
||||||
var transient float TextHeight,TextScale;
|
var transient float TextHeight,TextScale;
|
||||||
var transient Font TextFont;
|
var transient Font TextFont;
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
Class KFGUI_FloatingWindow extends KFGUI_Page
|
Class KFGUI_FloatingWindow extends KFGUI_Page
|
||||||
abstract;
|
abstract;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var() string WindowTitle; // Title of this window.
|
var() string WindowTitle; // Title of this window.
|
||||||
var float DragOffset[2], OpenAnimSpeed;
|
var float DragOffset[2], OpenAnimSpeed;
|
||||||
var KFGUI_FloatingWindowHeader HeaderComp;
|
var KFGUI_FloatingWindowHeader HeaderComp;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KFGUI_FloatingWindowHeader extends KFGUI_Base;
|
Class KFGUI_FloatingWindowHeader extends KFGUI_Base;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var bool bDragWindow;
|
var bool bDragWindow;
|
||||||
|
|
||||||
function PreDraw()
|
function PreDraw()
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KFGUI_Frame extends KFGUI_FloatingWindow;
|
Class KFGUI_Frame extends KFGUI_FloatingWindow;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var() float EdgeSize[4]; // Pixels wide for edges (left, top, right, bottom).
|
var() float EdgeSize[4]; // Pixels wide for edges (left, top, right, bottom).
|
||||||
var() float HeaderSize[2]; // Pixels wide for edges (left, top).
|
var() float HeaderSize[2]; // Pixels wide for edges (left, top).
|
||||||
var() Texture FrameTex;
|
var() Texture FrameTex;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KFGUI_Image extends KFGUI_Base;
|
Class KFGUI_Image extends KFGUI_Base;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var enum eImageStyle
|
var enum eImageStyle
|
||||||
{
|
{
|
||||||
ISTY_Normal,
|
ISTY_Normal,
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
// List box with custom render code for the items.
|
// List box with custom render code for the items.
|
||||||
Class KFGUI_List extends KFGUI_MultiComponent;
|
Class KFGUI_List extends KFGUI_MultiComponent;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var() bool bDrawBackground, bHideScrollbar, bUseFocusSound;
|
var() bool bDrawBackground, bHideScrollbar, bUseFocusSound;
|
||||||
var() protectedwrite int ListCount;
|
var() protectedwrite int ListCount;
|
||||||
var() int ListItemsPerPage;
|
var() int ListItemsPerPage;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KFGUI_ListHorz extends KFGUI_MultiComponent;
|
Class KFGUI_ListHorz extends KFGUI_MultiComponent;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var() bool bDrawBackground, bHideScrollbar, bUseFocusSound;
|
var() bool bDrawBackground, bHideScrollbar, bUseFocusSound;
|
||||||
var() protected int ListCount;
|
var() protected int ListCount;
|
||||||
var() int ListItemsPerPage;
|
var() int ListItemsPerPage;
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
Class KFGUI_ListItem extends Object
|
Class KFGUI_ListItem extends Object
|
||||||
transient;
|
transient;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var KFGUI_ListItem Next;
|
var KFGUI_ListItem Next;
|
||||||
var array<string> Columns,SortColumns;
|
var array<string> Columns,SortColumns;
|
||||||
var int Index,Value;
|
var int Index,Value;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KFGUI_MultiComponent extends KFGUI_Base;
|
Class KFGUI_MultiComponent extends KFGUI_Base;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var() export editinline array<KFGUI_Base> Components;
|
var() export editinline array<KFGUI_Base> Components;
|
||||||
|
|
||||||
function InitMenu()
|
function InitMenu()
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
Class KFGUI_Page extends KFGUI_MultiComponent
|
Class KFGUI_Page extends KFGUI_MultiComponent
|
||||||
abstract;
|
abstract;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var() byte FrameOpacity; // Transperancy of the frame.
|
var() byte FrameOpacity; // Transperancy of the frame.
|
||||||
var() bool bPersistant, // Reuse the same menu object throughout the level.
|
var() bool bPersistant, // Reuse the same menu object throughout the level.
|
||||||
bUnique, // If calling OpenMenu multiple times with same menu class, only open one instance of it.
|
bUnique, // If calling OpenMenu multiple times with same menu class, only open one instance of it.
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
class KFGUI_ProgressBar extends KFGUI_Base;
|
class KFGUI_ProgressBar extends KFGUI_Base;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var Texture BarBack;
|
var Texture BarBack;
|
||||||
var Texture BarTop;
|
var Texture BarTop;
|
||||||
var Color BarColor;
|
var Color BarColor;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KFGUI_RightClickMenu extends KFGUI_Clickable;
|
Class KFGUI_RightClickMenu extends KFGUI_Clickable;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
struct FRowItem
|
struct FRowItem
|
||||||
{
|
{
|
||||||
var string Text,ToolTip;
|
var string Text,ToolTip;
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
Class KFGUI_ScrollBarBase extends KFGUI_Clickable
|
Class KFGUI_ScrollBarBase extends KFGUI_Clickable
|
||||||
abstract;
|
abstract;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var() int MinRange,MaxRange,ScrollStride,PageStep;
|
var() int MinRange,MaxRange,ScrollStride,PageStep;
|
||||||
var() float ButtonScale; // Button width (scaled by default font height).
|
var() float ButtonScale; // Button width (scaled by default font height).
|
||||||
var int CurrentScroll;
|
var int CurrentScroll;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KFGUI_ScrollBarH extends KFGUI_ScrollBarBase;
|
Class KFGUI_ScrollBarH extends KFGUI_ScrollBarBase;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
defaultproperties
|
defaultproperties
|
||||||
{
|
{
|
||||||
bVertical=false
|
bVertical=false
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KFGUI_ScrollBarV extends KFGUI_ScrollBarBase;
|
Class KFGUI_ScrollBarV extends KFGUI_ScrollBarBase;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
defaultproperties
|
defaultproperties
|
||||||
{
|
{
|
||||||
bVertical=true
|
bVertical=true
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
class KFGUI_Slider extends KFGUI_MultiComponent;
|
class KFGUI_Slider extends KFGUI_MultiComponent;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var KFGUI_ScrollBarH ScrollBar;
|
var KFGUI_ScrollBarH ScrollBar;
|
||||||
|
|
||||||
var int MinValue,MaxValue;
|
var int MinValue,MaxValue;
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
// Same as SwitchComponent, but with buttons.
|
// Same as SwitchComponent, but with buttons.
|
||||||
Class KFGUI_SwitchMenuBar extends KFGUI_MultiComponent;
|
Class KFGUI_SwitchMenuBar extends KFGUI_MultiComponent;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var array<KFGUI_Base> SubPages;
|
var array<KFGUI_Base> SubPages;
|
||||||
var() byte ButtonPosition; // 0 = top, 1 = bottom, 2 = left, 3 = right
|
var() byte ButtonPosition; // 0 = top, 1 = bottom, 2 = left, 3 = right
|
||||||
var() float BorderWidth,ButtonAxisSize; // Width for buttons.
|
var() float BorderWidth,ButtonAxisSize; // Width for buttons.
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KFGUI_TextField extends KFGUI_MultiComponent;
|
Class KFGUI_TextField extends KFGUI_MultiComponent;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
enum ETextFieldStyles
|
enum ETextFieldStyles
|
||||||
{
|
{
|
||||||
TEXT_FIELD_NONE,
|
TEXT_FIELD_NONE,
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KFGUI_TextLable extends KFGUI_Base;
|
Class KFGUI_TextLable extends KFGUI_Base;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var() protected string Text;
|
var() protected string Text;
|
||||||
var() color TextColor;
|
var() color TextColor;
|
||||||
var() Canvas.FontRenderInfo TextFontInfo;
|
var() Canvas.FontRenderInfo TextFontInfo;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KFGUI_TextScroll extends KFGUI_TextField;
|
Class KFGUI_TextScroll extends KFGUI_TextField;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var float ScrollSpeed;
|
var float ScrollSpeed;
|
||||||
|
|
||||||
var transient float CharStartTime;
|
var transient float CharStartTime;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class KFGUI_Tooltip extends KFGUI_Base;
|
Class KFGUI_Tooltip extends KFGUI_Base;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var() array<string> Lines;
|
var() array<string> Lines;
|
||||||
var() Canvas.FontRenderInfo TextFontInfo;
|
var() Canvas.FontRenderInfo TextFontInfo;
|
||||||
var byte CurrentAlpha;
|
var byte CurrentAlpha;
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
class KFScoreBoard extends KFGUI_Page
|
class KFScoreBoard extends KFGUI_Page
|
||||||
dependson(Types);
|
dependson(Types);
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var transient float RankXPos, PerkXPos, PlayerXPos, HealthXPos, TimeXPos, KillsXPos, AssistXPos, CashXPos, DeathXPos, PingXPos;
|
var transient float RankXPos, PerkXPos, PlayerXPos, HealthXPos, TimeXPos, KillsXPos, AssistXPos, CashXPos, DeathXPos, PingXPos;
|
||||||
var transient float StatusWBox, PlayerWBox, PerkWBox, CashWBox, KillsWBox, AssistWBox, HealthWBox, PingWBox;
|
var transient float StatusWBox, PlayerWBox, PerkWBox, CashWBox, KillsWBox, AssistWBox, HealthWBox, PingWBox;
|
||||||
var transient float NextScoreboardRefresh;
|
var transient float NextScoreboardRefresh;
|
||||||
|
@ -2,4 +2,7 @@ class PlayerRankRelations extends Object
|
|||||||
dependson(Types)
|
dependson(Types)
|
||||||
config(ScoreboardExt);
|
config(ScoreboardExt);
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var config array<RankRelation> Relation;
|
var config array<RankRelation> Relation;
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
class ScoreboardExtHUD extends KFGFxHudWrapper
|
class ScoreboardExtHUD extends KFGFxHudWrapper
|
||||||
config(ScoreboardExtMut);
|
config(ScoreboardExtMut);
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
const HUDBorderSize = 3;
|
const HUDBorderSize = 3;
|
||||||
|
|
||||||
var float ScaledBorderSize;
|
var float ScaledBorderSize;
|
||||||
|
@ -2,10 +2,8 @@ class ScoreboardExtMut extends KFMutator
|
|||||||
dependson(Types)
|
dependson(Types)
|
||||||
config(ScoreboardExt);
|
config(ScoreboardExt);
|
||||||
|
|
||||||
const SteamIDLen = 17;
|
`include(Build.uci)
|
||||||
const UniqueIDLen = 18;
|
`include(Logger.uci)
|
||||||
|
|
||||||
const CurrentVersion = 1;
|
|
||||||
|
|
||||||
var config int ConfigVersion;
|
var config int ConfigVersion;
|
||||||
|
|
||||||
@ -25,6 +23,8 @@ var private SCESettings Settings;
|
|||||||
|
|
||||||
function PostBeginPlay()
|
function PostBeginPlay()
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
Super.PostBeginPlay();
|
Super.PostBeginPlay();
|
||||||
|
|
||||||
WorldInfo.Game.HUDType = class'ScoreboardExtHUD';
|
WorldInfo.Game.HUDType = class'ScoreboardExtHUD';
|
||||||
@ -44,22 +44,35 @@ function PostBeginPlay()
|
|||||||
|
|
||||||
function NotifyLogin(Controller C)
|
function NotifyLogin(Controller C)
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
AddPlayer(C);
|
AddPlayer(C);
|
||||||
Super.NotifyLogin(C);
|
Super.NotifyLogin(C);
|
||||||
}
|
}
|
||||||
|
|
||||||
function NotifyLogout(Controller C)
|
function NotifyLogout(Controller C)
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
RemovePlayer(C);
|
RemovePlayer(C);
|
||||||
Super.NotifyLogout(C);
|
Super.NotifyLogout(C);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function bool IsUID(String ID)
|
||||||
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
|
return (Left(ID, 2) ~= "0x");
|
||||||
|
}
|
||||||
|
|
||||||
private function InitConfig()
|
private function InitConfig()
|
||||||
{
|
{
|
||||||
local RankInfo ExampleRank;
|
local RankInfo ExampleRank;
|
||||||
local RankRelation ExamplePlayer;
|
local RankRelation ExamplePlayer;
|
||||||
local RankRelation ExampleSteamGroup;
|
local RankRelation ExampleSteamGroup;
|
||||||
|
|
||||||
|
`callstack();
|
||||||
|
|
||||||
// Update from config version to current version if needed
|
// Update from config version to current version if needed
|
||||||
switch (ConfigVersion)
|
switch (ConfigVersion)
|
||||||
{
|
{
|
||||||
@ -106,23 +119,23 @@ private function InitConfig()
|
|||||||
class'SteamGroupRankRelations'.static.StaticSaveConfig();
|
class'SteamGroupRankRelations'.static.StaticSaveConfig();
|
||||||
|
|
||||||
case 2147483647:
|
case 2147483647:
|
||||||
`log("[ScoreboardExt] Config updated to version"@CurrentVersion);
|
`info("Config updated to version"@`CurrentVersion);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CurrentVersion:
|
case `CurrentVersion:
|
||||||
`log("[ScoreboardExt] Config is up-to-date");
|
`info("Config is up-to-date");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
`log("[ScoreboardExt] Warn: The config version is higher than the current version (are you using an old mutator?)");
|
`warning("The config version is higher than the current version (are you using an old mutator?)");
|
||||||
`log("[ScoreboardExt] Warn: Config version is"@ConfigVersion@"but current version is"@CurrentVersion);
|
`warning("Config version is"@ConfigVersion@"but current version is"@`CurrentVersion);
|
||||||
`log("[ScoreboardExt] Warn: The config version will be changed to "@CurrentVersion);
|
`warning("The config version will be changed to "@`CurrentVersion);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ConfigVersion != CurrentVersion)
|
if (ConfigVersion != `CurrentVersion)
|
||||||
{
|
{
|
||||||
ConfigVersion = CurrentVersion;
|
ConfigVersion = `CurrentVersion;
|
||||||
SaveConfig();
|
SaveConfig();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -132,31 +145,38 @@ private function LoadRelations()
|
|||||||
local RankRelation Player, SteamGroup;
|
local RankRelation Player, SteamGroup;
|
||||||
local UIDRankRelation UIDInfo;
|
local UIDRankRelation UIDInfo;
|
||||||
|
|
||||||
|
`callstack();
|
||||||
|
|
||||||
foreach class'PlayerRankRelations'.default.Relation(Player)
|
foreach class'PlayerRankRelations'.default.Relation(Player)
|
||||||
{
|
{
|
||||||
UIDInfo.RankID = Player.RankID;
|
UIDInfo.RankID = Player.RankID;
|
||||||
if (Len(Player.ObjectID) == UniqueIDLen && Steamworks.StringToUniqueNetId(Player.ObjectID, UIDInfo.UID))
|
if (IsUID(Player.ObjectID) && Steamworks.StringToUniqueNetId(Player.ObjectID, UIDInfo.UID))
|
||||||
{
|
{
|
||||||
if (UIDRankRelationsPlayers.Find('Uid', UIDInfo.UID) == INDEX_NONE)
|
if (UIDRankRelationsPlayers.Find('Uid', UIDInfo.UID) == INDEX_NONE)
|
||||||
UIDRankRelationsPlayers.AddItem(UIDInfo);
|
UIDRankRelationsPlayers.AddItem(UIDInfo);
|
||||||
}
|
}
|
||||||
else if (Len(Player.ObjectID) == SteamIDLen && Steamworks.Int64ToUniqueNetId(Player.ObjectID, UIDInfo.UID))
|
else if (Steamworks.Int64ToUniqueNetId(Player.ObjectID, UIDInfo.UID))
|
||||||
{
|
{
|
||||||
if (UIDRankRelationsPlayers.Find('Uid', UIDInfo.UID) == INDEX_NONE)
|
if (UIDRankRelationsPlayers.Find('Uid', UIDInfo.UID) == INDEX_NONE)
|
||||||
UIDRankRelationsPlayers.AddItem(UIDInfo);
|
UIDRankRelationsPlayers.AddItem(UIDInfo);
|
||||||
}
|
}
|
||||||
else `Log("[ScoreboardExt] WARN: Can't add player:"@Player.ObjectID);
|
else `warning("Can't add player:"@Player.ObjectID);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach class'SteamGroupRankRelations'.default.Relation(SteamGroup)
|
foreach class'SteamGroupRankRelations'.default.Relation(SteamGroup)
|
||||||
{
|
{
|
||||||
UIDInfo.RankID = SteamGroup.RankID;
|
UIDInfo.RankID = SteamGroup.RankID;
|
||||||
if (Steamworks.Int64ToUniqueNetId(SteamGroup.ObjectID, UIDInfo.UID))
|
if (IsUID(SteamGroup.ObjectID) && Steamworks.StringToUniqueNetId(SteamGroup.ObjectID, UIDInfo.UID))
|
||||||
|
{
|
||||||
|
if (UIDRankRelationsPlayers.Find('Uid', UIDInfo.UID) == INDEX_NONE)
|
||||||
|
UIDRankRelationsPlayers.AddItem(UIDInfo);
|
||||||
|
}
|
||||||
|
else if (Steamworks.Int64ToUniqueNetId(SteamGroup.ObjectID, UIDInfo.UID))
|
||||||
{
|
{
|
||||||
if (UIDRankRelationsSteamGroups.Find('Uid', UIDInfo.UID) == INDEX_NONE)
|
if (UIDRankRelationsSteamGroups.Find('Uid', UIDInfo.UID) == INDEX_NONE)
|
||||||
UIDRankRelationsSteamGroups.AddItem(UIDInfo);
|
UIDRankRelationsSteamGroups.AddItem(UIDInfo);
|
||||||
}
|
}
|
||||||
else `Log("[ScoreboardExt] WARN: Can't add steamgroup:"@SteamGroup.ObjectID);
|
else `warning("Can't add steamgroup:"@SteamGroup.ObjectID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,31 +184,34 @@ private function AddPlayer(Controller C)
|
|||||||
{
|
{
|
||||||
local KFPlayerController KFPC;
|
local KFPlayerController KFPC;
|
||||||
local UIDRankRelation Relation;
|
local UIDRankRelation Relation;
|
||||||
local SClient RepClient;
|
local SClient RepClient, RepClientNew;
|
||||||
|
|
||||||
|
`callstack();
|
||||||
|
|
||||||
KFPC = KFPlayerController(C);
|
KFPC = KFPlayerController(C);
|
||||||
if (KFPC == None)
|
if (KFPC == None)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
RepClient.KFPC = KFPC;
|
RepClientNew.KFPC = KFPC;
|
||||||
RepClient.RepInfo = Spawn(class'ScoreboardExtRepInfo', KFPC);
|
RepClientNew.RepInfo = Spawn(class'ScoreboardExtRepInfo', KFPC);
|
||||||
RepClient.RepInfo.Mut = Self;
|
RepClientNew.RepInfo.Mut = Self;
|
||||||
RepClient.RepInfo.CustomRanks = class'CustomRanks'.default.Rank;
|
RepClientNew.RepInfo.CustomRanks = class'CustomRanks'.default.Rank;
|
||||||
RepClient.RepInfo.SteamGroupRelations = UIDRankRelationsSteamGroups;
|
RepClientNew.RepInfo.SteamGroupRelations = UIDRankRelationsSteamGroups;
|
||||||
RepClient.RepInfo.Settings = Settings;
|
RepClientNew.RepInfo.Settings = Settings;
|
||||||
RepClient.RepInfo.RankRelation.UID = KFPC.PlayerReplicationInfo.UniqueId;
|
RepClientNew.RepInfo.RankRelation.UID = KFPC.PlayerReplicationInfo.UniqueId;
|
||||||
RepClient.RepInfo.RankRelation.RankID = UIDRankRelationsPlayers.Find('UID', RepClient.RepInfo.RankRelation.UID);
|
RepClientNew.RepInfo.RankRelation.RankID = UIDRankRelationsPlayers.Find('UID', RepClientNew.RepInfo.RankRelation.UID);
|
||||||
|
|
||||||
UIDRankRelationsActive.AddItem(RepClient.RepInfo.RankRelation);
|
UIDRankRelationsActive.AddItem(RepClientNew.RepInfo.RankRelation);
|
||||||
|
|
||||||
RepClients.AddItem(RepClient);
|
RepClients.AddItem(RepClientNew);
|
||||||
|
|
||||||
// хуйня
|
foreach UIDRankRelationsActive(Relation) // For this player
|
||||||
foreach UIDRankRelationsActive(Relation)
|
RepClientNew.RepInfo.AddRankRelation(Relation);
|
||||||
foreach RepClients(RepClient)
|
|
||||||
RepClient.RepInfo.AddRankRelation(Relation);
|
|
||||||
|
|
||||||
RepClient.RepInfo.StartFirstTimeReplication();
|
RepClientNew.RepInfo.StartFirstTimeReplication();
|
||||||
|
|
||||||
|
foreach RepClients(RepClient) // For other players
|
||||||
|
RepClient.RepInfo.AddRankRelation(Relation);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function RemovePlayer(Controller C)
|
private function RemovePlayer(Controller C)
|
||||||
@ -196,6 +219,8 @@ private function RemovePlayer(Controller C)
|
|||||||
local KFPlayerController KFPC;
|
local KFPlayerController KFPC;
|
||||||
local int Index;
|
local int Index;
|
||||||
|
|
||||||
|
`callstack();
|
||||||
|
|
||||||
KFPC = KFPlayerController(C);
|
KFPC = KFPlayerController(C);
|
||||||
if (KFPC == None)
|
if (KFPC == None)
|
||||||
return;
|
return;
|
||||||
@ -232,6 +257,8 @@ public function UpdatePlayerRank(UIDRankRelation Rel)
|
|||||||
local SClient RepClient;
|
local SClient RepClient;
|
||||||
local int Index;
|
local int Index;
|
||||||
|
|
||||||
|
`callstack();
|
||||||
|
|
||||||
Index = UIDRankRelationsActive.Find('UID', Rel.UID);
|
Index = UIDRankRelationsActive.Find('UID', Rel.UID);
|
||||||
|
|
||||||
if (Index != INDEX_NONE)
|
if (Index != INDEX_NONE)
|
||||||
@ -244,6 +271,9 @@ public function UpdatePlayerRank(UIDRankRelation Rel)
|
|||||||
public function AddPlayerRank(UIDRankRelation Rel)
|
public function AddPlayerRank(UIDRankRelation Rel)
|
||||||
{
|
{
|
||||||
local SClient RepClient;
|
local SClient RepClient;
|
||||||
|
|
||||||
|
`callstack();
|
||||||
|
|
||||||
foreach RepClients(RepClient)
|
foreach RepClients(RepClient)
|
||||||
RepClient.RepInfo.AddRankRelation(Rel);
|
RepClient.RepInfo.AddRankRelation(Rel);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
class ScoreboardExtRepInfo extends ReplicationInfo;
|
class ScoreboardExtRepInfo extends ReplicationInfo;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
// Server vars
|
// Server vars
|
||||||
var public ScoreboardExtMut Mut;
|
var public ScoreboardExtMut Mut;
|
||||||
|
|
||||||
@ -17,6 +20,8 @@ var private int CustomRanksRepProgress, SteamGroupsRepProgress;
|
|||||||
|
|
||||||
simulated event PostBeginPlay()
|
simulated event PostBeginPlay()
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
super.PostBeginPlay();
|
super.PostBeginPlay();
|
||||||
|
|
||||||
if (bDeleteMe) return;
|
if (bDeleteMe) return;
|
||||||
@ -29,6 +34,8 @@ simulated event PostBeginPlay()
|
|||||||
|
|
||||||
private reliable client function ClientInit()
|
private reliable client function ClientInit()
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
if (SC == None)
|
if (SC == None)
|
||||||
SC = ScoreboardExtHUD(GetALocalPlayerController().myHUD).Scoreboard;
|
SC = ScoreboardExtHUD(GetALocalPlayerController().myHUD).Scoreboard;
|
||||||
|
|
||||||
@ -43,17 +50,23 @@ private reliable client function ClientInit()
|
|||||||
|
|
||||||
public function StartFirstTimeReplication()
|
public function StartFirstTimeReplication()
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
SetTimer(0.01f, true, nameof(ReplicateCustomRanks));
|
SetTimer(0.01f, true, nameof(ReplicateCustomRanks));
|
||||||
SetTimer(0.01f, true, nameof(ReplicateSteamGroupRelations));
|
SetTimer(0.01f, true, nameof(ReplicateSteamGroupRelations));
|
||||||
}
|
}
|
||||||
|
|
||||||
private reliable client function ClientSetSettings(SCESettings Set)
|
private reliable client function ClientSetSettings(SCESettings Set)
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
SC.Settings = Set;
|
SC.Settings = Set;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function ReplicateCustomRanks()
|
private function ReplicateCustomRanks()
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
if (CustomRanksRepProgress < CustomRanks.Length)
|
if (CustomRanksRepProgress < CustomRanks.Length)
|
||||||
{
|
{
|
||||||
ClientAddCustomRank(CustomRanks[CustomRanksRepProgress]);
|
ClientAddCustomRank(CustomRanks[CustomRanksRepProgress]);
|
||||||
@ -67,11 +80,15 @@ private function ReplicateCustomRanks()
|
|||||||
|
|
||||||
private reliable client function ClientAddCustomRank(RankInfo Rank)
|
private reliable client function ClientAddCustomRank(RankInfo Rank)
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
CustomRanks.AddItem(Rank);
|
CustomRanks.AddItem(Rank);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function ReplicateSteamGroupRelations()
|
private function ReplicateSteamGroupRelations()
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
if (SteamGroupsRepProgress < SteamGroupRelations.Length)
|
if (SteamGroupsRepProgress < SteamGroupRelations.Length)
|
||||||
{
|
{
|
||||||
ClientAddSteamGroupRelation(SteamGroupRelations[SteamGroupsRepProgress]);
|
ClientAddSteamGroupRelation(SteamGroupRelations[SteamGroupsRepProgress]);
|
||||||
@ -87,6 +104,8 @@ private function ReplicateSteamGroupRelations()
|
|||||||
|
|
||||||
private reliable client function ClientAddSteamGroupRelation(UIDRankRelation Rel)
|
private reliable client function ClientAddSteamGroupRelation(UIDRankRelation Rel)
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
SteamGroupRelations.AddItem(Rel);
|
SteamGroupRelations.AddItem(Rel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,6 +113,8 @@ private reliable client function FindMyRankInSteamGroups()
|
|||||||
{
|
{
|
||||||
local UIDRankRelation SteamGroupRel;
|
local UIDRankRelation SteamGroupRel;
|
||||||
|
|
||||||
|
`callstack();
|
||||||
|
|
||||||
foreach SteamGroupRelations(SteamGroupRel)
|
foreach SteamGroupRelations(SteamGroupRel)
|
||||||
if (SW.CheckPlayerGroup(SteamGroupRel.UID))
|
if (SW.CheckPlayerGroup(SteamGroupRel.UID))
|
||||||
RankRelation.RankID = SteamGroupRel.RankID;
|
RankRelation.RankID = SteamGroupRel.RankID;
|
||||||
@ -104,32 +125,44 @@ private reliable client function FindMyRankInSteamGroups()
|
|||||||
|
|
||||||
private reliable server function ServerApplyRank(int RankID)
|
private reliable server function ServerApplyRank(int RankID)
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
RankRelation.RankID = RankID;
|
RankRelation.RankID = RankID;
|
||||||
Mut.UpdatePlayerRank(RankRelation);
|
Mut.UpdatePlayerRank(RankRelation);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function AddRankRelation(UIDRankRelation Rel)
|
public function AddRankRelation(UIDRankRelation Rel)
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
ClientAddRankRelation(Rel);
|
ClientAddRankRelation(Rel);
|
||||||
}
|
}
|
||||||
|
|
||||||
private reliable client function ClientAddRankRelation(UIDRankRelation Rel)
|
private reliable client function ClientAddRankRelation(UIDRankRelation Rel)
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
SC.RankRelations.AddItem(Rel);
|
SC.RankRelations.AddItem(Rel);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function RemoveRankRelation(UIDRankRelation Rel)
|
public function RemoveRankRelation(UIDRankRelation Rel)
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
ClientRemoveRankRelation(Rel);
|
ClientRemoveRankRelation(Rel);
|
||||||
}
|
}
|
||||||
|
|
||||||
private unreliable client function ClientRemoveRankRelation(UIDRankRelation Rel)
|
private unreliable client function ClientRemoveRankRelation(UIDRankRelation Rel)
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
SC.RankRelations.RemoveItem(Rel);
|
SC.RankRelations.RemoveItem(Rel);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function UpdateRankRelation(UIDRankRelation Rel)
|
public function UpdateRankRelation(UIDRankRelation Rel)
|
||||||
{
|
{
|
||||||
|
`callstack();
|
||||||
|
|
||||||
ClientUpdateRankRelation(Rel);
|
ClientUpdateRankRelation(Rel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,6 +170,8 @@ private reliable client function ClientUpdateRankRelation(UIDRankRelation Rel)
|
|||||||
{
|
{
|
||||||
local int Index;
|
local int Index;
|
||||||
|
|
||||||
|
`callstack();
|
||||||
|
|
||||||
Index = SC.RankRelations.Find('UID', Rel.UID);
|
Index = SC.RankRelations.Find('UID', Rel.UID);
|
||||||
|
|
||||||
if (Index != INDEX_NONE)
|
if (Index != INDEX_NONE)
|
||||||
|
@ -2,6 +2,9 @@ class ScoreboardStyle extends Object
|
|||||||
dependson(Types)
|
dependson(Types)
|
||||||
config(ScoreboardExt);
|
config(ScoreboardExt);
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var config ColorRGBA ServerNameBoxColor;
|
var config ColorRGBA ServerNameBoxColor;
|
||||||
var config ColorRGBA ServerNameTextColor;
|
var config ColorRGBA ServerNameTextColor;
|
||||||
var config ColorRGBA GameInfoBoxColor;
|
var config ColorRGBA GameInfoBoxColor;
|
||||||
@ -42,9 +45,12 @@ var config ColorRGBA PingTextColorLow;
|
|||||||
var config ColorRGBA PingTextColorMid;
|
var config ColorRGBA PingTextColorMid;
|
||||||
var config ColorRGBA PingTextColorHigh;
|
var config ColorRGBA PingTextColorHigh;
|
||||||
|
|
||||||
public static function SCEStyle defaultSettings()
|
public static function SCEStyle DefaultSettings()
|
||||||
{
|
{
|
||||||
local SCEStyle Settings;
|
local SCEStyle Settings;
|
||||||
|
|
||||||
|
`callstack_static("DefaultSettings");
|
||||||
|
|
||||||
return Settings;
|
return Settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,6 +58,8 @@ public static function SCEStyle Settings()
|
|||||||
{
|
{
|
||||||
local SCEStyle Settings;
|
local SCEStyle Settings;
|
||||||
|
|
||||||
|
`callstack_static("Settings");
|
||||||
|
|
||||||
Settings.ServerNameBoxColor = default.ServerNameBoxColor;
|
Settings.ServerNameBoxColor = default.ServerNameBoxColor;
|
||||||
Settings.ServerNameTextColor = default.ServerNameTextColor;
|
Settings.ServerNameTextColor = default.ServerNameTextColor;
|
||||||
Settings.GameInfoBoxColor = default.GameInfoBoxColor;
|
Settings.GameInfoBoxColor = default.GameInfoBoxColor;
|
||||||
@ -97,6 +105,8 @@ public static function SCEStyle Settings()
|
|||||||
|
|
||||||
public static function WriteSettings(SCEStyle Settings)
|
public static function WriteSettings(SCEStyle Settings)
|
||||||
{
|
{
|
||||||
|
`callstack_static("WriteSettings");
|
||||||
|
|
||||||
default.ServerNameBoxColor = Settings.ServerNameBoxColor;
|
default.ServerNameBoxColor = Settings.ServerNameBoxColor;
|
||||||
default.ServerNameTextColor = Settings.ServerNameTextColor;
|
default.ServerNameTextColor = Settings.ServerNameTextColor;
|
||||||
default.GameInfoBoxColor = Settings.GameInfoBoxColor;
|
default.GameInfoBoxColor = Settings.GameInfoBoxColor;
|
||||||
|
@ -2,6 +2,9 @@ class SteamGroupRankRelations extends Object
|
|||||||
dependson(Types)
|
dependson(Types)
|
||||||
config(ScoreboardExt);
|
config(ScoreboardExt);
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var config array<RankRelation> Relation;
|
var config array<RankRelation> Relation;
|
||||||
|
|
||||||
DefaultProperties
|
DefaultProperties
|
||||||
|
@ -2,6 +2,9 @@ class SystemAdminRank extends Object
|
|||||||
dependson(Types)
|
dependson(Types)
|
||||||
config(ScoreboardExt);
|
config(ScoreboardExt);
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var config string Rank;
|
var config string Rank;
|
||||||
var config ColorRGBA TextColor;
|
var config ColorRGBA TextColor;
|
||||||
var config Fields ApplyColorToFields;
|
var config Fields ApplyColorToFields;
|
||||||
@ -9,6 +12,9 @@ var config Fields ApplyColorToFields;
|
|||||||
public static function SCESettingsAdmin DefaultSettings()
|
public static function SCESettingsAdmin DefaultSettings()
|
||||||
{
|
{
|
||||||
local SCESettingsAdmin Settings;
|
local SCESettingsAdmin Settings;
|
||||||
|
|
||||||
|
`callstack_static("DefaultSettings");
|
||||||
|
|
||||||
return Settings;
|
return Settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -16,6 +22,8 @@ public static function SCESettingsAdmin Settings()
|
|||||||
{
|
{
|
||||||
local SCESettingsAdmin Settings;
|
local SCESettingsAdmin Settings;
|
||||||
|
|
||||||
|
`callstack_static("Settings");
|
||||||
|
|
||||||
Settings.Rank = default.Rank;
|
Settings.Rank = default.Rank;
|
||||||
Settings.TextColor = default.TextColor;
|
Settings.TextColor = default.TextColor;
|
||||||
Settings.ApplyColorToFields = default.ApplyColorToFields;
|
Settings.ApplyColorToFields = default.ApplyColorToFields;
|
||||||
@ -25,6 +33,8 @@ public static function SCESettingsAdmin Settings()
|
|||||||
|
|
||||||
public static function WriteSettings(SCESettingsAdmin Settings)
|
public static function WriteSettings(SCESettingsAdmin Settings)
|
||||||
{
|
{
|
||||||
|
`callstack_static("WriteSettings");
|
||||||
|
|
||||||
default.Rank = Settings.Rank;
|
default.Rank = Settings.Rank;
|
||||||
default.TextColor = Settings.TextColor;
|
default.TextColor = Settings.TextColor;
|
||||||
default.ApplyColorToFields = Settings.ApplyColorToFields;
|
default.ApplyColorToFields = Settings.ApplyColorToFields;
|
||||||
|
@ -2,6 +2,9 @@ class SystemPlayerRank extends Object
|
|||||||
dependson(Types)
|
dependson(Types)
|
||||||
config(ScoreboardExt);
|
config(ScoreboardExt);
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
var config string Rank;
|
var config string Rank;
|
||||||
var config ColorRGBA TextColor;
|
var config ColorRGBA TextColor;
|
||||||
var config Fields ApplyColorToFields;
|
var config Fields ApplyColorToFields;
|
||||||
@ -9,6 +12,9 @@ var config Fields ApplyColorToFields;
|
|||||||
public static function SCESettingsPlayer DefaultSettings()
|
public static function SCESettingsPlayer DefaultSettings()
|
||||||
{
|
{
|
||||||
local SCESettingsPlayer Settings;
|
local SCESettingsPlayer Settings;
|
||||||
|
|
||||||
|
`callstack_static("abc");
|
||||||
|
|
||||||
return Settings;
|
return Settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -16,6 +22,8 @@ public static function SCESettingsPlayer Settings()
|
|||||||
{
|
{
|
||||||
local SCESettingsPlayer Settings;
|
local SCESettingsPlayer Settings;
|
||||||
|
|
||||||
|
`callstack_static("abc");
|
||||||
|
|
||||||
Settings.Rank = default.Rank;
|
Settings.Rank = default.Rank;
|
||||||
Settings.TextColor = default.TextColor;
|
Settings.TextColor = default.TextColor;
|
||||||
Settings.ApplyColorToFields = default.ApplyColorToFields;
|
Settings.ApplyColorToFields = default.ApplyColorToFields;
|
||||||
@ -25,6 +33,8 @@ public static function SCESettingsPlayer Settings()
|
|||||||
|
|
||||||
public static function WriteSettings(SCESettingsPlayer Settings)
|
public static function WriteSettings(SCESettingsPlayer Settings)
|
||||||
{
|
{
|
||||||
|
`callstack_static("abc");
|
||||||
|
|
||||||
default.Rank = Settings.Rank;
|
default.Rank = Settings.Rank;
|
||||||
default.TextColor = Settings.TextColor;
|
default.TextColor = Settings.TextColor;
|
||||||
default.ApplyColorToFields = Settings.ApplyColorToFields;
|
default.ApplyColorToFields = Settings.ApplyColorToFields;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
class Types extends Object;
|
class Types extends Object;
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
struct ColorRGBA
|
struct ColorRGBA
|
||||||
{
|
{
|
||||||
var byte R, G, B, A;
|
var byte R, G, B, A;
|
||||||
|
9
ScoreboardExt/Logger.uci
Normal file
9
ScoreboardExt/Logger.uci
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
`define scelog(text, cond) `log(`text, `cond, 'ScoreboardExt')
|
||||||
|
|
||||||
|
`define info(text) `scelog("[INFO]"@`text, true)
|
||||||
|
`define warning(text) `scelog("[WARNING]"@`text, true)
|
||||||
|
`define error(text) `scelog("[ERROR]"@`text, true)
|
||||||
|
|
||||||
|
`define debug(text, cond) `scelog("[DEBUG]"@`text, true)
|
||||||
|
`define callstack() `scelog("[CALLSTACK]"@`Location@"ROLE="$ROLE, `bEnableCallstack)
|
||||||
|
`define callstack_static(text) `scelog("[CALLSTACK]"@`text, `bEnableCallstack)
|
Loading…
Reference in New Issue
Block a user