Beispiel #1
0
 protected override Canvas CreateGwenControl(ControlBase parent)
 {
     _renderer = new DualityGwenRenderer();
     _gwenSkin = new TexturedSkin(_renderer, Skin.Path);
     _canvas   = new Canvas(_gwenSkin);
     return(_canvas);
 }
Beispiel #2
0
        public void Init(Renderer renderer, string textureName, Flood.GUI.Font defaultFont)
        {
            Renderer = renderer;

            var resMan  = FloodEngine.GetEngine().ResourceManager;
            var options = new ResourceLoadOptions {
                Name = textureName, AsynchronousLoad = false
            };
            var imageHandle = resMan.LoadResource <Image>(options);

            Skin   = new TexturedSkin(renderer, imageHandle, defaultFont);
            Canvas = new Canvas(Skin);

            Init();
        }