KF2-YetAnotherScoreboard/ScoreboardExt/Classes/KFGUI_CheckBox.uc

34 lines
581 B
Ucode
Raw Normal View History

2020-01-10 13:14:11 +00:00
Class KFGUI_CheckBox extends KFGUI_EditControl;
2021-06-12 20:11:37 +00:00
`include(Build.uci)
`include(Logger.uci)
2020-01-10 13:14:11 +00:00
var() Texture CheckMark,CheckDisabled,CheckIdle,CheckFocus,CheckClicked;
var() bool bForceUniform,bChecked;
function UpdateSizes()
{
Super.UpdateSizes();
2021-06-13 02:53:33 +00:00
if (bForceUniform)
XSize = (YSize*InputPos[3]) / InputPos[2];
2020-01-10 13:14:11 +00:00
}
function DrawMenu()
{
Owner.CurrentStyle.RenderCheckbox(Self);
2020-01-10 13:14:11 +00:00
}
2021-06-13 02:53:33 +00:00
function HandleMouseClick( bool bRight)
2020-01-10 13:14:11 +00:00
{
bChecked = !bChecked;
OnCheckChange(Self);
2020-01-10 13:14:11 +00:00
}
Delegate OnCheckChange( KFGUI_CheckBox Sender );
defaultproperties
{
bForceUniform=true
LableWidth=0.85
2020-01-10 13:14:11 +00:00
}