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-12-26 12:21:48 +0000
committerStijn Buys <ingar@osirion.org>2008-12-26 12:21:48 +0000
commitb875124824794a7762414db76ed9f953b8ba320f (patch)
tree86f27d64e4a9e91a93cb4b30752f27eeec6526ac /src/ui/palette.h
parentbfa10f9990a8a045b03474d11af75984c12a856a (diff)
default player settings in player.ini,
palette text colors, cleanups
Diffstat (limited to 'src/ui/palette.h')
-rw-r--r--src/ui/palette.h155
1 files changed, 134 insertions, 21 deletions
diff --git a/src/ui/palette.h b/src/ui/palette.h
index 1ef49c7..1aabc59 100644
--- a/src/ui/palette.h
+++ b/src/ui/palette.h
@@ -12,77 +12,190 @@
namespace ui
{
+/// color palette used by the user interface
class Palette
{
public:
+ /// default constructor, creates a default palette
Palette();
+
+ /// default destructor
~Palette();
- enum Color { Foreground=0, Background=1, Highlight=2, Border=3, Pointer=4, Active=5, Debug=6 };
+ /// color index
+ enum Color { Foreground=0, Background=1, Border=2, Text=3, Highlight=4, Pointer=5, Active=6, Debug=7, Mission=8,
+ Bold=9, Fancy=10, Warning=11, Error=12 };
+
+ /* ---- mutators ------------------------------------------- */
/// set foreground color
- void set_foreground(math::Color const &color);
+ inline void set_foreground(const math::Color &color)
+ {
+ palette_foreground.assign(color);
+ }
+
+ /// set background color
+ inline void set_background(const math::Color &color)
+ {
+ palette_background.assign(color);
+ }
+
+ /// set border color
+ inline void set_border(const math::Color &color)
+ {
+ palette_border.assign(color);
+ }
+
+ /// set text color
+ inline void set_text(const math::Color &color)
+ {
+ palette_text.assign(color);
+ }
/// set highlight color
- void set_highlight(math::Color const &color);
-
- void set_text(math::Color const &color);
+ inline void set_highlight(const math::Color &color)
+ {
+ palette_highlight.assign(color);
+ }
- void set_background(math::Color const &color);
+ /// set pointer color
+ inline void set_pointer(const math::Color &color)
+ {
+ palette_pointer.assign(color);
+ }
- void set_border(math::Color const &color);
+ /// set active pointer color
+ inline void set_active(const math::Color &color)
+ {
+ palette_active.assign(color);
+ }
- void set_pointer(math::Color const &color);
+ /// set debug color
+ inline void set_debug(const math::Color &color)
+ {
+ palette_debug.assign(color);
+ }
- void set_active(math::Color const &color);
+ /// set mission color
+ inline void set_mission(const math::Color &color)
+ {
+ palette_mission.assign(color);
+ }
- void set_debug(math::Color const &olor);
+ /// set bold text color
+ inline void set_bold(const math::Color &color)
+ {
+ palette_bold.assign(color);
+ }
- inline const math::Color &foreground() const {
- return palette_foreground;
+ /// set fancy text color
+ inline void set_fancy(const math::Color &color)
+ {
+ palette_fancy.assign(color);
}
- inline const math::Color &highlight() const {
- return palette_highlight;
+ /// set warning text color
+ inline void set_warning(const math::Color &color)
+ {
+ palette_warning.assign(color);
}
- inline const math::Color &text() const {
- return palette_text;
+ /// set error text color
+ inline void set_error(const math::Color &color)
+ {
+ palette_error.assign(color);
+ }
+
+ /* ---- inspectors ----------------------------------------- */
+
+ /// foreground color
+ inline const math::Color &foreground() const {
+ return palette_foreground;
}
+ /// background color
inline const math::Color &background() const {
return palette_background;
}
+ /// border color
inline const math::Color &border() const {
return palette_border;
}
-
+
+ /// text color
+ inline const math::Color &text() const {
+ return palette_text;
+ }
+
+ /// highlight color
+ inline const math::Color &highlight() const {
+ return palette_highlight;
+ }
+
+ /// pointer color
inline const math::Color &pointer() const {
return palette_pointer;
}
+ /// active pointer color
inline const math::Color &active() const {
return palette_active;
}
+ /// debug color
inline const math::Color &debug() const {
return palette_debug;
}
+ /// mission color
+ inline const math::Color &mission() const {
+ return palette_mission;
+ }
+
+ /// bold text color
+ inline const math::Color &bold() const {
+ return palette_bold;
+ }
+
+ /// fancy text color
+ inline const math::Color &fancy() const {
+ return palette_fancy;
+ }
+
+ /// warning text color
+ inline const math::Color &warning() const {
+ return palette_warning;
+ }
+
+ /// error text color
+ inline const math::Color &error() const {
+ return palette_error;
+ }
+
+ // indexed color
const math::Color &color(Palette::Color palettecolor) const;
private:
-
+ // UI colors
math::Color palette_foreground;
- math::Color palette_highlight;
math::Color palette_background;
+ math::Color palette_border;
+ math::Color palette_text;
+ math::Color palette_highlight;
math::Color palette_pointer;
math::Color palette_active;
- math::Color palette_border;
math::Color palette_debug;
- math::Color palette_text;
+
+ // HUD colors
+ math::Color palette_mission;
+
+ // additional text colors
+ math::Color palette_bold;
+ math::Color palette_fancy;
+ math::Color palette_warning;
+ math::Color palette_error;
};
}