Add ctrl+e shortcut to cycle through edge modes
This commit is contained in:
parent
29ea811642
commit
fde1211cd9
@ -82,6 +82,7 @@ Controls
|
||||
| I | Invert Pressure and Velocity map |
|
||||
| W | Cycle gravity modes (use with Ctrl when STK2 is out) |
|
||||
| Y | Cycle air modes |
|
||||
| Ctrl + E | Cycle edge modes |
|
||||
| B | Enter decoration editor menu |
|
||||
| Ctrl + B | Toggle decorations on/off |
|
||||
| N | Toggle Newtonian Gravity on/off |
|
||||
|
@ -1012,6 +1012,32 @@ int GameController::GetTemperatureScale()
|
||||
return gameModel->GetTemperatureScale();
|
||||
}
|
||||
|
||||
int GameController::GetEdgeMode()
|
||||
{
|
||||
return gameModel->GetEdgeMode();
|
||||
}
|
||||
|
||||
void GameController::SetEdgeMode(int edgeMode)
|
||||
{
|
||||
if (edgeMode < 0 || edgeMode >= NUM_EDGE_MODES)
|
||||
edgeMode = 0;
|
||||
|
||||
gameModel->SetEdgeMode(edgeMode);
|
||||
|
||||
switch (edgeMode)
|
||||
{
|
||||
case EDGE_VOID:
|
||||
gameModel->SetInfoTip("Edge Mode: Void");
|
||||
break;
|
||||
case EDGE_SOLID:
|
||||
gameModel->SetInfoTip("Edge Mode: Solid");
|
||||
break;
|
||||
case EDGE_LOOP:
|
||||
gameModel->SetInfoTip("Edge Mode: Loop");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void GameController::SetActiveColourPreset(int preset)
|
||||
{
|
||||
gameModel->SetActiveColourPreset(preset);
|
||||
|
@ -116,6 +116,8 @@ public:
|
||||
bool GetDebugHUD();
|
||||
void SetTemperatureScale(int temperatureScale);
|
||||
int GetTemperatureScale();
|
||||
int GetEdgeMode();
|
||||
void SetEdgeMode(int edgeMode);
|
||||
void SetDebugFlags(unsigned int flags) { debugFlags = flags; }
|
||||
void SetActiveMenu(int menuID);
|
||||
std::vector<Menu*> GetMenuList();
|
||||
|
@ -1427,7 +1427,10 @@ void GameView::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl,
|
||||
c->ReloadSim();
|
||||
break;
|
||||
case SDL_SCANCODE_E:
|
||||
c->OpenElementSearch();
|
||||
if (ctrl)
|
||||
c->SetEdgeMode(c->GetEdgeMode() + 1);
|
||||
else
|
||||
c->OpenElementSearch();
|
||||
break;
|
||||
case SDL_SCANCODE_F:
|
||||
if (ctrl)
|
||||
|
Loading…
Reference in New Issue
Block a user