// // CPT operator / SondeerGame // This source file is (c) by Deltares. // - October 2014 // /// A checkbox extended with a value property and a (clickable) label. class GeoLabeledCheckBox extends moCheckBox; #exec OBJ LOAD FILE=GeoGUIContent.utx var string value; function InitComponent(GUIController MyController, GUIComponent MyOwner) { Super.Initcomponent(MyController, MyOwner); MyCheckBox.Style = Controller.GetStyle("GeoCheckBox"); MyCheckBox.Graphic = Material'GeoGUIContent.Icons.checkmark_selected'; MyLabel.bAcceptsInput = true; Checked(false); } function string getValue() { return self.value; } function string setValue(string val) { self.value = val; return self.value; } function setCaption(string cap) { MyLabel.Caption = " "$cap; } defaultproperties { WinWidth=0.3 WinHeight=0.04 ComponentJustification=TXTA_Left LabelJustification=TXTA_Right LabelFont="GeoSmallFont" bHeightFromComponent=false CaptionWidth=0.9 RenderWeight=1 bFlipped=true bSquare=true }