public class GameViewWrapper extends ViewWrapper<GameViewWrapper.MyPanel> {
@Override
@Hide
public void innerInitialize(final BA ba, final String eventName, boolean keepOldObject) {
if (!keepOldObject) setObject(new MyPanel(ba.context));
super.innerInitialize(ba, eventName, true);
// The _Touch() sub
if (ba.subExists(eventName + "_touch")) {
getObject().setOnTouchListener(new View.OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
ba.raiseEventFromUI(getObject(), eventName + "_touch",
event.getAction(), event.getX(), event.getY());
return true;
}
});
}
}
/**
* Sets or gets the Virtual Width.
*/
public static int VirtualWidth; **SEE CODE BELOW**
/**
* Sets or gets the Virtual Height.
*/
public static int VirtualHeight;
.... SNIP ....