Exemplo n.º 1
0
void ctp2_CommandLine::Draw(void)
{
	
	primitives_PaintRect16(m_surface, &m_rect, g_colorSet->GetColor(COLOR_BLACK));

	m_font->DrawString(m_surface, &m_rect, &m_rect, m_string);
}
Exemplo n.º 2
0
//----------------------------------------------------------------------------
//
// Name       : SpecialAttackWindow::DrawThis
//
// Description: Draws the tileimp tracker window
//
// Parameters : aui_Surface *surface: The surface to draw on
//              sint32 x:             The x coordinate
//              sint32 y:             The y coordinate
//
// Globals    : g_colorSet: The color set
//
// Returns    : Returns always AUI_ERRCODE_OK.
//
// Remark(s)  : -
//
//----------------------------------------------------------------------------
AUI_ERRCODE SpecialAttackWindow::DrawThis( aui_Surface *surface, sint32 x, sint32 y)
{
	if ( !surface ) surface = m_surface;

	RECT rect = { 0, 0, m_width, m_height };
	
	primitives_PaintRect16( surface, &rect, 0x0000 );
	
	C3Window::DrawThis(surface,x,y);

	primitives_FrameRect16(surface, &rect, g_colorSet->GetColor(s_saWindowBorderColor));

	return AUI_ERRCODE_OK;
}
Exemplo n.º 3
0
void LineGraph::RenderGraph(int eventsOfset)
{
	primitives_PaintRect16(m_surface, &m_surfaceRect, g_colorSet->GetColor(COLOR_BLACK));
	primitives_FrameRect16(m_surface, &m_surfaceRect, g_colorSet->GetColor(COLOR_WHITE));
	primitives_FrameRect16(m_surface, &m_graphRect, g_colorSet->GetColor(COLOR_WHITE));

	DrawThisStateImage(
		0,
		m_surface,
		&m_surfaceRect );

	LabelAxes();
	DrawLines(eventsOfset);
	if (m_hasIndicator) DrawIndicator();
}
Exemplo n.º 4
0
AUI_ERRCODE c3_ColoredStatic::DrawThis(
	aui_Surface *surface,
	sint32 x,
	sint32 y )
{
	
	if ( IsHidden() ) return AUI_ERRCODE_OK;

	if ( !surface ) surface = m_window->TheSurface();

	RECT rect = { 0, 0, m_width, m_height };
	OffsetRect( &rect, m_x + x, m_y + y );
	ToWindow( &rect );

	
	if ( m_pattern ) 
		m_pattern->Draw( surface, &rect );

	
	DrawThisStateImage(
		0,
		surface,
		&rect );

	if (m_color != COLOR_MAX) {
		primitives_PaintRect16(surface, &rect, g_colorSet->GetColor(m_color));
	}

	
	if (m_bevelWidth > 0) {
		primitives_BevelRect16( surface, &rect, m_bevelWidth, m_bevelType, 16, 16 );
	}

	
	DrawThisText(
		surface,
		&rect );

	if ( surface == m_window->TheSurface() )
		m_window->AddDirtyRect( &rect );

	return AUI_ERRCODE_OK;
}
Exemplo n.º 5
0
AUI_ERRCODE C3Slider::DrawThis( aui_Surface *surface, sint32 x, sint32 y )
{




	if ( IsHidden() ) return AUI_ERRCODE_OK;

	if ( !surface ) surface = m_window->TheSurface();

	RECT rect = { 0, 0, m_width, m_height };
	OffsetRect( &rect, m_x + x, m_y + y );
	ToWindow( &rect );

	RECT dirtyRect = rect;

	if ( m_orientation == AUI_RANGER_ORIENTATION_VERTICAL )
		InflateRect( &rect, -m_width / 2 + 8, 0 );
	else
		InflateRect( &rect, 0, -m_height / 2 + 8 );

	if ( m_pattern ) {
		if ( m_srcWidthPix || m_srcHeightPix ) {
			RECT srcRect = { m_srcX, m_srcY, m_srcX + m_srcWidthPix, m_srcY + m_srcHeightPix };
			m_pattern->Draw( surface, &dirtyRect , &srcRect );
		}
		else {
			m_pattern->Draw( surface, &dirtyRect  );
		}
	}


	if ( m_ticks && m_quantized )
	{
		if ( m_orientation == AUI_RANGER_ORIENTATION_VERTICAL )
		{
			sint32 spacing = m_height / ( m_maxY - m_minY ) - 1;
			RECT tickRect;
			for ( sint32 i = m_maxY - m_minY; i >= 0; i -= m_ticks )
			{
				tickRect.top =
					i * spacing + dirtyRect.top + m_minThumbSize / 2;
				tickRect.left = dirtyRect.left + 6;
				tickRect.bottom = tickRect.top + 3;
				tickRect.right = tickRect.left + 6;
				primitives_BevelRect16( surface, &tickRect, 1, 1, 16, 16 );
				tickRect.left = dirtyRect.right - 12;
				tickRect.right = dirtyRect.right - 6;
				primitives_BevelRect16( surface, &tickRect, 1, 1, 16, 16 );
			}
		}
		else
		{
			sint32 spacing = m_width / ( m_maxX - m_minX ) - 1;
			RECT tickRect;
			for ( sint32 i = m_maxX - m_minX; i >= 0; i -= m_ticks )
			{
				tickRect.left =
					i * spacing + dirtyRect.left + m_minThumbSize / 2;
				tickRect.top = dirtyRect.top + 6;
				tickRect.right = tickRect.left + 3;
				tickRect.bottom = tickRect.top + 6;
				primitives_BevelRect16( surface, &tickRect, 1, 1, 16, 16 );
				tickRect.top = dirtyRect.bottom - 12;
				tickRect.bottom = dirtyRect.bottom - 6;
				primitives_BevelRect16( surface, &tickRect, 1, 1, 16, 16 );
			}
		}
	}

	RECT origRect = rect;
	primitives_BevelRect16( surface, &origRect, 2, 0, 16, 16 );
	InflateRect( &rect, -4, -4 );
	primitives_BevelRect16( surface, &rect, 1, 1, 16, 16 );
	if ( IsActive() )
	{

		primitives_BevelRect16( surface, &rect, 1, 1, 16, 16 );
	}

	InflateRect( &rect, -1, -1 );
	primitives_PaintRect16( surface, &rect, 0x0000 );

	if ( surface == m_window->TheSurface() )
		m_window->AddDirtyRect( &dirtyRect );

	return AUI_ERRCODE_OK;
}