Moved getShadowEnabled out of Menu

Moved to Application
This commit is contained in:
Atlante45 2015-01-18 05:52:19 -08:00
parent df69466887
commit 488d8a03d5
3 changed files with 5 additions and 9 deletions

View file

@ -664,7 +664,7 @@ void Application::paintGL() {
_myCamera.update(1.0f / _fps);
}
if (Menu::getInstance()->getShadowsEnabled()) {
if (getShadowsEnabled()) {
updateShadowMap();
}
@ -2956,8 +2956,10 @@ void Application::computeOffAxisFrustum(float& left, float& right, float& bottom
}
}
bool Application::getShadowsEnabled() {
return Menu::getInstance()->getShadowsEnabled();
bool Application::getShadowsEnabled() {
Menu* menubar = Menu::getInstance();
return menubar->isOptionChecked(MenuOption::SimpleShadows) ||
menubar->isOptionChecked(MenuOption::CascadedShadows);
}
bool Application::getCascadeShadowsEnabled() {

View file

@ -1090,10 +1090,6 @@ void Menu::showEditEntitiesHelp() {
InfoView::forcedShow(INFO_EDIT_ENTITIES_PATH);
}
bool Menu::getShadowsEnabled() const {
return isOptionChecked(MenuOption::SimpleShadows) || isOptionChecked(MenuOption::CascadedShadows);
}
void Menu::bumpSettings() {
Application::getInstance()->bumpSettings();
}

View file

@ -136,8 +136,6 @@ public:
const QString& getScriptsLocation() const { return _scriptsLocation; }
void setScriptsLocation(const QString& scriptsLocation);
bool getShadowsEnabled() const;
#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
SpeechRecognizer* getSpeechRecognizer() { return &_speechRecognizer; }
#endif