// Path: src/com/whiterabbit/checkers/Constants.java
// public class Constants {
//  
//     public static final int BALL_SIZE = 64;
//     public static final int BALL_DISTANCE = BALL_SIZE + BALL_SIZE / 10;
// 
//     public static final int BACKGROUND_LAYER = 0;
//     public static final int HOLE_LAYER = 1;
//     public static final int BALL_LAYER = 2;
//     public static final int SCORE_LAYER = 3;
//     public static final int LAYER_COUNT = 4;
// 
//     public static final int CAMERA_WIDTH = 480;
//     public static final int ADMOB_HEIGHT = 40;
//     
//     
//     public static final String BOARD_NAME_INTENT = "com.checkers.BOARD_NAME";
//     public static final String BOARD_RESTORE_INTENT = "com.checkers.BOARD_RESTORE";
//     
//     public static int getHeight(int width, BaseGameActivity g){
//     	return 720;
//     	/*
//         DisplayMetrics dm = new DisplayMetrics();       
//     
//         g.getWindowManager().getDefaultDisplay().getMetrics(dm);         
//         return width * dm.heightPixels/dm.widthPixels;*/
//     }
//     
//     
//     
//     public static int getOffset(int width, BaseGameActivity g){
//         DisplayMetrics dm = new DisplayMetrics();       
//         
//         g.getWindowManager().getDefaultDisplay().getMetrics(dm);         
//         return width * ADMOB_HEIGHT /dm.widthPixels;
//     }
// }
// 
// Path: src/com/whiterabbit/checkers/util/Utils.java
// public class Utils {
// 	public static final void vibrate(Launcher launcher, int effect, Context c){
// 		SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(c);
// 		if(prefs.getBoolean("PREF_CHECK_BOX_VIBRATION", true)){
// 			try{
// 				launcher.play(Launcher.IMPACT_METAL_66);
// 			}catch(Exception e){
// 				
// 			}
// 		}
// 	}
// 	
// 	public static final void playButtonPressed(Launcher launcher, Context c){
// 		vibrate(launcher, Launcher.SHARP_CLICK_33, c);
// 	}
// 
// }


import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import com.bugsense.trace.BugSenseHandler;
import com.immersion.uhl.Launcher;
import com.whiterabbit.checkers.Constants;
import com.whiterabbit.checkers.R;
import com.whiterabbit.checkers.util.Utils;
import org.andengine.engine.camera.Camera;
import org.andengine.engine.options.EngineOptions;
import org.andengine.engine.options.ScreenOrientation;
import org.andengine.engine.options.resolutionpolicy.RatioResolutionPolicy;
import org.andengine.entity.Entity;
import org.andengine.entity.scene.Scene;
import org.andengine.entity.sprite.Sprite;
import org.andengine.input.touch.TouchEvent;
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlas;
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory;
import org.andengine.opengl.texture.region.ITextureRegion;
import org.andengine.ui.activity.BaseGameActivity;

package com.whiterabbit.checkers.ui;



public class CheckersMainMenu extends BaseGameActivity {
	// ===========================================================
	// Constants
	// ===========================================================



	protected static final int MENU_OK = 0;
	protected static final int MENU_QUIT = MENU_OK + 1;
	static final int MENU_OPTIONS = Menu.FIRST;

	// ===========================================================
	// Fields
	// ===========================================================

	protected Camera mCamera;

	protected Scene mMainScene;
	private BitmapTextureAtlas mPlayTexture;
	protected ITextureRegion mPlayTextureRegion;

	protected ITextureRegion mBackgroundTextureRegion;
	protected BitmapTextureAtlas mBackgroundTexture;
	private Launcher mHapticsLauncher;
	
	// ===========================================================
	// Constructors
	// ===========================================================

	// ===========================================================
	// Getter & Setter
	// ===========================================================

	// ===========================================================
	// Methods for/from SuperClass/Interfaces
	// ===========================================================


