Use 'TouchMouse' instead of old KegsTouch name.

This commit is contained in:
James Sanford 2013-07-26 17:44:55 -07:00
parent 2726b3f2c7
commit cddd41ca6c
2 changed files with 7 additions and 7 deletions

View File

@ -43,8 +43,8 @@ public class KegsMain extends SherlockFragmentActivity implements KegsKeyboard.S
private KegsThread mKegsThread;
protected KegsViewGL mKegsView;
private KegsTouch mKegsTouch;
private KegsKeyboard mKegsKeyboard;
private TouchMouse mTouchMouse;
private TouchJoystick mJoystick;
private boolean mModeMouse = true;
@ -392,7 +392,7 @@ public class KegsMain extends SherlockFragmentActivity implements KegsKeyboard.S
mKegsView.updateScreenSize(bitmapSize);
// Update scale of mouse movements.
mKegsTouch.updateScale(bitmapSize.getScaleX(), bitmapSize.getScaleY());
mTouchMouse.updateScale(bitmapSize.getScaleX(), bitmapSize.getScaleY());
// Update special click zone that toggles the ActionBar.
final TouchSpecialZone zone = new TouchSpecialZone(getSpecialActionBarRect(bitmapSize)) {
@ -401,7 +401,7 @@ public class KegsMain extends SherlockFragmentActivity implements KegsKeyboard.S
updateActionBar(mOverrideActionBar);
}
};
mKegsTouch.setSpecialZone(zone);
mTouchMouse.setSpecialZone(zone);
mJoystick.setSpecialZone(zone);
// Force another redraw of the bitmap into the canvas. Bug workaround.
@ -535,7 +535,7 @@ public class KegsMain extends SherlockFragmentActivity implements KegsKeyboard.S
mKegsView.getBitmap());
mKegsThread.registerUpdateScreenInterface(mKegsView);
mKegsTouch = new KegsTouch(this, getThread().getEventQueue());
mTouchMouse = new TouchMouse(this, getThread().getEventQueue());
mJoystick = new TouchJoystick(getThread().getEventQueue());
final SpecialRelativeLayout mainView = (SpecialRelativeLayout)findViewById(R.id.mainview);
@ -545,7 +545,7 @@ public class KegsMain extends SherlockFragmentActivity implements KegsKeyboard.S
public boolean onTouch(View v, MotionEvent event) {
// TODO: consider using two listeners and setOnTouchListener them
if (mModeMouse) {
return mKegsTouch.onTouchEvent(event);
return mTouchMouse.onTouchEvent(event);
} else {
return mJoystick.onTouchEvent(event);
}

View File

@ -11,7 +11,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
// Translate onTouchEvent calls into mouse pointer movement.
class KegsTouch {
class TouchMouse {
private ConcurrentLinkedQueue mEventQueue;
private int mButton1 = 0;
private int mTouchSlopSquare;
@ -37,7 +37,7 @@ class KegsTouch {
private TouchSpecialZone mSpecialZone = null;
public KegsTouch(Context context, ConcurrentLinkedQueue q) {
public TouchMouse(Context context, ConcurrentLinkedQueue q) {
mEventQueue = q;
final ViewConfiguration configuration = ViewConfiguration.get(context);