Ejemplo n.º 1
0
        public void preload(IContentProvider content)
        {
            fonts = new FontProvider();
            fonts.Add("sans", FontLoader.Load(content, "AgateLib/AgateSans"));

            this.palogo = content.Load <Texture2D>("imgs/palogo");
            this.vtlogo = content.Load <Texture2D>("imgs/vtlogo");
        }
Ejemplo n.º 2
0
        public LabelTest()
        {
            fontCore = new FakeFontCore("default");
            font     = new Font(fontCore);

            fontProvider = new FontProvider();
            fontProvider.Add("default", font);

            contentLayout = new ContentLayoutEngine(fontProvider);

            context = CommonMocks.RenderContext(contentLayout);
        }
        public LabelWithLocalizationTest()
        {
            fontCore = new FakeFontCore("default");
            font     = new Font(fontCore);

            fontProvider = new FontProvider();
            fontProvider.Add("default", font);

            textRepo = new TextRepository();

            contentLayout = new LocalizedContentLayoutEngine(
                new ContentLayoutEngine(fontProvider), textRepo);

            context = CommonMocks.RenderContext(contentLayout);
        }
Ejemplo n.º 4
0
        public App(GraphicsDevice graphics, GameWindow window, IContentProvider content)
        {
            this.graphics = graphics;
            this.content  = content;

            background = content.Load <Texture2D>("background");
            white      = content.Load <Texture2D>("white");
            cursor     = content.Load <Texture2D>("cross");

            fonts     = new FontProvider();
            font      = Font.Load(content, "AgateLib/AgateSans");
            font.Size = 14;

            fonts.Add("AgateSans", font);

            spriteBatch = new SpriteBatch(graphics);

            mouse    = new MouseEvents(graphics, window);
            keyboard = new KeyboardEvents();

            mouse.MouseDown  += Mouse_MouseDown;
            mouse.MouseMove  += Mouse_MouseMove;
            keyboard.KeyDown += Keyboard_KeyDown;
        }