void ActiveWindow::Draw() { int w = rect.w; int h = rect.h; if (w < 1 || h < 1 || !shown) return; float old_alpha = alpha; if (!enabled) SetAlpha(0.5); if (!transparent) { if (texture && texture->Width()) { DrawTextureGrid(); } else { FillRect(0, 0, w, h, ShadeColor(back_color, 1.0)); } } if (enabled && view_list.size()) { ListIter<View> v = view_list; while (++v) v->Refresh(); } if (!transparent) { DrawStyleRect(0, 0, w, h, style); } // draw text here: DrawTabbedText(); if (!enabled) SetAlpha(old_alpha); // update children windows: ListIter<ActiveWindow> iter = children; while (++iter) { ActiveWindow* child = iter.value(); child->Draw(); } }