Java Code Examples for com.badlogic.gdx.math.Rectangle

The following examples show how to use com.badlogic.gdx.math.Rectangle. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: ud405   Source File: DrawTheCantorGasket.java    License: MIT License 6 votes vote down vote up
private Rectangle findLargestSquare() {
    Rectangle largestSquare = new Rectangle();
    float screenWidth = Gdx.graphics.getWidth();
    float screenHeight = Gdx.graphics.getHeight();

    Gdx.app.log("Derp",  "Screen size " + screenWidth + " " + screenHeight);

    if (screenWidth > screenHeight) {
        largestSquare.x = (screenWidth - screenHeight) / 2;
        largestSquare.y = 0;
        largestSquare.width = screenHeight;
        largestSquare.height = screenHeight;
    } else {
        largestSquare.x = 0;
        largestSquare.y = (screenHeight - screenWidth) / 2;
        largestSquare.width = screenWidth;
        largestSquare.height = screenWidth;
    }
    return largestSquare;
}
 
Example 2
Source Project: Mundus   Source File: MundusMultiSplitPane.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Changes widgets of this split pane. You can pass any number of actors
 * even 1 or 0. Actors can't be null.
 */
public void setWidgets(Actor... actors) {
    clearChildren();
    widgetBounds.clear();
    scissors.clear();
    handleBounds.clear();
    splits.clear();

    for (Actor actor : actors) {
        super.addActor(actor);
        widgetBounds.add(new Rectangle());
        scissors.add(new Rectangle());
    }
    float currentSplit = 0;
    float splitAdvance = 1f / actors.length;
    for (int i = 0; i < actors.length - 1; i++) {
        handleBounds.add(new Rectangle());
        currentSplit += splitAdvance;
        splits.add(currentSplit);
    }
    invalidate();
}
 
Example 3
Source Project: ud405   Source File: DrawTheCantorGasket.java    License: MIT License 6 votes vote down vote up
private Rectangle findLargestSquare(){
    Rectangle largestSquare = new Rectangle();
    float screenWidth = Gdx.graphics.getWidth();
    float screenHeight = Gdx.graphics.getHeight();

    if (screenWidth > screenHeight){
        largestSquare.x = (screenWidth - screenHeight)/2;
        largestSquare.y = 0;
        largestSquare.width = screenHeight;
        largestSquare.height = screenHeight;
    } else {
        largestSquare.x = 0;
        largestSquare.y = (screenHeight - screenWidth)/2;
        largestSquare.width = screenWidth;
        largestSquare.height = screenWidth;
    }
    return largestSquare;
}
 
Example 4
Source Project: ud406   Source File: RectangleCircleCollisionScreen.java    License: MIT License 6 votes vote down vote up
private boolean areColliding(Rectangle rectangle, Circle circle) {

        // TODO: Complete this function!

        boolean containsACorner = circle.contains(rectangle.x, rectangle.y) || // Bottom left
                circle.contains(rectangle.x + rectangle.width, rectangle.y) || // Bottom right
                circle.contains(rectangle.x + rectangle.width, rectangle.y + rectangle.height) || // Top Right
                circle.contains(rectangle.x, rectangle.y + rectangle.height); // Top left

        boolean inHorizontalInterval = rectangle.x < circle.x && circle.x < rectangle.x + rectangle.width;
        boolean inVerticalInterval = rectangle.y < circle.y && circle.y < rectangle.y + rectangle.height;

        boolean inHorizontalNeighborhood = rectangle.x - circle.radius < circle.x && circle.x < rectangle.x + rectangle.width + circle.radius;
        boolean inVerticalNeighborhood = rectangle.y - circle.radius < circle.y && circle.y < rectangle.y + rectangle.height + circle.radius;

        boolean touchingAnEdge = inHorizontalInterval && inVerticalNeighborhood ||
                inHorizontalNeighborhood && inVerticalInterval;

        return containsACorner || touchingAnEdge;
    }
 
Example 5
Source Project: Klooni1010   Source File: PieceHolder.java    License: GNU General Public License v3.0 6 votes vote down vote up
public boolean pickPiece() {
    Vector2 mouse = new Vector2(
            Gdx.input.getX(),
            Gdx.graphics.getHeight() - Gdx.input.getY()); // Y axis is inverted

    final float perPieceWidth = area.width / count;
    for (int i = 0; i < count; ++i) {
        if (pieces[i] != null) {
            Rectangle maxPieceArea = new Rectangle(
                    area.x + i * perPieceWidth, area.y, perPieceWidth, area.height);

            if (maxPieceArea.contains(mouse)) {
                heldPiece = i;
                return true;
            }
        }
    }

    heldPiece = -1;
    return false;
}
 
