ctrl+p shortcut to select prop tool
This commit is contained in:
parent
3d66b7e263
commit
0d1c3f5f49
@ -1166,6 +1166,14 @@ void GameController::SetActiveTool(int toolSelection, Tool * tool)
|
||||
((PropertyTool *)tool)->OpenWindow(gameModel->GetSimulation());
|
||||
}
|
||||
|
||||
void GameController::SetActiveTool(int toolSelection, std::string identifier)
|
||||
{
|
||||
Tool *tool = gameModel->GetToolFromIdentifier(identifier);
|
||||
if (!tool)
|
||||
return;
|
||||
SetActiveTool(toolSelection, tool);
|
||||
}
|
||||
|
||||
void GameController::SetLastTool(Tool * tool)
|
||||
{
|
||||
gameModel->SetLastTool(tool);
|
||||
|
@ -109,6 +109,7 @@ public:
|
||||
void RebuildFavoritesMenu();
|
||||
Tool * GetActiveTool(int selection);
|
||||
void SetActiveTool(int toolSelection, Tool * tool);
|
||||
void SetActiveTool(int toolSelection, std::string identifier);
|
||||
void SetLastTool(Tool * tool);
|
||||
int GetReplaceModeFlags();
|
||||
void SetReplaceModeFlags(int flags);
|
||||
|
@ -1481,7 +1481,15 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool
|
||||
break;
|
||||
case 'p':
|
||||
case SDLK_F2:
|
||||
screenshot();
|
||||
if (ctrl)
|
||||
{
|
||||
if (shift)
|
||||
c->SetActiveTool(1, "DEFAULT_UI_PROPERTY");
|
||||
else
|
||||
c->SetActiveTool(0, "DEFAULT_UI_PROPERTY");
|
||||
}
|
||||
else
|
||||
screenshot();
|
||||
break;
|
||||
case SDLK_F3:
|
||||
SetDebugHUD(!GetDebugHUD());
|
||||
|
Loading…
Reference in New Issue
Block a user