void showWindowAt(int x, int y)
	{
		window->MoveTo(x - 5, y - 5);
		window->Show();
		isVisible = true;
		closedAck = false;

		if (game::SimpleOptions::getBool(DH_OPT_B_MENU_AUTOPAUSE))
		{
			// Pause game
			if(!game.isTacticalMode())
			{
				gameWasRunning = true;
				game.gameUI->setPointersChangedFlag(game.singlePlayerNumber);
			}
			else
				gameWasRunning = false;

			game.setTacticalMode(true);
		}

		// TODO: client number
		game::SceneSelection *sel = game.gameUI->getSceneSelection(0);

		clickPosition = VC3(sel->scaledMapX, 
			game.gameMap->getScaledHeightAt(sel->scaledMapX, sel->scaledMapY), 
			sel->scaledMapY);

		if (game::SimpleOptions::getBool(DH_OPT_B_MENU_TWO_CLICK))
		{
			// TODO: correct player...
			if (sel->unit != NULL
				&& sel->unit->visibility.isSeenByPlayer(game.singlePlayerNumber))
			{
				game.gameUI->setUnitHighlight(game.singlePlayerNumber, sel->unit);
			} else {
				game.gameUI->setTerrainHighlight(game.singlePlayerNumber, clickPosition);
			}
			game.gameUI->lockHighlight(game.singlePlayerNumber);
		}
	}
Esempio n. 2
0
	void show()
	{
		background->Show();
		if( activeMenu ) activeMenu->show();
		foreground->Show();
	}