Ejemplo n.º 1
0
        private static DesktopFontFamilyLoader _fontFamilyLoader; //Must stay in memory

        public DesktopDevice()
        {
            FileSystem        = new DesktopFileSystem();
            Assemblies        = new DesktopAssemblies();
            _fontFamilyLoader = new DesktopFontFamilyLoader(getResourceLoader());
            GraphicsBackend   = new OpenGLBackend();
            BitmapLoader      = new DesktopBitmapLoader(GraphicsBackend);
            BrushLoader       = new DesktopBrushLoader();
            FontLoader        = new DesktopFontLoader(_fontFamilyLoader);
            ConfigFile        = new DesktopEngineConfigFile();
            KeyboardState     = new DesktopKeyboardState();
        }
Ejemplo n.º 2
0
		private static DesktopFontFamilyLoader _fontFamilyLoader; //Must stay in memory

		public static void Init()
		{                        
			OpenTK.Toolkit.Init();
			string currentDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location).Replace(".Desktop", "");
			Directory.CreateDirectory(currentDir);
			Environment.CurrentDirectory = currentDir;
			Hooks.EntryAssembly = Assembly.GetEntryAssembly();
			_fontFamilyLoader = new DesktopFontFamilyLoader(new ResourceLoader());

            Hooks.GraphicsBackend = new OpenGLBackend();
			Hooks.BitmapLoader = new DesktopBitmapLoader (Hooks.GraphicsBackend);
			Hooks.BrushLoader = new DesktopBrushLoader ();
			Hooks.FontLoader = new DesktopFontLoader (_fontFamilyLoader);
			Hooks.ConfigFile = new DesktopEngineConfigFile ();
			Hooks.FileSystem = new DesktopFileSystem ();
            Hooks.KeyboardState = new DesktopKeyboardState();

            Resolver.Override(resolver => resolver.Builder.RegisterType<DesktopGameWindowSize>().SingleInstance().As<IGameWindowSize>());
            Resolver.Override(resolver => resolver.Builder.RegisterType<AGSGameWindow>().SingleInstance().As<IGameWindow>());
            Resolver.Override(resolver => resolver.Builder.RegisterType<ALAudioBackend>().SingleInstance().As<IAudioBackend>());
        }
Ejemplo n.º 3
0
 public DesktopFontLoader(DesktopFontFamilyLoader familyLoader)
 {
     _familyLoader = familyLoader;
 }
Ejemplo n.º 4
0
		public DesktopFontLoader(DesktopFontFamilyLoader familyLoader)
		{
			_familyLoader = familyLoader;
		}