aboutsummaryrefslogtreecommitdiff
path: root/example/3d.cpp
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2019-05-06 18:18:32 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2019-05-06 18:18:32 +0200
commit99107be8a997eb453b989e1b31123708685696dc (patch)
tree3e822201c2662097ac7c294596e15395de5ab96c /example/3d.cpp
parent3fec03eeaa7dbe5152255ebdc0aae9841c241565 (diff)
downloadtermgl-99107be8a997eb453b989e1b31123708685696dc.tar.gz
Changed color handling to take ANSI 8bit colors
added ansi_color_fg(R,G,B) and ..._bg(...) to generate ANSI-colors from RGB values replaced two spaces with tabs in every file to fix terrible tabbing (thanks atom...)
Diffstat (limited to 'example/3d.cpp')
-rw-r--r--example/3d.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/example/3d.cpp b/example/3d.cpp
index e488da1..1b7e9e1 100644
--- a/example/3d.cpp
+++ b/example/3d.cpp
@@ -14,27 +14,27 @@
class testobject : cObject
{
public:
- testobject()
- {
- setSize(10,5);
- cc = 0;
+ testobject()
+ {
+ setSize(10,5);
+ cc = 0;
- drawRectangle('#', NULL, {0,0}, {9,4}, _COL_GREEN, _COL_DEFAULT);
- }
+ drawRectangle('#', NULL, {0,0}, {9,4}, _COL_GREEN, _COL_DEFAULT);
+ }
- ~testobject() { destruct(); }
+ ~testobject() { destruct(); }
- virtual void onClick(sPos _pos, unsigned int _button)
- {
- cc++;
- drawText(std::to_string(cc), {2,2}, _COL_RED);
+ virtual void onClick(sPos _pos, unsigned int _button)
+ {
+ cc++;
+ drawText(std::to_string(cc), {2,2}, _COL_RED);
- drawPoint('Q', _pos, _COL_YELLOW);
- }
+ drawPoint('Q', _pos, _COL_YELLOW);
+ }
virtual void onChar(unsigned char _c) { drawPoint(_c, {1,1}, _COL_BLUE); }
private:
- int cc;
+ int cc;
};
int main(int argc, char* argv[])