Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation further to lifecycle v25.06 #147

Merged
merged 10 commits into from
Feb 13, 2025
5 changes: 3 additions & 2 deletions SofaGLFW/src/SofaGLFW/SofaGLFWBaseGUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <sofa/helper/system/FileRepository.h>
#include <sofa/helper/system/FileSystem.h>
#include <sofa/core/visual/VisualParams.h>
#include <sofa/core/objectmodel/BaseClassNameHelper.h>
#include <sofa/core/objectmodel/KeypressedEvent.h>
#include <sofa/core/objectmodel/KeyreleasedEvent.h>
#include <sofa/simulation/Node.h>
Expand Down Expand Up @@ -520,11 +521,11 @@ void SofaGLFWBaseGUI::initVisual()
if (!visualStyle)
{
visualStyle = sofa::core::objectmodel::New<VisualStyle>();
visualStyle->setName(helper::NameDecoder::getShortName<decltype(visualStyle.get())>());
visualStyle->setName(sofa::core::objectmodel::BaseClassNameHelper::getShortName<decltype(visualStyle.get())>());

DisplayFlags* displayFlags = visualStyle->d_displayFlags.beginEdit();
displayFlags->setShowVisualModels(tristate::true_value);
visualStyle->displayFlags.endEdit();
visualStyle->d_displayFlags.endEdit();

m_groot->addObject(visualStyle);
visualStyle->init();
Expand Down
4 changes: 2 additions & 2 deletions SofaGLFW/src/SofaGLFW/SofaGLFWGUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ void SofaGLFWGUI::centerWindow()

void SofaGLFWGUI::setViewerConfiguration(sofa::component::setting::ViewerSetting* viewerConf)
{
const type::Vec<2, int>& res = viewerConf->resolution.getValue();
const type::Vec<2, int>& res = viewerConf->d_resolution.getValue();

if (viewerConf->fullscreen.getValue())
if (viewerConf->d_fullscreen.getValue())
{
m_bCreateWithFullScreen = true;
}
Expand Down
2 changes: 1 addition & 1 deletion SofaImGui/src/SofaImGui/ImGuiGUIEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void ImGuiGUIEngine::init()
ini.SetUnicode();
if (sofa::helper::system::FileSystem::exists(sofaimgui::AppIniFile::getAppIniFile()))
{
SI_Error rc = ini.LoadFile(sofaimgui::AppIniFile::getAppIniFile().c_str());
[[maybe_unused]] SI_Error rc = ini.LoadFile(sofaimgui::AppIniFile::getAppIniFile().c_str());
assert(rc == SI_OK);
}

Expand Down
3 changes: 2 additions & 1 deletion SofaImGui/src/SofaImGui/windows/Plugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <SofaImGui/ImGuiGUIEngine.h>
#include <SofaGLFW/SofaGLFWBaseGUI.h>
#include <sofa/core/loader/SceneLoader.h>
#include <sofa/core/ObjectFactory.h>
#include <sofa/simulation/SceneLoaderFactory.h>
#include <sofa/helper/system/FileSystem.h>
#include <sofa/simulation/Simulation.h>
Expand Down Expand Up @@ -98,7 +99,7 @@ namespace windows
ImGui::TextWrapped("%s", pluginIt->second.getModuleDescription());
ImGui::Spacing();
ImGui::TextDisabled("Components:");
ImGui::TextWrapped("%s", pluginIt->second.getModuleComponentList());
ImGui::TextWrapped("%s", sofa::core::ObjectFactory::getInstance()->listClassesFromTarget(pluginIt->second.getModuleName()).c_str());
ImGui::Spacing();
ImGui::TextDisabled("Path:");
ImGui::TextWrapped("%s", selectedPlugin.c_str());
Expand Down
2 changes: 1 addition & 1 deletion SofaImGui/src/SofaImGui/windows/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace windows
sofaimgui::setStyle(sofaimgui::listStyles[styleCurrent]);
const auto style = sofaimgui::listStyles[styleCurrent];
ini.SetValue("Style", "theme", style, sofaimgui::ini::styleDescription);
SI_Error rc = ini.SaveFile(sofaimgui::AppIniFile::getAppIniFile().c_str());
[[maybe_unused]] SI_Error rc = ini.SaveFile(sofaimgui::AppIniFile::getAppIniFile().c_str());
}
if (isSelected)
ImGui::SetItemDefaultFocus();
Expand Down
5 changes: 3 additions & 2 deletions exe/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ int main(int argc, char** argv)
groot->get(viewerConf, sofa::core::objectmodel::BaseContext::SearchRoot);
if (viewerConf)
{
if (viewerConf->fullscreen.getValue())
if (viewerConf->d_fullscreen.getValue())
{
isFullScreen = true;
}
else
{
resolution = viewerConf->resolution.getValue();
resolution = viewerConf->d_resolution.getValue();
}
}

Expand All @@ -138,6 +138,7 @@ int main(int argc, char** argv)
if (background)
{
if (background->d_image.getValue().empty())

glfwGUI.setWindowBackgroundColor(background->d_color.getValue());
else
glfwGUI.setWindowBackgroundImage(background->d_image.getFullPath());
Expand Down
Loading