34 lines
583 B
Ucode
Raw Normal View History

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