Anteworld - Outerra Game > JavaScript development
Message box
SteelRat:
Hi developers!
What am I doing wrong?
--- Code: ---<!DOCTYPE html>
<html>
<head>
<title>Template msg box</title>
<link type="text/css" rel="stylesheet" href="file:///www/css/outerra-theme.css">
<script type="text/javascript" src="file:///www/lib/ot.js"></script>
<script type="text/javascript">
outerra({
requires: [
'file:///www/lib/component/message-box/message-box.js'
],
body: function (ot, script) {
var msgBox = new ot.components.ext.MessageBox('msgBox', {
// public api
//afterAction: undefined, // function (buttonId) {
// public params
allowHtml: true,
title: 'Template msg box',
message: '<h4>Message Test</h4>',
buttons: 'CANCEL|NO|YES' // pipe separated button names e.g. 'CANCEL|NO|YES'
});
msgBox.render();
}
});
</script>
</head>
<body></body>
</html>
--- End code ---
if
--- Code: ---<link type="text/css" rel="stylesheet" href="file:///www/css/outerra-theme.css">
--- End code ---
https://onedrive.live.com/redir?resid=BA7B7E2655BF556D!1605&authkey=!ANTKdVg5FW0OUhU&v=3&ithint=photo%2cjpg
else if
--- Code: ---<link type="text/css" rel="stylesheet" href="file:///www/css/outerra.css">
--- End code ---
https://onedrive.live.com/redir?resid=BA7B7E2655BF556D!1606&authkey=!AP6qZPvTy2MbAQ4&v=3&ithint=photo%2cpng
PytonPago:
Wow, didnt know you can do your own windows ...
SteelRat:
--- Quote from: PytonPago on April 13, 2015, 11:40:49 am ---Wow, didnt know you can do your own windows ...
--- End quote ---
create folder in
--- Code: ---InstallPach\outerra\Anteworld\MyDesktops
--- End code ---
create file in folder
--- Code: ---myDesktop.html
--- End code ---
insert in file this
--- Code: ---<!DOCTYPE html>
<html>
<head>
<title>Template Desktop</title>
<link type="text/css" rel="stylesheet" href="file:///www/css/outerra-theme.css">
<script type="text/javascript" src="file:///www/lib/ot.js"></script>
<script type="text/javascript">
outerra({
requires: [
'file:///www/lib/component/desktopwindow.js'
],
body: function (ot, script) {
var win = new ot.components.DesktopWindow('win', {
title = "Template Desktop",
width: 500,
height: 500,
minWidth: 100,
minHeight: 100,
populateBody: function (body) {
body.add(new ot.components.Component('body'));
}
});
win.render();
}
});
</script>
</head>
<body class="window-body full-size">
<div cid="body">
BODY
</div>
</body>
</html>
--- End code ---
write in console
--- Code: ---var win = window.open("../MyDesktops/myDesktop.html"); close();
--- End code ---
press ENTER)
PytonPago:
That will be handy ... thanks !
Uriah:
Awesome work SteelRat! This is extremely helpful!!!
Think there is a way to call this from an aircraft/vehicle .js script?
Navigation
[0] Message Index
[#] Next page
Go to full version