com.annahid.libs.artenus.input
TouchMap
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 Type | Constructor and Description |
---|---|
public | TouchMap() |
Method Summary
Modifier and Type | Method and Description |
---|---|
public void | dispatch() Called internally to dispatch all processed touch events to their corresponding buttons. |
public void | onTouchEvent(TouchEvent event) Called internally to queue touch events. |
public void | process(RenderingContext context) Called internally by the stage to render the touch map and process queued touch events. |
public void | showMap(boolean visible) Shows or hides the touch map. |
public static void | update(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
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:
|
process | ||
---|---|---|
public void process( RenderingContext context ) Called internally by the stage to render the touch map and process queued touch events. Parameters:
|
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:
|
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:
|