package com.ngdroidapp;

import android.graphics.Bitmap;
import android.graphics.Canvas;

import istanbul.gamelab.ngdroid.base.BaseCanvas;
import istanbul.gamelab.ngdroid.util.Log;
import istanbul.gamelab.ngdroid.util.Utils;


/**
 * Created by noyan on 24.06.2016.
 * Nitra Games Ltd.
 */


public class GameCanvas extends BaseCanvas {

    private Bitmap logo;
    private int logox, logoy, logow, logoh;


    public GameCanvas(NgApp ngApp) {
        super(ngApp);
    }

    public void setup() {
        LOGI("setup");

        logo = loadImage("gamelab-istanbul_logo.png");
        logow = logo.getWidth();
        logoh = logo.getHeight();
        logox = (getWidth() - logow) / 2;
        logoy = (getHeight() - logoh) / 2;
    }

    public void update() {
        LOGI("update");
    }

    public void draw(Canvas canvas) {
        LOGI("draw");

        drawBitmap(logo, logox, logoy);
    }

    public void keyPressed(int key) {

    }

    public void keyReleased(int key) {

    }

    public boolean backPressed() {
        return true;
    }

    public void surfaceChanged(int width, int height) {

    }

    public void surfaceCreated() {

    }

    public void surfaceDestroyed() {

    }

    public void touchDown(int x, int y, int id) {
    }

    public void touchMove(int x, int y, int id) {
    }

    public void touchUp(int x, int y, int id) {
    }


    public void pause() {

    }


    public void resume() {

    }


    public void reloadTextures() {

    }


    public void showNotify() {
    }

    public void hideNotify() {
    }

}
