private Meter trkMeter = null; // tracked object's bearing #endregion Fields #region Constructors public SubPanel(SubCam owner) : base() { // Store the camera ship for callbacks etc. this.owner = owner; // Create the backdrop and widgets widgetList.Add(new Widget("SubPanel", false, 1024, 768, 0, 0)); // top panel //widgetList.Add(new Widget("SubBot", true, 1024, 168, 0, 768 - 168)); // bottom panel (and radar) //widgetList.Add(new Widget("SubLeft", false, 128, 500, 0, 100)); // left panel //widgetList.Add(new Widget("SubRight", false, 50, 500, 1024 - 50, 100)); // right panel // Spotlight switch Switch switch1 = new Switch("toggleswitch", 48, 67, 860, 30, Keys.L); widgetList.Add(switch1); switch1.OnChange += new ChangeEventHandler(owner.Switch1Changed); // Depth meter depthMeter = new Meter("LabNeedle", 8, 48, 90, 58, (float)Math.PI * 0.75f, 4, 40, -4, 4, false); widgetList.Add(depthMeter); // Compass bearing hdgMeter = new Meter("CompassRose", 104, 104, 42, 646, (float)Math.PI, 52, 52, 0, 0, false); // no shadow; don't slew, or it'll spin when wrapping widgetList.Add(hdgMeter); // Bearing to tracked object trkMeter = new Meter("LabNeedle", 8, 48, 90, 674, (float)Math.PI, 4, 40, -4, 4, false); widgetList.Add(trkMeter); // Bearing to lab ship labMeter = new Meter("SmallNeedle", 8, 32, 90, 682, (float)Math.PI, 4, 25, -4, 4, false); widgetList.Add(labMeter); bouyancy = new Knob("KnobMedium", 64, 75, 950, 170, 32F, 32F, Keys.PageUp, Keys.PageDown, (float)(Math.PI * 0.5)); bouyancy.Value = 0.5f; bouyancy.OnChange += new ChangeEventHandler(bouyancy_OnChange); widgetList.Add(bouyancy); hatch = new SafetyButton("SafetySwitch", 80, 92, 940, 265, Keys.None, 0.3f); hatch.OnChange += new ChangeEventHandler(hatch_OnChange); widgetList.Add(hatch); // Set up the Display widget for the navigation display SetupNavDisplay(); }
/// <summary> /// Create the list of camera ships, once the Device has been set up /// </summary> public static void OnDeviceCreated() { // Create the organisms that will act as camera platforms cameraShip = new CameraShip[2]; // EXTEND THIS when more platforms are added cameraShip[0] = new SubCam(); cameraShip[1] = new Lab(); //cameraShip[2] = new SurveyCam(); SwitchCameraShip(0); // start with camera on the sub }
SubCam owner = null; // The camera ship that owns me #endregion Fields #region Constructors public SubPanel2(SubCam owner) : base() { // Store the camera ship for callbacks etc. this.owner = owner; }