Home > Delphi, JavaScript, Object Pascal, Smart Mobile Studio > Smart Mobile Studio does Oculus Rift VR

Smart Mobile Studio does Oculus Rift VR

February 16, 2015 Leave a comment Go to comments

Well this is going to be fun! My boss came into my office today and gave me a strange box, saying “you like stuff like this right? Take it home and enjoy”. So now I have my nerdy hands on the Oculus. So you can probably guess what I’ll be doing the next couple of weeks? Thats right, OpenGL with Smart Mobile Studio!

Oh look! Such a cool box!

Oh look! Such a cool box!


Looks like Darth Vader's "home" experience

Looks like Darth Vader’s “home” experience


  1. February 16, 2015 at 7:49 pm

    Hi. I’m using SmartMS to mimic Darth Vader iPhone-style fixed tab bar at the bottom of the screen that can be used to select different pages. https://www.packtpub.com/sites/default/files/Article-Images/5108os_abr1_5.png Let’s say I have 3 forms, each of these uses the same tab bar. Any idea how to resize tabbar at the bottom of the screen?

    procedure TApplication.ResizeTab;
    var T : Variant;
    T := Application.CurrentForm;

    if T.valid then begin
    TApplication(application).W3Toolbar1.Width := TApplication(application).W3Toolbar1.Width;
    TApplication(application).W3Toolbar1.Top := TApplication(application).CurrentForm.ClientHeight+46+63;
    Application.CurrentForm.ClientHeight – TApplication(application).W3Toolbar1.Height – TApplication(application).Header1.Height;

    procedure TForm1.Resize;
    var v : Variant;

    I’ve got some issues i can’t figure it out, for instance, the fixed bar tab is transparent when I ResizeTab is fired, if I resize the browser window, I got the tabbar working the way i want.

    • Jon Lennart Aasenden
      February 17, 2015 at 10:54 am

      Just call resize on Display->View, depending on where you have created the toolbar.
      There is also a layoutChildren method I seem to remember.
      Tip: CTRL + Click on the unit and investigate the code in the classes.

      The transparency issue is HTML in a nutshell. If no content is assigned to an element, then it renders as transparent.
      Best way to avoid this is:
      1. Assign a color to background
      2. Define something in innerHTML, e.g Self.innerHTML:=” “;

      If you use the QTX library, there is a method on the handle-helper you can use to execute code when the handle is inserted into the DOM and ready.
      FBar.Handle.ReadyExecute( procedure ()

  2. February 17, 2015 at 8:44 pm

    This worked perfectly. Thank you.

    Showing and hiding qtx.header/tab-bar in a application has been found really necessary at times, for instance, I need the Header/navigation bar to be shown when i push another view, in the login view, qtx.header should be hidden.

    The problem is:
    when you hides the header ( TApplication(application).Header.Visible := False;) it leaves behind a little black rectangle on the portion of screen it was.

    this can be solved with (Application.Display.layoutchildren;), but I’ve got another issue:

    for now on you are unable to display the header again.
    TApplication(application).Header.Visible := True; // the reader remains hidden.

    • Jon Lennart Aasenden
      February 18, 2015 at 3:50 am

      Call layout on tw3display

  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: