Jump to content
Ed!

HTML & Javascript Dialogs

Recommended Posts

I have seen some threads touching the topic, but I did not find an answer/opinion I was looking for.
 
Since scripting for Arma has allowed us to do many glorious things with our missions (example: integrating with databases), I thought it would be great if we could start dynamically creating dialogs using HTML and Javascript.
Some other game engines already utilize this technology (although ARMA does too, but is very limited).
 
Imagine creating dialogs like this:

<html>
<head>
   <meta name="class" content="HTMLDialogName">
   <meta name="movingEnable" content="false">      
   <style>
      body{
          width:80%;
          height:80%;
          margin:auto;
          padding:1%;
          background:#CCC;
         }
       p{
         color:#A30;
         background#FFF;
         size: 10%;
        }
    </style>
    <script>
      function somefunction()
      {
          //somefancy visual stuff and then...
          execSQF("execVM somescript.sqf");
      }
    </script>
</head>
<body>
   <p>
      Some text
   </p>
   <button onclick="somefunction();">
      Click Me!
   </button>
</body>
</html>

And then you can call it like this

createDialog "HTMLDialogName"; 

Share this post


Link to post
Share on other sites

If you have a look inside some vanilla PBO files, like ui_f_data.pbo, you will already find some HTML files. In fact, there is a support for HTML files already in place as you can read up in the BIKI pages for HTML-Files and DialogControls-Text.

 

But I personally have not managed to include an HTML file as a dialog into one of my missions, because it's not as intuitive as I hoped.

Share this post


Link to post
Share on other sites

If you have a look inside some vanilla PBO files, like ui_f_data.pbo, you will already find some HTML files. In fact, there is a support for HTML files already in place as you can read up in the BIKI pages for HTML-Files and DialogControls-Text.

 

But I personally have not managed to include an HTML file as a dialog into one of my missions, because it's not as intuitive as I hoped.

Wouldn't it be great to create a complete functioning dialog based only on HTML documents?

Share this post


Link to post
Share on other sites

Wouldn't it be great to create a complete functioning dialog based only on HTML documents?

 

Indeed, I'd really love that.

 

The thing is, when it comes to CSS, there's certain things that would have to be ommitted, because they can't be handled by the "dialog engine" (if that's even the right way to say it), like for instance "tranksform" or tilting objects.

 

Or there's gotta be a BI-custom css-free and "style"-tag-free way to style HTML dialogs for ArmA.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×