/* ui/palette.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/palette.h" #include "sys/sys.h" namespace ui { 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, 1.0f), palette_highlight(1.0f, 1.0f, 0.5f), palette_disabled(0.5f, 0.5f, 0.5f, 1.0f), palette_pointer(0.0f, 0.75f, 0.0f, 1.0f), palette_active(0.0f, 1.0f, 0.0f, 1.0f), palette_debug(0.50f, 0.75f), palette_mission(1.0f, 0.5f, 1.0f, 1.0f), palette_bold(1.0f, 1.0f), palette_fancy(0.0f, 1.0f, 0.0f, 1.0f), palette_warning(1.0f, 1.0f, 0.0f, 1.0f), palette_error(1.0f, 0.0f, 0.0f, 1.0f) { } Palette::Palette(const Palette & other ) : palette_foreground(other.foreground()), palette_background(other.background()), palette_border(other.border()), palette_text(other.text()), palette_highlight(other.highlight()), palette_disabled(other.disabled()), palette_pointer(other.pointer()), palette_active(other.active()), palette_debug(other.debug()), palette_mission(other.mission()), palette_bold(other.bold()), palette_fancy(other.fancy()), palette_warning(other.warning()), palette_error(other.error()) { } Palette::~Palette() { } const math::Color &Palette::color(Color palettecolor) const { switch (palettecolor) { case Foreground: return foreground(); break; case Background: return background(); break; case Border: return border(); break; case Text: return text(); break; case Highlight: return highlight(); break; case Disabled: return disabled(); break; case Pointer: return pointer(); break; case Active: return active(); 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; } } }