    @Override
    public EngineOptions onCreateEngineOptions() {
        int width = Constants.CAMERA_WIDTH;
        int height = Constants.getHeight(width, this);
        this.mCamera = new Camera(0, 0, width, height);


// Path: src/com/whiterabbit/checkers/Constants.java
// public class Constants {
//  
//     public static final int BALL_SIZE = 64;
//     public static final int BALL_DISTANCE = BALL_SIZE + BALL_SIZE / 10;
// 
//     public static final int BACKGROUND_LAYER = 0;
//     public static final int HOLE_LAYER = 1;
//     public static final int BALL_LAYER = 2;
//     public static final int SCORE_LAYER = 3;
//     public static final int LAYER_COUNT = 4;
// 
//     public static final int CAMERA_WIDTH = 480;
//     public static final int ADMOB_HEIGHT = 40;
//     
//     
//     public static final String BOARD_NAME_INTENT = "com.checkers.BOARD_NAME";
//     public static final String BOARD_RESTORE_INTENT = "com.checkers.BOARD_RESTORE";
//     
//     public static int getHeight(int width, BaseGameActivity g){
//     	return 720;
//     	/*
//         DisplayMetrics dm = new DisplayMetrics();       
//     
//         g.getWindowManager().getDefaultDisplay().getMetrics(dm);         
//         return width * dm.heightPixels/dm.widthPixels;*/
//     }
//     
//     
//     
//     public static int getOffset(int width, BaseGameActivity g){
//         DisplayMetrics dm = new DisplayMetrics();       
//         
//         g.getWindowManager().getDefaultDisplay().getMetrics(dm);         
//         return width * ADMOB_HEIGHT /dm.widthPixels;
//     }
// }
// 
// Path: src/com/whiterabbit/checkers/util/Utils.java
// public class Utils {
// 	public static final void vibrate(Launcher launcher, int effect, Context c){
// 		SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(c);
// 		if(prefs.getBoolean("PREF_CHECK_BOX_VIBRATION", true)){
// 			try{
// 				launcher.play(Launcher.IMPACT_METAL_66);
// 			}catch(Exception e){
// 				
// 			}
// 		}
// 	}
// 	
// 	public static final void playButtonPressed(Launcher launcher, Context c){
// 		vibrate(launcher, Launcher.SHARP_CLICK_33, c);
// 	}
// 
// }


// Path: src/com/whiterabbit/checkers/ui/CheckersMainMenu.java
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import com.bugsense.trace.BugSenseHandler;
import com.immersion.uhl.Launcher;
import com.whiterabbit.checkers.Constants;
import com.whiterabbit.checkers.R;
import com.whiterabbit.checkers.util.Utils;
import org.andengine.engine.camera.Camera;
import org.andengine.engine.options.EngineOptions;
import org.andengine.engine.options.ScreenOrientation;
import org.andengine.engine.options.resolutionpolicy.RatioResolutionPolicy;
import org.andengine.entity.Entity;
import org.andengine.entity.scene.Scene;
import org.andengine.entity.sprite.Sprite;
import org.andengine.input.touch.TouchEvent;
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlas;
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory;
import org.andengine.opengl.texture.region.ITextureRegion;
import org.andengine.ui.activity.BaseGameActivity;

package com.whiterabbit.checkers.ui;



public class CheckersMainMenu extends BaseGameActivity {
	// ===========================================================
	// Constants
	// ===========================================================



	protected static final int MENU_OK = 0;
	protected static final int MENU_QUIT = MENU_OK + 1;
	static final int MENU_OPTIONS = Menu.FIRST;

	// ===========================================================
	// Fields
	// ===========================================================

	protected Camera mCamera;

	protected Scene mMainScene;
	private BitmapTextureAtlas mPlayTexture;
	protected ITextureRegion mPlayTextureRegion;

	protected ITextureRegion mBackgroundTextureRegion;
	protected BitmapTextureAtlas mBackgroundTexture;
	private Launcher mHapticsLauncher;
	
	// ===========================================================
	// Constructors
	// ===========================================================

	// ===========================================================
	// Getter & Setter
	// ===========================================================

	// ===========================================================
	// Methods for/from SuperClass/Interfaces
	// ===========================================================


    @Override
    public EngineOptions onCreateEngineOptions() {
        int width = Constants.CAMERA_WIDTH;
        int height = Constants.getHeight(width, this);
        this.mCamera = new Camera(0, 0, width, height);


        return new EngineOptions(true, ScreenOrientation.PORTRAIT_FIXED, new RatioResolutionPolicy(width, height), this.mCamera);
