34 lines
630 B
Ucode
Raw Normal View History

2017-10-19 21:00:49 -05:00
Class KFGUI_CheckBox extends KFGUI_EditControl;
var() Texture CheckMark,CheckDisabled,CheckIdle,CheckFocus,CheckClicked;
var() bool bForceUniform,bChecked;
function UpdateSizes()
{
Super.UpdateSizes();
2020-11-28 23:12:58 +03:00
if (bForceUniform)
2017-10-19 21:00:49 -05:00
XSize = (YSize*InputPos[3]) / InputPos[2];
}
function DrawMenu()
{
Owner.CurrentStyle.RenderCheckbox(Self);
}
2020-11-28 23:04:55 +03:00
function HandleMouseClick(bool bRight)
2017-10-19 21:00:49 -05:00
{
bChecked = !bChecked;
2020-11-28 23:12:58 +03:00
if (bChecked)
2017-10-19 21:00:49 -05:00
PlayMenuSound(MN_ClickCheckboxOn);
else PlayMenuSound(MN_ClickCheckboxOff);
OnCheckChange(Self);
}
2020-11-28 23:04:55 +03:00
Delegate OnCheckChange(KFGUI_CheckBox Sender);
2017-10-19 21:00:49 -05:00
defaultproperties
{
bForceUniform=true
LableWidth=0.85
2023-05-14 05:49:12 +03:00
}