Code:
bool CGUI::DrawWindow(CWindow* window)
{
static float rainbow;
// Main Window
Render::GradientV(window->m_x + 2, window->m_y + 2, window->m_iWidth - 4, 26, Color(24, 24, 24, 255), Color(24, 24, 24, 255));//ramka u gory menu gdzie nazwa
Render::Clear(window->m_x + 2, window->m_y + 2 + 26, window->m_iWidth - 4, window->m_iHeight - 4 - 26, Color(24, 24, 24, 255));//menu
Render::Text(window->m_x + 350, window->m_y + 8, Color(255, 255, 255, 255), Render::Fonts::MenuBold, window->Title.c_str());
//Inner
Render::Outline(window->m_x + 7, window->m_y + 1 + 26, window->m_iWidth - 4 - 10, window->m_iHeight - 2 - 6 - 26, Color(24, 24, 24, 255));
Render::Clear(window->m_x + 8, window->m_y + 1 + 27, window->m_iWidth - 4 - 12, window->m_iHeight - 2 - 8 - 26, Color(255, 255, 255, 0));
int TabCount = window->Tabs.size();
if (TabCount) // If there are some tabs
{
for (int i = 0; i < TabCount; i++)
{
RECT TabArea = { window->m_x, window->m_y + UI_WIN_TITLEHEIGHT + UI_WIN_TOPHEIGHT + (i*UI_TAB_HEIGHT) , UI_TAB_WIDTH, UI_TAB_HEIGHT };
CTab *tab = window->Tabs[i];
Color txtColor = Color(229, 229, 229, 255);
if (window->SelectedTab == tab)
{
// Selected
txtColor = Color(255, 0, 0, 255);
}
else if (IsMouseInRegion(TabArea))
{
// Hover
txtColor = Color(0, 83, 0, 255);
}
Render::Text(TabArea.left + 32, TabArea.top + 8, txtColor, Render::Fonts::MenuBold, tab->Title.c_str());
Render::DrawRectRainbow(window->m_x + 13.5, window->m_y + 1 + 27, window->m_iWidth - 4 - 12, 2, 0.003f, rainbow);
}
}
maybe this will help