diff --git a/src/lib/views/sunlight/include/vTitleTab.h b/src/lib/views/sunlight/include/vTitleTab.h index 17030e3..4aaea95 100644 --- a/src/lib/views/sunlight/include/vTitleTab.h +++ b/src/lib/views/sunlight/include/vTitleTab.h @@ -10,9 +10,10 @@ ogBitFont * font; std::string title; public: - vTitleTab(vContext *); - void SetTitle(const std::string); - virtual ~vTitleTab(void); + vTitleTab(vContext *); + virtual void Draw(void); + void SetTitle(const std::string); + virtual ~vTitleTab(void); }; // vTitleTab #endif diff --git a/src/lib/views/sunlight/vTitleTab.cpp b/src/lib/views/sunlight/vTitleTab.cpp index 22a6037..e1864e3 100644 --- a/src/lib/views/sunlight/vTitleTab.cpp +++ b/src/lib/views/sunlight/vTitleTab.cpp @@ -23,6 +23,22 @@ } // vTitleTab::vTitleTab void +vTitleTab::Draw(void) { + ogPoint2d points[4]; + sBGColor * BGColor = NULL; + BGColor = dynamic_cast(GetStyle("passive title color")); + if (NULL == BGColor) return; + + points[0].x = points[0].y = points[1].y = points[3].x = 0; + points[1].x = points[2].x = GetMaxX()+1; + points[2].y = points[3].y = GetMaxY(); + + FillGouraudPolygon(4, points, BGColor->colors); + font->JustifyText(*this, centerText, centerText, title.c_str()); + return; +} // vTitleTab::Draw() + +void vTitleTab::SetTitle(const std::string newTitle) { title = newTitle; return;