From b875124824794a7762414db76ed9f953b8ba320f Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 26 Dec 2008 12:21:48 +0000 Subject: default player settings in player.ini, palette text colors, cleanups --- src/ui/palette.cc | 83 +++++++++++++++++++++---------------------------------- 1 file changed, 32 insertions(+), 51 deletions(-) (limited to 'src/ui/palette.cc') diff --git a/src/ui/palette.cc b/src/ui/palette.cc index 79388d8..f8d16c1 100644 --- a/src/ui/palette.cc +++ b/src/ui/palette.cc @@ -10,17 +10,18 @@ namespace ui { -Palette::Palette() +Palette::Palette() : + palette_foreground(1.0f, 1.0f), + palette_background(0.5f, 0.75f), + palette_border(0.0f, 0.8f, 0.0f, 0.5f), + palette_text(0.75f), + palette_highlight(1.0f, 1.0f, 0.5f), + palette_pointer(0.0f, 0.75f, 0.0f), + palette_active(0.0f, 1.0f, 0.0f), + palette_debug(0.50f, 0.75f), + palette_mission(1.0f, 0.5f, 1.0f) { - palette_foreground.assign(1.0f, 1.0f); - palette_highlight.assign(1.0f, 1.0f, 0.5f); - palette_text.assign(0.75f); - palette_background.assign(0.5f, 0.75f); - palette_border.assign(0.0f, 0.8f, 0.0f, 0.5f); - palette_pointer.assign(0.0f, 0.75f, 0.0f); - palette_active.assign(0.0f, 1.0f, 0.0f); - palette_debug.assign(1.0f, 0.0f, 1.0f, 0.75f); } Palette::~Palette() @@ -36,12 +37,15 @@ const math::Color &Palette::color(Color palettecolor) const case Background: return background(); break; - case Highlight: - return highlight(); - break; case Border: return border(); break; + case Text: + return text(); + break; + case Highlight: + return highlight(); + break; case Pointer: return pointer(); break; @@ -50,51 +54,28 @@ const math::Color &Palette::color(Color palettecolor) const break; case Debug: return debug(); + break; + case Mission: + return mission(); + break; + case Bold: + return bold(); + break; + case Fancy: + return fancy(); + break; + case Warning: + return warning(); + break; + case Error: + return error(); + break; default: return foreground(); break; } } -void Palette::set_foreground(math::Color const &color) -{ - palette_foreground.assign(color); -} - -void Palette::set_highlight(math::Color const &color) -{ - palette_highlight.assign(color); -} - -void Palette::set_text(math::Color const &color) -{ - palette_text.assign(color); -} - -void Palette::set_background(math::Color const &color) -{ - palette_background.assign(color); -} - -void Palette::set_border(math::Color const &color) -{ - palette_border.assign(color); -} - -void Palette::set_pointer(math::Color const &color) -{ - palette_pointer.assign(color); -} - -void Palette::set_active(math::Color const &color) -{ - palette_active.assign(color); -} - -void Palette::set_debug(math::Color const &color) -{ - palette_debug.assign(color); -} } -- cgit v1.2.3