Moderator: Forum Guards
***************************************************
Toggle Checkbox
***************************************************
var MenuUICheckboxWindow checkboxVariableReference;
// ----------------------------------------------------------------------
// CreateControls()
// ----------------------------------------------------------------------
function CreateControls()
{
Super.CreateControls();
CreateConfirmCheckbox();
}
// ----------------------------------------------------------------------
// CreateConfirmCheckbox()
// ----------------------------------------------------------------------
function CreateConfirmCheckbox()
{
checkboxVariableReference = MenuUICheckboxWindow(winClient.NewChild(Class'MenuUICheckboxWindow')); //This is the actual GUI element
checkboxVariableReference.SetPos(*x position*, *y position*); //Positioning
checkboxVariableReference.SetText(*Text to display regarding this checkbox*);
checkboxVariableReference.SetFont(Font'*Name of font*');
checkboxVariableReference.SetToggle(*bool we are toggling*);
}
// ----------------------------------------------------------------------
// ToggleChanged()
// ----------------------------------------------------------------------
event bool ToggleChanged(Window button, bool bNewToggle)
{
if (button == checkboxVariableReference)
{
*bool we are toggling* = bNewToggle;
return True;
}
else
{
return False;
}
}