void MechPurchaseScreen::endDrag( )
{
	if ( pDragMech )
	{
	
		if ( inventoryListBox.pointInside( userInput->getMouseX(),
			userInput->getMouseY() ) )
		{
			if ( !dragStartLeft )
			{
				addMech( pDragMech );
			}
		}
		else
		{
			if ( dragStartLeft )
				removeMech( pDragMech );
		}
	}

	inventoryListBox.undimAll();
	variantListBox.undimAll();

	pDragMech = NULL;
}
void MechPurchaseScreen::removeSelectedMech()
{
	LogisticsMech* pMech = inventoryListBox.getCurrentMech();
	if(pMech)
	{
		removeMech(pMech);
	}
}
Example #3
0
void InfoBar::initSettings()
{
	setMouseTracking(true);
	setVisible(false);
	setEnabled(false);
	setFeatures(0);
	setMaximumSize(MAXIMUM_WIDTH, MAXIMUM_HEIGHT);
	setMinimumSize(MINIMUM_WIDTH, MINIMUM_HEIGHT);
	setContentsMargins(0, 0, 0, 0);
	removeMech();
	tX = -MAXIMUM_WIDTH;
}