Beispiel #1
0
        public override void CreateScene()
        {
            //create our hikarimanager
            _HikariManager            = new HikariManager("..\\..\\Media\\gui");
            viewport.BackgroundColour = new ColourValue(200, 200, 200);

            //creation of a flash control, first we create an overlay, then we load a flash control onto it
            _FpsControl = _HikariManager.CreateFlashOverlay("Fps", viewport, 130, 91, RelativePosition.TopLeft, 0, 0);
            _FpsControl.Load("fps.swf");
            _FpsControl.SetTransparent(true);

            _ColorPickerControl = _HikariManager.CreateFlashOverlay("ColorPicker", viewport, 350, 400, RelativePosition.Center, 1, 0);
            _ColorPickerControl.Load("controls.swf");
            _ColorPickerControl.SetTransparent(true, true);

            //define delegate of csharp functions that we can call from flash
            _AsyncExitCallback    = this.OnExitClick;
            _AsyncOpacityCallback = this.OnOpacityChange;
            _AsyncColorCallback   = this.OnColorChange;
            //bind it to our flash control
            _ColorPickerControl.Bind("opacityChange", _AsyncOpacityCallback);
            _ColorPickerControl.Bind("colorChange", _AsyncColorCallback);
            _ColorPickerControl.Bind("exitClick", _AsyncExitCallback);
        }
Beispiel #2
0
        public override void CreateScene()
        {
            //create our hikarimanager
            _HikariManager = new HikariManager("..\\..\\Media\\gui");
            viewport.BackgroundColour = new ColourValue(200, 200, 200);

            //creation of a flash control, first we create an overlay, then we load a flash control onto it
            _FpsControl = _HikariManager.CreateFlashOverlay("Fps", viewport, 130, 91, RelativePosition.TopLeft, 0, 0);
            _FpsControl.Load("fps.swf");
            _FpsControl.SetTransparent(true);

            _ColorPickerControl = _HikariManager.CreateFlashOverlay("ColorPicker", viewport, 350, 400, RelativePosition.Center, 1, 0);
            _ColorPickerControl.Load("controls.swf");
            _ColorPickerControl.SetTransparent(true, true);

            //define delegate of csharp functions that we can call from flash
            _AsyncExitCallback = this.OnExitClick;
            _AsyncOpacityCallback = this.OnOpacityChange;
            _AsyncColorCallback = this.OnColorChange;
            //bind it to our flash control
            _ColorPickerControl.Bind("opacityChange", _AsyncOpacityCallback);
            _ColorPickerControl.Bind("colorChange", _AsyncColorCallback);
            _ColorPickerControl.Bind("exitClick", _AsyncExitCallback);
        }