[Gui] Make NaviCube axis colors changeable

This commit is contained in:
Benjamin Bræstrup Sayoc
2024-10-03 22:30:45 +02:00
parent b888c2ffc0
commit f4f902e4a3
3 changed files with 33 additions and 3 deletions

View File

@@ -86,6 +86,9 @@ void View3DSettings::applySettings()
OnChange(*hGrp,"UseBackgroundColorMid");
OnChange(*hGrp,"ShowFPS");
OnChange(*hGrp,"ShowNaviCube");
OnChange(*hGrp,"AxisXColor");
OnChange(*hGrp,"AxisYColor");
OnChange(*hGrp,"AxisZColor");
OnChange(*hGrp,"UseVBO");
OnChange(*hGrp,"RenderCache");
OnChange(*hGrp,"Orthographic");
@@ -341,6 +344,11 @@ void View3DSettings::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::M
_viewer->setEnabledNaviCube(rGrp.GetBool("ShowNaviCube", true));
}
}
else if (strcmp(Reason,"AxisXColor") == 0 || strcmp(Reason,"AxisYColor") == 0 || strcmp(Reason,"AxisZColor") == 0) {
for (auto _viewer : _viewers) {
_viewer->getNaviCube()->updateColors();
}
}
else if (strcmp(Reason,"UseVBO") == 0) {
if (!ignoreVBO) {
for (auto _viewer : _viewers) {