Easy Positioner (ssk.easyPositioner.*)

This module gives you the ability to add a basic editor to any game or app while you are working on it.

Once the 'easy positioner' is attached to an object you can:

Click on that object to select it,

Drag that object around the screen,

Move the object using the arrow keys,

Change the move scale for keys from sub-pixel to up to 10-pixels per key press, and

Snap objects together.

The tool also provides a small floating dialog that shows the current position of the selected object.

At the end of the day, the purpose of this tool is to allow you to, (in- game/app) modify the positions of elements, get the updated value, then quickly type that into your code. i.e. No more do you have to adjust in code, re-run, adjust again, re-run again, ....

ssk.easyPositioner.start()

Before you can use the Easy Positioner tool, you need to initialize/start it.

ssk.easyPositioner.start( )

ssk.easyPositioner.stop()

If you need to, you can stop the tool, but before using it again (say in another scene), you need to call start() again.

Note: I don't personally use this feature because I only ever run the tool while editing. It isn't meant to be embedded and available in a live app. However, you may want to enable it and use it on a device and this will let you stop it once started.

ssk.easyPositioner.stop( )

ssk.easyPositioner.attach()

Before you can interact with an object it must be 'attached' to the easyPositioner logic.

Snapping

To snap object A to object B, do the following:

Click on object A

Tap s key till you see the snaping style you want in the dialog-bubble.

Click on object B.

Keyboard Map

In addition to using the mouse to select and drag objects, you can use the keyboard to move the currently selected object, to snap objects, to change the move-by settings, and to undo the last snap or keyboard movement.

Note For Windows Users: Be sure you are simulating an android or custom device. The simulated iOS devices ignore keystrokes.