diff options
author | Victor Vieux <victorvieux@gmail.com> | 2014-10-21 21:44:17 -0700 |
---|---|---|
committer | Victor Vieux <victorvieux@gmail.com> | 2014-10-21 21:44:17 -0700 |
commit | d019a4990f2e2da71555daf085a3e09c92085fa5 (patch) | |
tree | c64ef2254a9ecc2e4b0dcfecab30d045d5567281 /src/ui | |
parent | d9fee8b2adad613cf8c10d153cd5cd7b261b7863 (diff) | |
download | colobot-d019a4990f2e2da71555daf085a3e09c92085fa5.tar.gz colobot-d019a4990f2e2da71555daf085a3e09c92085fa5.tar.bz2 colobot-d019a4990f2e2da71555daf085a3e09c92085fa5.zip |
add option to disable blood
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/maindialog.cpp | 23 | ||||
-rw-r--r-- | src/ui/maindialog.h | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/ui/maindialog.cpp b/src/ui/maindialog.cpp index 11f8f4a..f63d22e 100644 --- a/src/ui/maindialog.cpp +++ b/src/ui/maindialog.cpp @@ -162,6 +162,7 @@ CMainDialog::CMainDialog() m_bCameraInvertX = false; m_bCameraInvertY = false; m_bEffect = true; + m_bBlood = true; m_shotDelay = 0; m_glintMouse = Math::Point(0.0f, 0.0f); @@ -1223,6 +1224,9 @@ void CMainDialog::ChangePhase(Phase phase) pos.y -= 0.048f; pc = pw->CreateCheck(pos, ddim, -1, EVENT_INTERFACE_EFFECT); pc->SetState(STATE_SHADOW); + pos.y -= 0.048f; + pc = pw->CreateCheck(pos, ddim, -1, EVENT_INTERFACE_BLOOD); + pc->SetState(STATE_SHADOW); //? pos.y -= 0.048f; //? pc = pw->CreateCheck(pos, ddim, -1, EVENT_INTERFACE_NICERST); //? pc->SetState(STATE_SHADOW); @@ -2554,6 +2558,13 @@ bool CMainDialog::EventProcess(const Event &event) UpdateSetupButtons(); break; + case EVENT_INTERFACE_BLOOD: + m_bBlood = !m_bBlood; + m_camera->SetBlood(m_bBlood); + ChangeSetupButtons(); + UpdateSetupButtons(); + break; + default: break; } @@ -5011,6 +5022,12 @@ void CMainDialog::UpdateSetupButtons() pc->SetState(STATE_CHECK, m_bEffect); } + pc = static_cast<CCheck*>(pw->SearchControl(EVENT_INTERFACE_BLOOD)); + if ( pc != 0 ) + { + pc->SetState(STATE_CHECK, m_bBlood); + } + pc = static_cast<CCheck*>(pw->SearchControl(EVENT_INTERFACE_SHADOW)); if ( pc != 0 ) { @@ -5198,6 +5215,7 @@ void CMainDialog::SetupMemorize() GetProfile().SetLocalProfileInt("Setup", "CameraInvertX", m_bCameraInvertX); GetProfile().SetLocalProfileInt("Setup", "CameraInvertY", m_bCameraInvertY); GetProfile().SetLocalProfileInt("Setup", "InterfaceEffect", m_bEffect); + GetProfile().SetLocalProfileInt("Setup", "Blood", m_bBlood); GetProfile().SetLocalProfileInt("Setup", "GroundShadow", m_engine->GetShadow()); GetProfile().SetLocalProfileInt("Setup", "GroundSpot", m_engine->GetGroundSpot()); GetProfile().SetLocalProfileInt("Setup", "ObjectDirty", m_engine->GetDirty()); @@ -5356,6 +5374,11 @@ void CMainDialog::SetupRecall() m_bEffect = iValue; } + if ( GetProfile().GetLocalProfileInt("Setup", "Blood", iValue) ) + { + m_bBlood = iValue; + } + if ( GetProfile().GetLocalProfileInt("Setup", "GroundShadow", iValue) ) { m_engine->SetShadow(iValue); diff --git a/src/ui/maindialog.h b/src/ui/maindialog.h index 444a568..0ab7897 100644 --- a/src/ui/maindialog.h +++ b/src/ui/maindialog.h @@ -244,6 +244,7 @@ protected: bool m_bCameraInvertX; // for CCamera bool m_bCameraInvertY; // for CCamera bool m_bEffect; // for CCamera + bool m_bBlood; // for CCamera Math::Point m_glintMouse; float m_glintTime; |