summaryrefslogtreecommitdiff
path: root/testobject.h
blob: 1da8987d64df7fa02eba8d22e6762ae5a26f6f2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma once

#include "cObject.h"
#include <string>

class testobject : cObject
{

public:
  testobject()
  {
    setSize(10,5);
    cc = 0;

    drawRectangle('#', NULL, {0,0}, {9,4}, _COL_GREEN, _COL_DEFAULT);
  }

  ~testobject()
  {
    destruct();
  }

  virtual void onClick(sPos _pos, unsigned int _button)
  {
    cc++;
    drawText(std::to_string(cc), {2,2}, _COL_RED);
  }

	virtual void onChar(unsigned char _c)
  {
    drawPoint(_c, {1,1},true, _COL_BLUE);
  }
private:
  int cc;
};