|
|
|
@ -59,7 +59,6 @@ namespace MWGui
|
|
|
|
|
getWidget(mTabConfiguration, "TabConfiguration");
|
|
|
|
|
getWidget(mActiveList, "ActiveList");
|
|
|
|
|
getWidget(mInactiveList, "InactiveList");
|
|
|
|
|
getWidget(mModeToggle, "ModeToggle");
|
|
|
|
|
getWidget(mConfigLayout, "ConfigLayout");
|
|
|
|
|
getWidget(mFilter, "Filter");
|
|
|
|
|
getWidget(mButtonActivate, "ButtonActivate");
|
|
|
|
@ -78,8 +77,6 @@ namespace MWGui
|
|
|
|
|
mActiveList->eventListChangePosition += MyGUI::newDelegate(this, &PostProcessorHud::notifyListChangePosition);
|
|
|
|
|
mInactiveList->eventListChangePosition += MyGUI::newDelegate(this, &PostProcessorHud::notifyListChangePosition);
|
|
|
|
|
|
|
|
|
|
mModeToggle->eventMouseButtonClick += MyGUI::newDelegate(this, &PostProcessorHud::notifyModeToggle);
|
|
|
|
|
|
|
|
|
|
mFilter->eventEditTextChange += MyGUI::newDelegate(this, &PostProcessorHud::notifyFilterChanged);
|
|
|
|
|
|
|
|
|
|
mMainWidget->castType<MyGUI::Window>()->eventWindowChangeCoord += MyGUI::newDelegate(this, &PostProcessorHud::notifyWindowResize);
|
|
|
|
@ -91,10 +88,14 @@ namespace MWGui
|
|
|
|
|
mShaderInfo->setEditReadOnly(true);
|
|
|
|
|
mShaderInfo->setEditWordWrap(true);
|
|
|
|
|
mShaderInfo->setEditMultiLine(true);
|
|
|
|
|
mShaderInfo->setNeedMouseFocus(false);
|
|
|
|
|
|
|
|
|
|
mConfigLayout->setVisibleVScroll(true);
|
|
|
|
|
|
|
|
|
|
mConfigArea = mConfigLayout->createWidget<MyGUI::Widget>("", {}, MyGUI::Align::Default);
|
|
|
|
|
|
|
|
|
|
mConfigLayout->eventMouseWheel += MyGUI::newDelegate(this, &PostProcessorHud::notifyMouseWheel);
|
|
|
|
|
mConfigArea->eventMouseWheel += MyGUI::newDelegate(this, &PostProcessorHud::notifyMouseWheel);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PostProcessorHud::notifyFilterChanged(MyGUI::EditBox* sender)
|
|
|
|
@ -225,12 +226,6 @@ namespace MWGui
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PostProcessorHud::notifyModeToggle(MyGUI::Widget* sender)
|
|
|
|
|
{
|
|
|
|
|
Settings::ShaderManager::Mode prev = Settings::ShaderManager::get().getMode();
|
|
|
|
|
toggleMode(prev == Settings::ShaderManager::Mode::Debug ? Settings::ShaderManager::Mode::Normal : Settings::ShaderManager::Mode::Debug);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PostProcessorHud::onOpen()
|
|
|
|
|
{
|
|
|
|
|
toggleMode(Settings::ShaderManager::Mode::Debug);
|
|
|
|
@ -267,6 +262,15 @@ namespace MWGui
|
|
|
|
|
mConfigLayout->setSize(mConfigLayout->getWidth(), mConfigLayout->getParentSize().height - padding2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PostProcessorHud::notifyMouseWheel(MyGUI::Widget *sender, int rel)
|
|
|
|
|
{
|
|
|
|
|
int offset = mConfigLayout->getViewOffset().top + rel * 0.3;
|
|
|
|
|
if (offset > 0)
|
|
|
|
|
mConfigLayout->setViewOffset(MyGUI::IntPoint(0, 0));
|
|
|
|
|
else
|
|
|
|
|
mConfigLayout->setViewOffset(MyGUI::IntPoint(0, static_cast<int>(offset)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PostProcessorHud::select(ListWrapper* list, size_t index)
|
|
|
|
|
{
|
|
|
|
|
list->setIndexSelected(index);
|
|
|
|
@ -277,8 +281,6 @@ namespace MWGui
|
|
|
|
|
{
|
|
|
|
|
Settings::ShaderManager::get().setMode(mode);
|
|
|
|
|
|
|
|
|
|
mModeToggle->setCaptionWithReplacing(mode == Settings::ShaderManager::Mode::Debug ? "#{sOn}" :"#{sOff}");
|
|
|
|
|
|
|
|
|
|
MWBase::Environment::get().getWorld()->getPostProcessor()->toggleMode();
|
|
|
|
|
|
|
|
|
|
if (!isVisible())
|
|
|
|
@ -353,6 +355,7 @@ namespace MWGui
|
|
|
|
|
MyGUI::Button* resetButton = mConfigArea->createWidget<MyGUI::Button>("MW_Button", {0,0,0,24}, MyGUI::Align::Default);
|
|
|
|
|
resetButton->setCaption("Reset all to default");
|
|
|
|
|
resetButton->setTextAlign(MyGUI::Align::Center);
|
|
|
|
|
resetButton->eventMouseWheel += MyGUI::newDelegate(this, &PostProcessorHud::notifyMouseWheel);
|
|
|
|
|
resetButton->eventMouseButtonClick += MyGUI::newDelegate(this, &PostProcessorHud::notifyResetButtonClicked);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -366,6 +369,7 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
fx::Widgets::UniformBase* uwidget = mConfigArea->createWidget<fx::Widgets::UniformBase>("MW_UniformEdit", {0,0,0,22}, MyGUI::Align::Default);
|
|
|
|
|
uwidget->init(uniform);
|
|
|
|
|
uwidget->getLabel()->eventMouseWheel += MyGUI::newDelegate(this, &PostProcessorHud::notifyMouseWheel);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|