Example 6
Source Project: Entitas-Java   Source File: MoveSystem.java    License: MIT License 6 votes vote down vote up
@Override
public void execute(float deltatime) {
    for (CoreEntity e : _group.getEntities()) {
        Motion motion = e.getMotion();
        View view = e.getView();

        if (view.shape instanceof Rectangle) {
            Rectangle ret = (Rectangle) view.shape;
            ret.setPosition(ret.x + motion.velocity.x * Gdx.graphics.getDeltaTime(),
                    ret.y + motion.velocity.y * Gdx.graphics.getDeltaTime());
        } else {
            Circle circle = (Circle) view.shape;
            circle.setPosition(circle.x + motion.velocity.x * Gdx.graphics.getDeltaTime()
                    , circle.y + motion.velocity.y * Gdx.graphics.getDeltaTime());
        }
    }
}
 
Example 7
Source Project: Klooni1010   Source File: ShopCard.java    License: GNU General Public License v3.0 6 votes vote down vote up
ShopCard(final Klooni game, final GameLayout layout,
         final String itemName, final Color backgroundColor) {
    this.game = game;
    Label.LabelStyle labelStyle = new Label.LabelStyle();
    labelStyle.font = game.skin.getFont("font_small");

    priceLabel = new Label("", labelStyle);
    nameLabel = new Label(itemName, labelStyle);

    Color labelColor = Theme.shouldUseWhite(backgroundColor) ? Color.WHITE : Color.BLACK;
    priceLabel.setColor(labelColor);
    nameLabel.setColor(labelColor);

    priceBounds = new Rectangle();
    nameBounds = new Rectangle();

    layout.update(this);
}
 
Example 8
Source Project: ud405   Source File: DrawTheCantorGasket.java    License: MIT License 6 votes vote down vote up
@Override
public void render() {
    Gdx.gl.glClearColor(0, 0, 0, 1);
    Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
    Rectangle bounds = findLargestSquare();

    // TODO: Begin a filled shapeRenderer batch
    shapeRenderer.begin(ShapeType.Filled);

    // TODO: Draw a white square matching the bounds
    shapeRenderer.setColor(Color.WHITE);
    shapeRenderer.rect(bounds.x, bounds.y, bounds.width, bounds.height);

    // TODO: Set the working color to black, and call punchCantorGasket with the bounds
    shapeRenderer.setColor(Color.BLACK);
    punchCantorGasket(bounds.x, bounds.y, bounds.width, RECURSIONS);

    // TODO: End the batch
    shapeRenderer.end();
}
 
Example 9
Source Project: ud406   Source File: RectangleCircleCollisionScreen.java    License: MIT License 6 votes vote down vote up
public RectangleCircleCollisionScreen() {
    startTime = TimeUtils.nanoTime();
    shapeRenderer = new ShapeRenderer();
    viewport = new FitViewport(WORLD_SIZE, WORLD_SIZE);

    rectangles = new Array<Rectangle>(new Rectangle[]{
            new Rectangle(40, 40, 20, 20), // Middle
            new Rectangle(10, 40, 10, 20), // Left
            new Rectangle(70, 45, 20, 10) // Right
    });

    circles = new Array<OscillatingCircle>(new OscillatingCircle[]{
            new OscillatingCircle(50, 65, 7, 0, 40, 3), // High horizontal
            new OscillatingCircle(50, 35, 7, 0, 40, 3.1f), // Low horizontal
            new OscillatingCircle(50, 50, 3, MathUtils.PI / 4, 40, 5f), // Diagonal
            new OscillatingCircle(25, 50, 5, 0, 11, 7f), // Middle horizontal
    });
}
 
Example 10
Source Project: vis-ui   Source File: MultiSplitPane.java    License: Apache License 2.0 6 votes vote down vote up
/** Changes widgets of this split pane. You can pass any number of actors even 1 or 0. Actors can't be null. */
public void setWidgets (Iterable<Actor> actors) {
	clearChildren();
	widgetBounds.clear();
	scissors.clear();
	handleBounds.clear();
	splits.clear();

	for (Actor actor : actors) {
		super.addActor(actor);
		widgetBounds.add(new Rectangle());
		scissors.add(new Rectangle());
	}
	float currentSplit = 0;
	float splitAdvance = 1f / getChildren().size;
	for (int i = 0; i < getChildren().size - 1; i++) {
		handleBounds.add(new Rectangle());
		currentSplit += splitAdvance;
		splits.add(currentSplit);
	}
	invalidate();
}
 
