예제 #1
0
        /** Initialize Display Module elements */
        static void InitDisplayModule()
        {
            _leftY  = new VerticalGauge(_DisplayModule, 5, 5, 30, 10, DisplayModule.Color.Cyan, DisplayModule.Color.Blue);
            _rightY = new VerticalGauge(_DisplayModule, 135, 5, 30, 10, DisplayModule.Color.Yellow, DisplayModule.Color.Red);


            _leftX  = new HorizGauge(_DisplayModule, 35, 30, 10, 30, DisplayModule.Color.Green, DisplayModule.Color.Magenta);
            _rightX = new HorizGauge(_DisplayModule, 85, 30, 10, 30, DisplayModule.Color.Blue, DisplayModule.Color.Orange);

            _leftCrossHair = _DisplayModule.AddResourceImageSprite(
                Hero_DisplayBoard.Properties.Resources.ResourceManager,
                Hero_DisplayBoard.Properties.Resources.BinaryResources.ch2,
                Bitmap.BitmapImageType.Jpeg,
                30, 100);

            _rightCrossHair = _DisplayModule.AddResourceImageSprite(
                Hero_DisplayBoard.Properties.Resources.ResourceManager,
                Hero_DisplayBoard.Properties.Resources.BinaryResources.ch2,
                Bitmap.BitmapImageType.Jpeg,
                100, 100);

            _labelTitle = _DisplayModule.AddLabelSprite(_bigFont, DisplayModule.Color.White, 40, 0, 80, 16);

            _labelRow1 = _DisplayModule.AddLabelSprite(_smallFont, DisplayModule.Color.White, 30, 46, 100, 15);
            _labelRow2 = _DisplayModule.AddLabelSprite(_smallFont, DisplayModule.Color.White, 30, 58, 100, 15);
            _labelRow3 = _DisplayModule.AddLabelSprite(_smallFont, DisplayModule.Color.White, 30, 70, 100, 15);
        }
예제 #2
0
 /* Change Position of Horizontal Gauge */
 static public void UpdateGauge(HorizGauge gauge, float axis)
 {
     axis       += 1.0f; // [0,2]
     axis       *= 0.5f; // [0,1]
     gauge.Value = (int)(axis * gauge.MaxValue);
 }