Exemplo n.º 1
0
        public void OpenModal(string name, string modalData, Action <string> onClose)
        {
            var item = Data.LoadXml(name);

            item.EnableScripting(this, modalData);
            modals.Push(new ModalState()
            {
                Widget = item, OnClose = onClose
            });
        }
Exemplo n.º 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);
        }