Example 11
Source Project: buffer_bci   Source File: Renderer.java    License: GNU General Public License v3.0 6 votes vote down vote up
public Renderer (OrthographicCamera cam, Worm worm, Food food, Level level) {
	font = new BitmapFont(Gdx.files.internal(FONT_LOC));
	this.cam = cam;
	this.worm = worm;
	wholeWorm = worm.getAllBody();
	this.food = food;
	levelArray = level.getLevelArray();
	shapeRenderer = new ShapeRenderer();
	random = new Random();
	color = new Color();
	color.r = Color.WHITE.r;
	color.g = Color.WHITE.g;
	color.b = Color.WHITE.b;
	color.a = Color.WHITE.a;
	rect = new Rectangle();
	batch = new SpriteBatch();
}
 
Example 12
Source Project: Entitas-Java   Source File: DebugRendererSystem.java    License: MIT License 6 votes vote down vote up
@Override
public void render() {
   // cam.update();
    batch.begin();
    Rectangle rect = new Rectangle(cam.position.x, cam.position.y, 3, 10);

    shapeRenderer.setProjectionMatrix(cam.combined);

    shapeRenderer.begin(ShapeRenderer.ShapeType.Line);
    shapeRenderer.identity();
    shapeRenderer.translate(20, 12, 2);
    shapeRenderer.rotate(0, 0, 1, 90);
    shapeRenderer.rect(cam.position.x , cam.position.y, 50, 30);
    shapeRenderer.end();

    shapeRenderer.begin(ShapeRenderer.ShapeType.Filled);
    shapeRenderer.identity();
    shapeRenderer.translate(20, 12, 2);
    shapeRenderer.rotate(0, 0, 1, 90);
    shapeRenderer.rect(-rect.getX() / 2, -rect.getY() / 2, rect.width, rect.height);
    shapeRenderer.end();
    debugRenderer.render(physics, cam.combined);
    batch.end();
}
 
Example 13
Source Project: beatoraja   Source File: SkinTextFont.java    License: GNU General Public License v3.0 6 votes vote down vote up
private void setLayout(Color c, Rectangle r) {
    if (isWrapping()) {
        layout.setText(font, getText(), c, r.getWidth(), ALIGN[getAlign()], true);
    } else {
        switch (getOverflow()) {
        case OVERFLOW_OVERFLOW:
            layout.setText(font, getText(), c, r.getWidth(), ALIGN[getAlign()], false);
            break;
        case OVERFLOW_SHRINK:
            layout.setText(font, getText(), c, r.getWidth(), ALIGN[getAlign()], false);
            float actualWidth = layout.width;
            if (actualWidth > r.getWidth()) {
                font.getData().setScale(font.getData().scaleX * r.getWidth() / actualWidth, font.getData().scaleY);
                layout.setText(font, getText(), c, r.getWidth(), ALIGN[getAlign()], false);
            }
            break;
        case OVERFLOW_TRUNCATE:
            layout.setText(font, getText(), 0, getText().length(), c, r.getWidth(), ALIGN[getAlign()], false, "");
            break;
        }
    }
}
 
Example 14
Source Project: beatoraja   Source File: SkinTextBitmap.java    License: GNU General Public License v3.0 6 votes vote down vote up
private void setLayout(Color c, Rectangle r) {
	if (isWrapping()) {
		layout.setText(font, getText(), c, r.getWidth(), ALIGN[getAlign()], true);
	} else {
		switch (getOverflow()) {
		case OVERFLOW_OVERFLOW:
			layout.setText(font, getText(), c, r.getWidth(), ALIGN[getAlign()], false);
			break;
		case OVERFLOW_SHRINK:
			layout.setText(font, getText(), c, r.getWidth(), ALIGN[getAlign()], false);
			float actualWidth = layout.width;
			if (actualWidth > r.getWidth()) {
				font.getData().setScale(font.getData().scaleX * r.getWidth() / actualWidth, font.getData().scaleY);
				layout.setText(font, getText(), c, r.getWidth(), ALIGN[getAlign()], false);
			}
			break;
		case OVERFLOW_TRUNCATE:
			layout.setText(font, getText(), 0, getText().length(), c, r.getWidth(), ALIGN[getAlign()], false, "");
			break;
		}
	}
}
 
Example 15
Source Project: ashley-superjumper   Source File: HelpScreen5.java    License: Apache License 2.0 5 votes vote down vote up
public HelpScreen5 (SuperJumper game) {
	this.game = game;

	guiCam = new OrthographicCamera(320, 480);
	guiCam.position.set(320 / 2, 480 / 2, 0);
	nextBounds = new Rectangle(320 - 64, 0, 64, 64);
	touchPoint = new Vector3();
	helpImage = Assets.loadTexture("data/help5.png");
	helpRegion = new TextureRegion(helpImage, 0, 0, 320, 480);
}
 
Example 16
Source Project: martianrun   Source File: GameStage.java    License: Apache License 2.0 5 votes vote down vote up
private void setUpAbout() {
    Rectangle aboutButtonBounds = new Rectangle(getCamera().viewportWidth * 23 / 25,
            getCamera().viewportHeight * 13 / 20, getCamera().viewportHeight / 10,
            getCamera().viewportHeight / 10);
    aboutButton = new AboutButton(aboutButtonBounds, new GameAboutButtonListener());
    addActor(aboutButton);
}
 
Example 17
Source Project: martianrun   Source File: GameStage.java    License: Apache License 2.0 5 votes vote down vote up
private void setUpShare() {
    Rectangle shareButtonBounds = new Rectangle(getCamera().viewportWidth / 64,
            getCamera().viewportHeight / 2, getCamera().viewportHeight / 10,
            getCamera().viewportHeight / 10);
    shareButton = new ShareButton(shareButtonBounds, new GameShareButtonListener());
    addActor(shareButton);
}
 
Example 18
Source Project: vis-ui   Source File: MultiSplitPane.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void layout () {
	if (!vertical)
		calculateHorizBoundsAndPositions();
	else
		calculateVertBoundsAndPositions();

	SnapshotArray<Actor> actors = getChildren();
	for (int i = 0; i < actors.size; i++) {
		Actor actor = actors.get(i);
		Rectangle bounds = widgetBounds.get(i);
		actor.setBounds(bounds.x, bounds.y, bounds.width, bounds.height);
		if (actor instanceof Layout) ((Layout) actor).validate();
	}
}
 
Example 19
Source Project: gdx-vfx   Source File: Scene2dUtils.java    License: Apache License 2.0 5 votes vote down vote up
public static Rectangle localToStageBounds(Actor actor, float x0, float y0, float x1, float y1) {
    Rectangle stageRect = Scene2dUtils.tmpRect;
    actor.localToStageCoordinates(tmpVec2.set(x0, y0));
    stageRect.setX(tmpVec2.x);
    stageRect.setY(tmpVec2.y);
    actor.localToStageCoordinates(tmpVec2.set(x1, y1));
    stageRect.setWidth(tmpVec2.x - stageRect.x);
    stageRect.setHeight(tmpVec2.y - stageRect.y);
    return stageRect;
}
 
Example 20
Source Project: gdx-vfx   Source File: Scene2dUtils.java    License: Apache License 2.0 5 votes vote down vote up
public static Rectangle stageToLocalBounds(Actor actor, float x0, float y0, float x1, float y1) {
    Rectangle localRect = Scene2dUtils.tmpRect;
    actor.stageToLocalCoordinates(tmpVec2.set(x0, y0));
    localRect.setX(tmpVec2.x);
    localRect.setY(tmpVec2.y);
    actor.stageToLocalCoordinates(tmpVec2.set(x1, y1));
    localRect.setWidth(tmpVec2.x - localRect.x);
    localRect.setHeight(tmpVec2.y - localRect.y);
    return localRect;
}
 
Example 21
Source Project: ashley-superjumper   Source File: HighscoresScreen.java    License: Apache License 2.0 5 votes vote down vote up
public HighscoresScreen (SuperJumper game) {
	this.game = game;

	guiCam = new OrthographicCamera(320, 480);
	guiCam.position.set(320 / 2, 480 / 2, 0);
	backBounds = new Rectangle(0, 0, 64, 64);
	touchPoint = new Vector3();
	highScores = new String[5];
	for (int i = 0; i < 5; i++) {
		highScores[i] = i + 1 + ". " + Settings.highscores[i];
		layout.setText(Assets.font, highScores[i]);
		xOffset = Math.max(layout.width, xOffset);
	}
	xOffset = 160 - xOffset / 2 + Assets.font.getSpaceWidth() / 2;
}
 
Example 22
Source Project: FruitCatcher   Source File: Basket.java    License: Apache License 2.0 5 votes vote down vote up
public Basket(int screenWidth, int posX) {
    this.screenWidth = screenWidth;
    
    rect = new Rectangle();
    if (posX < 0) {
    	rect.x = screenWidth / 2 - width / 2;
    }
    else {
    	rect.x = posX;
    }
    rect.y = 20;
    rect.width = width;
    rect.height = height;
}
 
Example 23
Source Project: Klooni1010   Source File: GameLayout.java    License: GNU General Public License v3.0 5 votes vote down vote up
public void update(Band band) {
    final Rectangle area = new Rectangle(
            0, pieceHolderHeight + boardHeight,
            screenWidth, scoreHeight);

    band.setBounds(area.x, area.y, area.width, area.height);
    // Let the band have the following shape:
    // 10% (100) padding
    // 35% (90%) score label
    // 10% (55%) padding
    // 35% (45%) info label
    // 10% (10%) padding
    band.scoreBounds.set(area.x, area.y + area.height * 0.55f, area.width, area.height * 0.35f);
    band.infoBounds.set(area.x, area.y + area.height * 0.10f, area.width, area.height * 0.35f);
}
 
Example 24
Source Project: martianrun   Source File: GameStage.java    License: Apache License 2.0 5 votes vote down vote up
private void setUpAchievements() {
    Rectangle achievementsButtonBounds = new Rectangle(getCamera().viewportWidth * 23 / 25,
            getCamera().viewportHeight / 2, getCamera().viewportHeight / 10,
            getCamera().viewportHeight / 10);
    achievementsButton = new AchievementsButton(achievementsButtonBounds,
            new GameAchievementsButtonListener());
    addActor(achievementsButton);
}
 
Example 25
Source Project: Klooni1010   Source File: EffectCard.java    License: GNU General Public License v3.0 5 votes vote down vote up
public EffectCard(final Klooni game, final GameLayout layout, final IEffectFactory effect) {
    super(game, layout, effect.getDisplay(), Klooni.theme.background);
    background = Theme.getBlankTexture();
    this.effect = effect;

    // Let the board have room for 3 cells, so cellSize * 3
    board = new Board(new Rectangle(0, 0, cellSize * 3, cellSize * 3), 3);

    setRandomPiece();
    usedItemUpdated();
}
 
Example 26
Source Project: JavaExercises   Source File: Asteroids.java    License: GNU General Public License v2.0 5 votes vote down vote up
Asteroid() {
    position = new Vector2(
            MathUtils.random(Gdx.graphics.getWidth(), Gdx.graphics.getWidth() * 2),
            MathUtils.random(0, Gdx.graphics.getHeight()));
    speed = MathUtils.random(3.0f, 6.0f);
    hitBox = new Rectangle(position.x, position.y,
            imgAsteroid.getWidth(), imgAsteroid.getHeight());
}
 
Example 27
Source Project: seventh   Source File: TriangleTest.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Test  //width =0
public void rectangleIntersectsTriangleFalseHeighZeroTest(){
    
    tri = new Triangle(new Vector2f(2, 2), new Vector2f(2, 15), new Vector2f(10, 2));
    seventh.math.Rectangle rectangle = new seventh.math.Rectangle(new Vector2f(0, 2),(int)0,(int)13);
    
    assertTrue(false == tri.rectangleIntersectsTriangle(rectangle,tri));
}
 
Example 28
Source Project: Entitas-Java   Source File: PongState.java    License: MIT License 5 votes vote down vote up
@Override
public void initialize() {
    // Input
    Camera camera = engine.getManager(BaseSceneManager.class).getDefaultCamera();
    Batch batch = engine.getManager(BaseSceneManager.class).getBatch();
    BitmapFont font = engine.getManager(BaseGUIManager.class).getDefaultFont();
    context.core.createEntity()
            .addBall(false)
            .addView(new Circle(0, 0, 8))
            .addMotion(MathUtils.clamp(1, 230, 300), 300);

    context.core.createEntity()
            .addPlayer(Player.ID.PLAYER1)
            .addScore("Player 1: ", 180, 470)
            .addView(new Rectangle(-350, 0, Pong.PLAYER_WIDTH, Pong.PLAYER_HEIGHT))
            .addMotion(0, 0);

    context.core.createEntity()
            .addPlayer(Player.ID.PLAYER2)
            .addScore("Player 2: ", 480, 470)
            .addView(new Rectangle(350, 0, Pong.PLAYER_WIDTH, Pong.PLAYER_HEIGHT))
            .addMotion(0, 0);

    systems.add(new InputSystem(context.core))
            .add(new ContactSystem(context.core))
            .add(new BoundsSystem(context.core))
            .add(new MoveSystem(context.core))
            .add(new RendererSystem(context.core, engine.sr, camera, batch, font));
}
 
