summaryrefslogtreecommitdiff
path: root/src/game/GameView.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-10 13:03:23 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-10 13:03:23 (GMT)
commit810ea42f99cf9f56c1ac998ce8a203bea01e97b2 (patch)
treeb3c2bc39bfed051003a6eeab6e990e73ddad5dec /src/game/GameView.cpp
parentfd40ed234ab157c4e315cb748163969c8ff83b0f (diff)
downloadpowder-810ea42f99cf9f56c1ac998ce8a203bea01e97b2.zip
powder-810ea42f99cf9f56c1ac998ce8a203bea01e97b2.tar.gz
Only render gravity lensing if it's enabled, Ctrl and Shift to alter tool strength (Shift = x10, Ctrl = x0.1)
Diffstat (limited to 'src/game/GameView.cpp')
-rw-r--r--src/game/GameView.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp
index 9b1010d..817887e 100644
--- a/src/game/GameView.cpp
+++ b/src/game/GameView.cpp
@@ -1538,6 +1538,10 @@ void GameView::enableShiftBehaviour()
if(!shiftBehaviour)
{
shiftBehaviour = true;
+ if(!ctrlBehaviour)
+ c->SetToolStrength(10.0f);
+ else
+ c->SetToolStrength(1.0f);
}
}
@@ -1546,6 +1550,10 @@ void GameView::disableShiftBehaviour()
if(shiftBehaviour)
{
shiftBehaviour = false;
+ if(!ctrlBehaviour)
+ c->SetToolStrength(1.0f);
+ else
+ c->SetToolStrength(.1f);
}
}
@@ -1576,6 +1584,10 @@ void GameView::enableCtrlBehaviour()
saveSimulationButton->Appearance.TextInactive = ui::Colour(0, 0, 0);
searchButton->Appearance.BackgroundInactive = ui::Colour(255, 255, 255);
searchButton->Appearance.TextInactive = ui::Colour(0, 0, 0);
+ if(!shiftBehaviour)
+ c->SetToolStrength(.1f);
+ else
+ c->SetToolStrength(1.0f);
}
}
@@ -1590,6 +1602,10 @@ void GameView::disableCtrlBehaviour()
saveSimulationButton->Appearance.TextInactive = ui::Colour(255, 255, 255);
searchButton->Appearance.BackgroundInactive = ui::Colour(0, 0, 0);
searchButton->Appearance.TextInactive = ui::Colour(255, 255, 255);
+ if(!shiftBehaviour)
+ c->SetToolStrength(1.0f);
+ else
+ c->SetToolStrength(10.0f);
}
}