text: /*
   * GameCanvas.cpp
   *
   *  Created on: May 6, 2020
   *      Author: noyan
   */
  
  
  #include "GameCanvas.h"
  #include <functional>
  
  
  GameCanvas::GameCanvas(gApp* root) : gBaseCanvas(root) {
  	this->root = root;
  }
  
  GameCanvas::~GameCanvas() {
  }
  
  void GameCanvas::setup() {
  //	gLogi("GameCanvas") << "setup";
  	logo.loadImage("gamelab-istanbul_logo_128.png");
  	button.setPosition(100, 100);
  	button.setClickCallback(std::bind(&GameCanvas::buttonClicked, this, std::placeholders::_1));
  	button2.setPosition(100, 110 + button.getHeight());
  	button2.setClickCallback(std::bind(&GameCanvas::buttonClicked, this, std::placeholders::_1));
  }
  
  void GameCanvas::buttonClicked(int buttonId) {
  	gLogi("GameCanvas") << "button clicked, id:" << buttonId;
  }
  
  void GameCanvas::update() {
  //	gLogi("GameCanvas") << "update";
  }
  
  void GameCanvas::draw() {
  //	gLogi("GameCanvas") << "draw";
  	logo.draw((getWidth() - logo.getWidth()) / 2, (getHeight() - logo.getHeight()) / 2);
  	button.draw();
  	button2.draw();
  }
  
  void GameCanvas::keyPressed(int key) {
  //	gLogi("GameCanvas") << "keyPressed:" << key;
  }
  
  void GameCanvas::keyReleased(int key) {
  //	gLogi("GameCanvas") << "keyReleased:" << key;
  }
  
  void GameCanvas::mouseMoved(int x, int y) {
  //	gLogi("GameCanvas") << "mouseMoved" << ", x:" << x << ", y:" << y;
  }
  
  void GameCanvas::mouseDragged(int x, int y, int button) {
  //	gLogi("GameCanvas") << "mouseDragged" << ", x:" << x << ", y:" << y << ", b:" << button;
  }
  
  void GameCanvas::mousePressed(int x, int y, int button) {
  }
  
  void GameCanvas::mouseReleased(int x, int y, int button) {
  //	gLogi("GameCanvas") << "mouseReleased" << ", button:" << button;
  }
  
  void GameCanvas::mouseEntered() {
  }
  
  void GameCanvas::mouseExited() {
  }
  
  void GameCanvas::showNotify() {
  
  }
  
  void GameCanvas::hideNotify() {
  
  }
  
  