예제 #1
0
파일: TestScreen.cs 프로젝트: Lebby/Develia
        public TestScreen()
        {
            try
            {
                Font1 = Game.Content.Load<SpriteFont>("Arial");
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine(e.StackTrace);
            }

            heightLabel = new TextWidget(Font1, Engine.Instance.Game.GraphicsDevice.DisplayMode.Height.ToString());
            widthLabel = new TextWidget(Font1, Engine.Instance.Game.GraphicsDevice.DisplayMode.Width.ToString());
            fadeLabel = new TextWidget(Font1, tmpFade.ToString());
            focusLabel = new TextWidget(Font1, "Load : " + load.ToString() + " Unload : " + unload.ToString());
            mousePosition = new TextWidget(Font1, "");
            cursor = new DeveliaCursor();

            heightLabel.Position = new Vector2(0, 250);
            widthLabel.Position = new Vector2(0, 300);
            fadeLabel.Position = new Vector2(0, 100);
            focusLabel.Position = new Vector2(0, 150);
            mousePosition.Position = new Vector2(0, 200);

            addComponent(heightLabel);
            addComponent(widthLabel);
            addComponent(fadeLabel);
            addComponent(focusLabel);
            addComponent(mousePosition);
            addComponent(cursor);
        }
예제 #2
0
파일: Button.cs 프로젝트: Lebby/Develia
        public Button()
        {
            SpriteFont font = Engine.Instance.Game.Content.Load<SpriteFont>("Arial");
            _image          = new Object2D();

            _text           = new TextWidget(font);
            _text.Text      = "";

            _image.DrawOrder= DrawOrder + 1;
            _text.DrawOrder = DrawOrder + 2;

            addComponent(_image);
            addComponent(_text);
        }