Exemplo n.º 1
0
 public static void AttachWindow(AwesomiumUI UiManager, UiWindow window)
 {
     var html = window.Html;
     var statement = "$('#wrapper').append('" + html + "');";
     UiManager.CallJavascript(statement);
     window.UiManager = UiManager;
     window.InjectJavascript();
 }
Exemplo n.º 2
0
        public override void Initialize()
        {
            _cursorTexture  = ContentManager.GetTexture(@"Sprites\cursor", ServiceManager.GraphicsDevice);
            _cursorPosition = Vector2.Zero;

            var executionPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName);

            _awesomiumUi = new AwesomiumUI();
            var width  = ServiceManager.GraphicsDevice.PresentationParameters.BackBufferWidth;
            var height = ServiceManager.GraphicsDevice.PresentationParameters.BackBufferHeight;

            _awesomiumUi.Initialize(ServiceManager.GraphicsDevice, width, height, executionPath);

            _awesomiumUi.Load(@"Content\UI\index.html");
            _awesomiumUi.OnLoadCompleted     = OnLoadCompleted;
            _awesomiumUi.OnDocumentCompleted = OnDocumentCompleted;
        }