Results 1 to 10 of 43

Thread: Luna Game Pascal

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Oh oh! To use the frames, you simple have to do this:

    Code:
    procedure TForm2.WebBrowser1NewWindow3(ASender: TObject; var ppDisp: IDispatch;
      var Cancel: WordBool; dwFlags: Cardinal; const bstrUrlContext,
      bstrUrl: WideString);
    var
      s: string;
    begin
      // cancel new window operation
      Cancel := True;
      WebBrowser1.Navigate(bstrURL, '', 'hmcontent');
    end;
    Just specify the frame name and it will "just work" without all the extra loading I was doing before.

    Code:
    begin  // remove any slashes from the front
      while (aURL <> '') and (aURL[1] = '/') do
        Delete(aURL, 1, 1);
      // remove any slashes from the back
      while (aURL <> '') and (aURL[Length(aURL)] = '/') do
        Delete(aURL, Length(aURL), 1);
    
    
      // check for index.html/
      if aURL.Contains('index.html/') then
      begin
        // remove from url
        aURL := aURL.Replace('index.html/', '');
      end;
    
    
      // if empty its the room else endpoint is a file
      if aURL.IsEmpty then
        aURL := 'index.html';
    
    
      // get mime type of file
      aMIMEType := FindMimeType(aURL);
    
    
      // load the file
      WriteOutFile(GenFilename(aURL));
    end;

    Now, on to javascript issues. Oh, I tried the emulation and some other stuff, not working so far. Grrrr!

  2. #2
    Could you provide sample of your help webpages you use. After searching my computer I have no webpages which would be utilizing Frames, so I can't see and diagnose problems you are facing. Therefore I can't actually help but only speculate of what might be wrong.

  3. #3
    Hi, yea sure. Thanks. This link!

  4. #4
    Just tested your help and it seems that there is a problem in FindMimeType function becouse it always returns empty string when it is checking Mime Type of Java Scripts (.js files). Consequently no Java Scripts are loaded properly. I guess.

  5. #5
    I'm getting 'text/plain' for everything except the image files. I just added this:

    Code:
    if TPath.GetExtension(aURL) = '.js' then
        aMIMEType := 'application/javascript';
    Still get those errors.

    Interestingly, if you do this: WebBrowser1.Navigate('file:///' + TPath.Combine(TPath.GetDirectoryName(ParamStr(0)), 'HTML\index.html')), it all works as expected. So the Twebbrowser component can execute the javascript, there is something missing here that we need to do when running it through the protocol handler.

    I've been goodling/bing'ing for hours, trying different things.... nothing so far. Sigh.

  6. #6
    Is it just me, or is this like the fourth time in the last decade or so this guy has released what amounts to essentially the same engine (GameEngine, PyroGine, Hadron, now Luna) aggressively marketed it for a short while, and then removed all download links from both the forums and his website and just disappeared? Very bizarre......

  7. #7
    So it seems...

    I'd be interested to try it out, I'm looking for a game engine for an isometric project.
    If you develop an idiot proof system, the nature develops better idiots.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •