package com.badlogic.drop

import com.badlogic.gdx.Screen
import com.badlogic.gdx.Gdx
import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.graphics.OrthographicCamera
import com.badlogic.gdx.utils.ScreenUtils

class MainMenuScreen(val game: Drop) : Screen {
    private val camera = OrthographicCamera()

    init {
        camera.setToOrtho(false, 800f, 480f)
    }

    override fun show() = Unit

    override fun render(delta: Float) {
        ScreenUtils.clear(Color.BLACK)

        //game.viewport.apply()
        //game.batch.projectionMatrix = game.viewport.camera.combined
        camera.update()
        game.batch.projectionMatrix = camera.combined

        game.batch.begin()

        game.font.draw(game.batch, "Welcome to Drop!!!", 100f, 150f)
        game.font.draw(game.batch, "Tap anywhere to begin!", 100f, 100f)

        game.batch.end()

        if (Gdx.input.isTouched) {
            game.screen = GameScreen(game)
        }

    }

    override fun resize(width: Int, height: Int) = Unit

    override fun pause() = Unit

    override fun resume() = Unit

    override fun hide() = Unit

    override fun dispose() = Unit
}
