Пример #1
0
 public UiContext(FreelancerGame game)
 {
     RenderContext         = game.RenderContext;
     Data                  = new UiData(game);
     this.game             = game;
     game.Mouse.MouseDown += MouseOnMouseDown;
     game.Mouse.MouseUp   += MouseOnMouseUp;
     CommandBuffer         = new CommandBuffer();
 }
Пример #2
0
        public UiContext(FreelancerGame game, string file)
        {
            Renderer2D            = game.Renderer2D;
            RenderState           = game.RenderState;
            Data                  = new UiData(game);
            this.game             = game;
            game.Mouse.MouseDown += MouseOnMouseDown;
            game.Mouse.MouseUp   += MouseOnMouseUp;
            var w = Data.LoadXml(file);

            w.ApplyStylesheet(Data.Stylesheet);
            SetWidget(w);
        }
Пример #3
0
 public UiContext(UiData data)
 {
     Data = data;
 }