Beispiel #1
0
        //Constructor for button-specific initialization
        //Especially button construction
        public AirGauge()
        {
            GaugeButton eastas = new GaugeButton();

            eastas.active       = true;
            eastas.permPosition = new Rect(91f, 198f, 49f, 49f);
            eastas.onTexture    = new Rect(0.7036f, 0.4263f, 0.0613f, 0.0602f);
            eastas.offTexture   = new Rect(0.6350f, 0.4263f, 0.0613f, 0.0602f);
            buttons             = new GaugeButton[1];
            buttons[0]          = eastas;
            _first = true;   //Testing for first run, should load saved EAS/TAS selection
        }
        //Gauge specific initialization, especially buttons
        public RadarAltimeter()
        {
            //Scale = 0.5f;
            //last5 = new long[5];
            GaugeButton b = new GaugeButton();

            b.active       = false;
            b.permPosition = new Rect(124f, 243f, 60f, 47f);
            b.offTexture   = new Rect(0.5275f, 0.4265f, 0.075f, 0.0576f); //Off toggle
            b.onTexture    = new Rect(0.5275f, 0.3738f, 0.075f, 0.0576f); //On toggle
            buttons        = new GaugeButton[2];
            buttons[0]     = b;
            b              = new GaugeButton();
            b.active       = false;
            b.permPosition = new Rect(216f, 243f, 60f, 47f);
            b.offTexture   = new Rect(0.5275f, 0.3211f, 0.075f, 0.0576f); //Off toggle
            b.onTexture    = new Rect(0.5275f, 0.2696f, 0.075f, 0.0576f); //On toggle
            buttons[1]     = b;
            first          = true;                                        //On first run, set buttons to saved configuration
            ra             = 5500;
            useDrawButtons = false;                                       //Let me draw my own buttons!
        }