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-10-08 18:28:21 +0000
committerStijn Buys <ingar@osirion.org>2008-10-08 18:28:21 +0000
commit4331f5c17901f46693dcb5c2df96276f6851be25 (patch)
tree903f70d18c7842121c5409a5ec121e0a565fd5ef /src/ui/font.cc
parente3b810e1fe8ced1e0245f8d999bdc9136cfcdc70 (diff)
libui updates, paint namespace, font and palette fixes, button sound
Diffstat (limited to 'src/ui/font.cc')
-rw-r--r--src/ui/font.cc57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/ui/font.cc b/src/ui/font.cc
new file mode 100644
index 0000000..26d4155
--- /dev/null
+++ b/src/ui/font.cc
@@ -0,0 +1,57 @@
+/*
+ ui/font.cc
+ This file is part of the Osirion project and is distributed under
+ the terms of the GNU General Public License version 2
+*/
+
+#include "ui/font.h"
+
+namespace ui {
+
+Font::Font(const char *name, const float width, const float height)
+{
+ if (name)
+ font_name.assign(name);
+ font_size.assign(width, height);
+}
+
+Font::~Font()
+{}
+
+void Font::set_size(const float width, const float height)
+{
+ font_size.assign(width, height);
+}
+
+void Font::set_size(math::Vector2f const &size)
+{
+ font_size.assign(size);
+}
+
+void Font::set_width(float width)
+{
+ font_size.x = width;
+}
+
+void Font::set_height(float height)
+{
+ font_size.y = height;
+}
+
+void Font::set_name(const char *name)
+{
+ if (name)
+ font_name.assign(name);
+ else
+ font_name.clear();
+}
+
+void Font::set_name(std::string const & name)
+{
+ font_name.assign(name);
+}
+
+}
+
+
+