Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-05-12 18:32:15 +0000
committerStijn Buys <ingar@osirion.org>2008-05-12 18:32:15 +0000
commit5ceb4694a05ec68b5cfba18b0f25ba804be88a80 (patch)
treed1baddc086de4bb4fa04cf59d11516f4ecc89bf3 /src/render/text.h
parente4f2faa8d5895ba30207c09c7886afb21a697d5f (diff)
console colors
Diffstat (limited to 'src/render/text.h')
-rw-r--r--src/render/text.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/render/text.h b/src/render/text.h
index 47d88fd..5cf18ea 100644
--- a/src/render/text.h
+++ b/src/render/text.h
@@ -1,7 +1,7 @@
/*
render/text.h
- This file is part of the Osirion project and is distributed under
- the terms of the GNU General Public License version 2
+ This file is part of the Osirion project and is distributed under
+ the terms of the GNU General Public License version 2
*/
#ifndef __INCLUDED_RENDER_TEXT_H__
@@ -10,10 +10,19 @@
#include <string>
#include <sstream>
-namespace render {
+#include "math/color.h"
-class Text {
+namespace render
+{
+
+class Text
+{
public:
+
+ static void init();
+
+ static void shutdown();
+
/// draw a text string
static void draw(float x, float y, const std::string & text);
@@ -31,6 +40,9 @@ public:
/// set the font
static void setfont(const char *texture, float width, float height);
+
+ /// set the color
+ static void setcolor(const char color);
/// current font width
static inline float fontwidth() { return text_fontwidth; }
@@ -38,6 +50,11 @@ public:
/// current font height
static inline float fontheight() { return text_fontheight; }
+ enum Color {Black=0, Red=1, Green=2, Yellow=3, Blue=4, Cyan=5, Magenta=6, White=7};
+
+ static math::Color * base_color[10];
+ static math::Color * core_color[26];
+
private:
static float text_fontwidth;
static float text_fontheight;