KF2-YetAnotherScoreboard/YAS/Classes/KFGUI_CheckBox.uc

30 lines
540 B
Ucode
Raw Permalink Normal View History

2022-09-03 17:26:40 +00:00
class KFGUI_CheckBox extends KFGUI_EditControl;
2021-06-12 20:11:37 +00:00
2021-06-13 02:54:35 +00:00
var() Texture CheckMark, CheckDisabled, CheckIdle, CheckFocus, CheckClicked;
var() bool bForceUniform, bChecked;
2020-01-10 13:14:11 +00:00
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 03:00:19 +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
}
2021-06-13 03:00:19 +00:00
Delegate OnCheckChange(KFGUI_CheckBox Sender);
2020-01-10 13:14:11 +00:00
defaultproperties
{
bForceUniform=true
LableWidth=0.85
}