Пример #1
0
void Console::render_private(rendering::Printer& printer)
{
	printer.set_texture(nullptr);
	printer.set_color(rendering::Color4(0.02f, 0.02f, 0.025f));

	// thing between messageviewer and inputline
	printer.set_position(get_absolute_position() + get_client_offset() + float2(0.f, message_viewer_.dimensions().y));
	printer.draw_quad(float2(get_client_size().x, 4.f));

	printer.flush(false);
}
Пример #2
0
//----------------------------------------------------------------------------------------------
// ON MOUSE LEFT DOWN
//----------------------------------------------------------------------------------------------
void cScrobMgrIm::on_mouse_left_down ( int x, int y )
{
	pHitScrob = get_hit_scrob ( x, y );

	if ( 0 == pHitScrob )
		return;

	ScrobList.remove ( pHitScrob );
	ScrobList.append ( pHitScrob );
	RECT rectHit;
	rectHit.left = pHitScrob->Pos.x;
	rectHit.top  = pHitScrob->Pos.y;
	rectHit.right = pHitScrob->Pos.x + pHitScrob->Dim.x;
	rectHit.bottom = pHitScrob->Pos.y + pHitScrob->Dim.y;
	// InvalidateRect ( hwnd, &rectHit, FALSE );
	// UpdateWindow ( hwnd );

    SetCapture(hwnd); 
 
    // Erase the image from the client area.
	// SendMessage ( hwnd, WM_SETREDRAW, 0, 0 ); // EXPERIMENTAL
    InvalidateRect ( hwnd, &rectHit, TRUE ); 
    UpdateWindow ( hwnd ); 
	// SendMessage ( hwnd, WM_SETREDRAW, 1, 0 ); // EXPERIMENTAL

	HotSpot.x = x - rectHit.left;
	HotSpot.y = y - rectHit.top;
 
	if ( ! ImageList_BeginDrag ( pHitScrob->hIL, pHitScrob->iImageIndex,  HotSpot.x, HotSpot.y ) )
	{
		pHitScrob = 0;
		ReleaseCapture();
        return;
	}

    // Set the initial location of the image, and make it visible. 
    // Because the ImageList_DragEnter function expects coordinates to 
    // be relative to the upper-left corner of the given window, the 
    // width of the border, title bar, and menu bar need to be taken 
    // into account. 

	get_client_offset ( &ClientOffset, hwnd );

    ImageList_DragEnter ( hwnd, x + ClientOffset.x, y + ClientOffset.y ); 

     return;
}