Ejemplo n.º 1
0
void
Window::Draw()
{
	if(m_Decorated)
	{
		abGui->drawGradientRect(m_PosX - 1, m_PosY - 15, m_PosX + m_SizeX + 1, m_PosY, 
						0x333333, 0x0A0A0A, false);
		abGui->drawRect(m_PosX - 1, m_PosY - 15, m_SizeX + m_PosX + 1, 
						m_SizeY + m_PosY + 1, 0x111111, false);
		abGui->drawLine(m_PosX, m_PosY - 1, m_SizeX + m_PosX, m_PosY - 1, 0x111111);	
		abGui->drawLine(m_PosX + m_SizeX - 15, m_PosY - 15, m_SizeX + m_PosX - 15, 
						m_PosY, 0x111111);
		abGui->drawText("x", m_PosX + m_SizeX - 10, m_PosY - 13, 0xFFFFFF);
		abGui->drawText(m_Title, m_PosX + 10, m_PosY - 12, 0xFFFFFF);
	}
	
	abGui->drawRect(m_PosX, m_PosY, m_SizeX + m_PosX, 
						m_SizeY + m_PosY, abGui->guiTheme->WindowBackgroundColor, true);
	

	Widget *w = m_WidgetList->getNode(0);
	while(w != NULL)
	{
		w->Draw();
		w = w->Next;
	}
}
Ejemplo n.º 2
0
void Window::Draw( void ) {
  DrawBack();

  Widget *wd = widgets;
  while ( wd ) {
    if ( !wd->Hidden() ) wd->Draw();
    wd = wd->next;
  }
}
Ejemplo n.º 3
0
//---------------------------------------
void Widget::OnDraw( const Camera& camera )
{
	// Update the draw order of all children (if necessary).
	UpdateDrawOrder();

	for( auto layerIt = mChildrenByDrawLayer.begin(); layerIt != mChildrenByDrawLayer.end(); ++layerIt )
	{
		const std::vector< Widget* > layer = layerIt->second;

		for( auto childIt = layer.begin(); childIt != layer.end(); ++childIt )
		{
			// Draw all children in order of their draw layer.
			Widget* child = ( *childIt );
			child->Draw( camera );
		}
	}
}