Beispiel #1
0
void
FieldView::InvokeTile(const IntPoint &tilePt, uint32 button)
{
	if (tilePt.x >= fField->Width() || tilePt.y >= fField->Height())
		return;

	if (gGameState == GAME_OVER)
		return;

	fMainWin->SetFace(FACE_NORMAL);

	if (button & B_PRIMARY_MOUSE_BUTTON)
	{
		int32 mod = modifiers();

		if ( (button & B_SECONDARY_MOUSE_BUTTON) || (mod & B_SHIFT_KEY) )
			NumberReveal(tilePt);
		else if (mod & B_COMMAND_KEY)
			DoSonar(tilePt);
		else
			ClickBox(tilePt);
	}
	else if (button == B_SECONDARY_MOUSE_BUTTON)
		ToggleBox(tilePt);
	else if (button == B_TERTIARY_MOUSE_BUTTON)
		DoSonar(tilePt);
}
Beispiel #2
0
//
// Execution at 1hz inside RenderMapWindow
//
void MapWindow::DrawFunctions1HZ(HDC hDC, const RECT rc) {

  ONEHZLIMITER;

  DrawLKAlarms(hDC, rc);
  DrawFDRAlarms(hDC, rc);
  #if (WINDOWSPC<1)
  LKBatteryManager();
  #endif
  DoSonar();
}