Home > Delphi, OP4JS, Smart Mobile Studio > QTXLibrary on google code

QTXLibrary on google code

Quartex is 4ever

Quartex is 4ever

To make things easier in the future I decided to push all my Smart Pascal examples into one basket and upload them to Google Code. That way people don’t have to copy & paste from this website, but rather just update their SVN repo folder.

Point your SVN client at: https://code.google.com/p/qtxlibrary/

Only human

I must however stress that these units should be considered “examples”. This blog is more about experimentation, research and education than it is anything else. I do not provide any form of support. I work full-time as a professional software developer, so there is quite frankly not enough time for large-scale hobby projects.

For new features and ideas around Smart Pascal, send an email to the Smart Mobile Studio team. It will be registered in the system and receive a proper ticket.

Ayways, do a checkout of the google repository – remember to check out to the Smart Mobile Studio Libraries folder – and have a peek 🙂

What can it do?

All sorts of cool stuff! You have the in-memory dataset class, which is very handy. And the latest additions are the effect helpers. Smart Mobile Studio RTL contains a lot of cool stuff – but for beginners it may be hard to get to grips with all the new terminology. If you are serious about y0ur HTML5 coding, you should get a book and learn some JS. It makes all the difference.

So how are the effect helpers useful? Well, for instance, to make buttons that “grow” when you move your mouse hovers over them, you would write this:

  W3Button1.OnMouseEnter:=Procedure (sender:TObject; Shift: TShiftState; X, Y: Integer)
  Begin
    //grow the button by 4x4 pixels in 0.2 seconds
    w3Button1.fxScaleUp(4,0.2);
  end;

  w3button1.OnMouseExit:=procedure (sender:TObject; Shift: TShiftState; X, Y: Integer)
  Begin
    // Shrink button back to original size
    w3Button1.fxScaleDown(4,0.2);
  end;

Effect stack

What I have been playing with lately (thought only for now) is an effect stack. Basically a “mini” effect language that you can use to script effect chains inside your SMS application.

For instance, a script could look like:

var script:String := #"fadeout(0);
  fadeIn(0.6);
  moveTo(100,100);
  rotate(-30,-60,-70);
  scale(200,200);
  Scew3d(-90,-90-36);
  warpOut(0.9);";
FStack.push(script,w3button1);
FStack.execute(esImmediate);

Reminds me a bit about the old Amos Basic “sprite language” that we used in the 90’s for writing shoot’em up enemies for games and demos.

Advertisements
  1. abouchez
    August 15, 2014 at 1:18 pm

    Good idea.
    Too much code in a blog is killing the blog. 🙂
    Just the main part, then an external public repository is just perfect!

    • abouchez
      August 15, 2014 at 1:20 pm

      BTW, what is the license of this code set?
      IMHO you should explicitly release it under MPL / GPL / LGPL (at least in the project ReadMe) so that we could use it easily.

      • Jon Lennart Aasenden
        August 15, 2014 at 1:32 pm

        It’s free to use, but the origin must be explicitly retained (e.g, if you alter the code you must provide the update to the repo, and also retain the header in your product)

  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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: