intfiction.org

The Interactive Fiction Community Forum
It is currently Sat Nov 18, 2017 12:40 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Sep 12, 2017 10:27 pm 
Offline

Joined: Sat Feb 25, 2017 8:10 pm
Posts: 10
Hi,
I'm trying to add an on-screen map to my game. It would just be a .jpg of the floor plan of the building in which the game takes place. It would be really nice if this would pop-up in a separate window, so that the player could open/close/scroll/zoom as necessary.

However, I'm really stuck trying to get a second browser window to open in TADS 3. To be clear, I don't want the map in an iFrame in the main window, but a completely separate browser window, opened with a typed command such as 'map'.

Is there a simple way to do this?

I've tried to figure it out from the code, and got about as far as this:

Code:
DefineIAction(Map)
execAction()
{
    "<???>";
}

;

VerbRule(Map)
'map'
:MapAction
verbPhrase = ''
   
;
 
mapWindow: WebResource, WebWindow
   
    vpath = '/labMap.htm'
    src = 'webuires/labMap.htm'
   
;


Which is to say, not very far - I think I need to create a new webwindow, which links to the resource, although there are probably some other parameters I need to define, which I don't really understand from looking at the code - but then, I have no idea how to actually get that page to open, or even if it can be done without dozens of lines of code.

Of course, if there is some alternative method (e.g. using Javascript?) that would be just great as well.

Any suggestions much appreciated!

Otto


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Sep 12, 2017 10:39 pm 
Offline

Joined: Sat Feb 25, 2017 8:10 pm
Posts: 10
Sorry, should probably mention this is for WebUI, andI'm currently using Workbench on Windows 10.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Sep 13, 2017 10:44 am 
Offline
User avatar

Joined: Tue Apr 20, 2010 2:48 pm
Posts: 963
Location: Greece
AFAIK, you need to do this through Javascript. There is no API in TADS for creating windows.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group