Example 29
Source Project: beatoraja   Source File: SkinNote.java    License: GNU General Public License v3.0 5 votes vote down vote up
public void setLaneRegion(Rectangle[] region, float[] scale, int[] dstnote2, Skin skin) {
	for(int i = 0;i < lanes.length;i++) {
		lanes[i].setDestination(0,region[i].x, region[i].y, region[i].width, region[i].height, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
		lanes[i].scale =  scale[i];
		lanes[i].dstnote2 =  dstnote2[i];
	}
}
 
Example 30
public void draw(Rectangle r, SkinObjectRenderer sprite, long time, MainState state) {
	float x = r.x + r.width / 8;
	float y = r.y + r.height * 7 / 8;
	sprite.draw(titlefont, String.format("START TIME : %2d:%02d.%1d", property.starttime / 60000,
			(property.starttime / 1000) % 60, (property.starttime / 100) % 10), x, y, cursorpos == 0 ? Color.YELLOW : Color.CYAN);
	sprite.draw(titlefont, String.format("END TIME : %2d:%02d.%1d", property.endtime / 60000,
			(property.endtime / 1000) % 60, (property.endtime / 100) % 10), x, y - 22,cursorpos == 1 ? Color.YELLOW : Color.CYAN);
	sprite.draw(titlefont, "GAUGE TYPE : " + GAUGE[property.gaugetype], x, y - 44,cursorpos == 2 ? Color.YELLOW : Color.CYAN);
	sprite.draw(titlefont, "GAUGE CATEGORY : " + property.gaugecategory.name(), x, y - 66,cursorpos == 3 ? Color.YELLOW : Color.CYAN);
	sprite.draw(titlefont, "GAUGE VALUE : " + property.startgauge, x, y - 88, cursorpos == 4 ? Color.YELLOW : Color.CYAN);
	sprite.draw(titlefont, "JUDGERANK : " + property.judgerank, x, y - 110, cursorpos == 5 ? Color.YELLOW : Color.CYAN);
	sprite.draw(titlefont, "TOTAL : " + (int)property.total, x, y - 132, cursorpos == 6 ? Color.YELLOW : Color.CYAN);
	sprite.draw(titlefont, "FREQUENCY : " + property.freq, x, y - 154, cursorpos == 7 ? Color.YELLOW : Color.CYAN);
	sprite.draw(titlefont, "GRAPHTYPE : " + GRAPHTYPE[property.graphtype], x, y - 176, cursorpos == 8 ? Color.YELLOW : Color.CYAN);
	sprite.draw(titlefont, "OPTION-1P : " + RANDOM[property.random], x, y - 198, cursorpos == 9 ? Color.YELLOW : Color.CYAN);
	if (model.getMode().player == 2) {
		sprite.draw(titlefont, "OPTION-2P : " + RANDOM[property.random2], x, y - 220, cursorpos == 10 ? Color.YELLOW : Color.CYAN);
		sprite.draw(titlefont, "OPTION-DP : " + DPRANDOM[property.doubleop], x, y - 242, cursorpos == 11 ? Color.YELLOW : Color.CYAN);
	}

	if (state.main.getPlayerResource().mediaLoadFinished()) {
		sprite.draw(titlefont, "PRESS 1KEY TO PLAY", x, y - 276, Color.ORANGE);
	}
	
	String[] judge = {"PGREAT :","GREAT  :","GOOD   :", "BAD    :", "POOR   :", "KPOOR  :"};
	for(int i = 0; i < 6; i++) {
		sprite.draw(titlefont, String.format("%s %d %d %d",judge[i], state.getJudgeCount(i, true) + state.getJudgeCount(i, false), state.getJudgeCount(i, true), state.getJudgeCount(i, false)), x + 250, y - (i * 22), Color.WHITE);
	}

	graph[property.graphtype].draw(sprite, time, state, new Rectangle(r.x, r.y, r.width, r.height / 4), property.starttime,
			property.endtime, property.freq / 100f);
}