KF2-Server-Extension/ServerExt/Classes/KFGUI_CheckBox.uc

33 lines
629 B
Ucode
Raw Normal View History

2017-10-20 02:00:49 +00: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 20:12:58 +00:00
if (bForceUniform)
2017-10-20 02:00:49 +00:00
XSize = (YSize*InputPos[3]) / InputPos[2];
}
function DrawMenu()
{
Owner.CurrentStyle.RenderCheckbox(Self);
}
2020-11-28 20:04:55 +00:00
function HandleMouseClick(bool bRight)
2017-10-20 02:00:49 +00:00
{
bChecked = !bChecked;
2020-11-28 20:12:58 +00:00
if (bChecked)
2017-10-20 02:00:49 +00:00
PlayMenuSound(MN_ClickCheckboxOn);
else PlayMenuSound(MN_ClickCheckboxOff);
OnCheckChange(Self);
}
2020-11-28 20:04:55 +00:00
Delegate OnCheckChange(KFGUI_CheckBox Sender);
2017-10-20 02:00:49 +00:00
defaultproperties
{
bForceUniform=true
LableWidth=0.85
}