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)
|
|
|
|
|
|
|
|
|
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()
|
|
|
|
{
|
2021-05-16 09:40:02 +00:00
|
|
|
Super.UpdateSizes();
|
2021-06-13 02:53:33 +00:00
|
|
|
if (bForceUniform)
|
2021-05-16 09:40:02 +00:00
|
|
|
XSize = (YSize*InputPos[3]) / InputPos[2];
|
2020-01-10 13:14:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function DrawMenu()
|
|
|
|
{
|
2021-05-16 09:40:02 +00:00
|
|
|
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
|
|
|
{
|
2021-05-16 09:40:02 +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
|
|
|
|
{
|
2021-05-16 09:40:02 +00:00
|
|
|
bForceUniform=true
|
|
|
|
LableWidth=0.85
|
2020-01-10 13:14:11 +00:00
|
|
|
}
|