diff options
author | Stijn Buys <ingar@osirion.org> | 2010-09-19 19:44:13 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-09-19 19:44:13 +0000 |
commit | cc18095cded14f5e7e3f049e47fca2224134b647 (patch) | |
tree | 2a057f4836925083a19988d571dc0664925c9e48 /src/ui/paint.h | |
parent | badfb31888a6bd62e0a019b3f3dec517df4121ec (diff) |
text rendering cleanups, inventory capacity & cargo volume
Diffstat (limited to 'src/ui/paint.h')
-rw-r--r-- | src/ui/paint.h | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/ui/paint.h b/src/ui/paint.h index 1d28574..2c48a35 100644 --- a/src/ui/paint.h +++ b/src/ui/paint.h @@ -9,46 +9,46 @@ #include "ui/widget.h" -namespace ui -{ - -/// low-level widget paint functions -namespace paint -{ +namespace ui { -/// assign system colors -void assign_color(const char c, const math::Color &color); +/** + * @brief low-level widget paint functions + * This class contains the interface between the user interface and the render library + */ -/// set paint color -void color(float r = 0.0f, float g = 0.0f, float b = 0.0f, float a = 1.0f); - -/// set paint color -void color(math::Color const & color); +class Paint +{ +public: + /// set paint color to RGB value + static void set_color(float r = 0.0f, float g = 0.0f, float b = 0.0f, float a = 1.0f); -/// set paint color -void color_code(const char c); + /// set paint color to RGB value + static void set_color(math::Color const & color); -/// draw a border -void border(const math::Vector2f &location, const math::Vector2f &size); + /// set paint color to system color code + static void set_system_color(const char c); -/// draw a rectangle -void rectangle(const math::Vector2f &location, const math::Vector2f &size); + /// assign system color code + static void assign_system_color(const char c, const math::Color &color); -/// draw a rectangular bitmap -void bitmap(const math::Vector2f &location, const math::Vector2f &size, std::string const &texture); + /// draw a border + static void draw_border(const math::Vector2f &global_location, const math::Vector2f &size); -/// draw aligned text -void label(const math::Vector2f &location, const math::Vector2f &size, const Font *font, const std::string &text, unsigned int align = AlignCenter); + /// draw a rectangle + static void draw_rectangle(const math::Vector2f &global_location, const math::Vector2f &size); -/// draw unaligned text -void text(const math::Vector2f &location, const math::Vector2f &size, const Font *font, const std::string &text); + /// draw a rectangular bitmap + static void draw_bitmap(const math::Vector2f &global_location, const math::Vector2f &size, const std::string &texture); -/// draw unaligned text -void text(const math::Vector2f &location, const math::Vector2f &size, const Font *font, std::stringstream & textstream); + /// draw unaligned text + static void draw_text(const math::Vector2f &global_location, const Font *font, const std::string &text); + + /// draw aligned text + static void draw_label(const math::Vector2f &global_location, const math::Vector2f &size, const Font *font, const std::string &text, const unsigned int alignment = AlignCenter); -} +}; -} +} // namespace ui #endif // __INCLUDED_UI_PAINT_H__ |