From cc18095cded14f5e7e3f049e47fca2224134b647 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 19 Sep 2010 19:44:13 +0000 Subject: text rendering cleanups, inventory capacity & cargo volume --- src/ui/paint.h | 58 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'src/ui/paint.h') 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__ -- cgit v1.2.3