Artenus 2D Framework
Artenus Reference
Used internally by the framework to handle bitmapped hit testing for touch buttons. It is highly recommended not to use this class directly, as it might interfere with the default rendering pipeline. The only member of this class that can be used from outside the framework is showMap(boolean).
public final class TouchMap

Constructor Summary

Modifier and TypeConstructor and Description
public TouchMap()

Method Summary

Modifier and TypeMethod and Description
public voiddispatch()
Called internally to dispatch all processed touch events to their corresponding buttons.
public voidonTouchEvent(TouchEvent event)
Called internally to queue touch events.
public voidprocess(RenderingContext context)
Called internally by the stage to render the touch map and process queued touch events.
public voidshowMap(boolean visible)
Shows or hides the touch map.
public static voidupdate(int fboWidth, int fboHeight)
Initializes the touch map and creates necessary resources.

Methods inherited from java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TouchMap
public  TouchMap()

Method Detail

dispatch
public void dispatch()
Called internally to dispatch all processed touch events to their corresponding buttons.
onTouchEvent
public void onTouchEvent(
    TouchEvent event
)
Called internally to queue touch events.
Parameters:
eventThe touch event to queue
process
public void process(
    RenderingContext context
)
Called internally by the stage to render the touch map and process queued touch events.
Parameters:
contextThe rendering context
showMap
public void showMap(
    boolean visible
)
Shows or hides the touch map. By default, Artenus shows the touch map on the corner of the screen when a debugger is attached. You can use this method to override this behavior. Note that the map is not displayed in the absence of a debugger session, even when running a debug build.
Parameters:
visibleA value indicating whether to show the touch map
update
public static void update(
    int fboWidth,
    int fboHeight
)
Initializes the touch map and creates necessary resources. If the touch map is already initialized, the old resources are freed first.
Parameters:
fboWidthThe logical width of the screen
fboHeightThe logical height of the screen