diff --git a/modules/iswa/util/iswamanager.h b/modules/iswa/util/iswamanager.h index f15d69db5b..06f42ebad0 100644 --- a/modules/iswa/util/iswamanager.h +++ b/modules/iswa/util/iswamanager.h @@ -25,15 +25,16 @@ #define __ISWAMANAGER_H__ #include + #include #include -#include #include +#include +#include #include #include #include #include - // #include // #include @@ -97,6 +98,8 @@ private: std::map _geom; std::map> _groups; + + std::shared_ptr _kameleon; }; } //namespace openspace diff --git a/modules/onscreengui/include/guiiswacomponent.h b/modules/onscreengui/include/guiiswacomponent.h new file mode 100644 index 0000000000..7b90a7baf4 --- /dev/null +++ b/modules/onscreengui/include/guiiswacomponent.h @@ -0,0 +1,41 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2016 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ + +#ifndef __GUIISWACOMPONENT_H__ +#define __GUIISWACOMPONENT_H__ + +#include + +namespace openspace { +namespace gui { + +class GuiISWAComponent : public GuiComponent { +public: + void render(); +}; + +} // namespace gui +} // namespace openspace + +#endif // __GUIISWACOMPONENT_H__ diff --git a/modules/onscreengui/src/gui.cpp b/modules/onscreengui/src/gui.cpp index 959974e597..bb05decbe5 100644 --- a/modules/onscreengui/src/gui.cpp +++ b/modules/onscreengui/src/gui.cpp @@ -36,8 +36,7 @@ #include #include #include -#include - +// #include #include #include @@ -297,10 +296,10 @@ void GUI::endFrame() { if (_property.isEnabled()) _property.render(); - if (_iSWAproperty.isEnabled()) - _iSWAproperty.render(); if (_screenSpaceProperty.isEnabled()) _screenSpaceProperty.render(); + if (_iSWAproperty.isEnabled()) + _iSWAproperty.render(); if (_performance.isEnabled()) _performance.render(); if (_help.isEnabled()) @@ -434,15 +433,13 @@ void GUI::renderMainWindow() { } #ifdef OPENSPACE_MODULE_ISWA_ENABLED - if(ISWAManager::isInitialized()){ static const int addCygnetBufferSize = 256; static char addCygnetBuffer[addCygnetBufferSize]; ImGui::InputText("addCynget", addCygnetBuffer, addCygnetBufferSize); - if(ImGui::SmallButton("Add Cygnet")){ + if(ImGui::SmallButton("Add Cygnet")) OsEng.scriptEngine().queueScript("openspace.iswa.addCygnet('"+std::string(addCygnetBuffer)+"');"); - } - } + #endif ImGui::End(); diff --git a/modules/onscreengui/src/guiiswacomponent.cpp b/modules/onscreengui/src/guiiswacomponent.cpp new file mode 100644 index 0000000000..2b9f5043de --- /dev/null +++ b/modules/onscreengui/src/guiiswacomponent.cpp @@ -0,0 +1,43 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2016 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ + +#include + +#include "imgui.h" + +namespace { + const ImVec2 size = ImVec2(350, 500); +} + +namespace openspace { +namespace gui { + +void GuiHelpComponent::render() { + ImGui::Begin("ISWA", &_isEnabled, size, 0.5f); + ImGui::ShowUserGuide(); + ImGui::End(); +} + +} // gui +} // openspace \ No newline at end of file diff --git a/modules/onscreengui/src/guipropertycomponent.cpp b/modules/onscreengui/src/guipropertycomponent.cpp index d7d96c39cc..708d3e31b9 100644 --- a/modules/onscreengui/src/guipropertycomponent.cpp +++ b/modules/onscreengui/src/guipropertycomponent.cpp @@ -514,22 +514,22 @@ void GuiPropertyComponent::handleProperty(const ghoul::Dictionary& dictionary) { void GuiPropertyComponent::render() { ImGui::Begin("Properties", &_isEnabled, size, 0.5f); - if (ImGui::CollapsingHeader("OnScreen GUI")) { - glm::vec2& pos = OsEng.renderEngine()._onScreenInformation._position; - Vec2Property::ValueType value = pos; - ImGui::SliderFloat2("Position", &value.x, -1.f, 1.f); - pos = value; + // if (ImGui::CollapsingHeader("OnScreen GUI")) { + // glm::vec2& pos = OsEng.renderEngine()._onScreenInformation._position; + // Vec2Property::ValueType value = pos; + // ImGui::SliderFloat2("Position", &value.x, -1.f, 1.f); + // pos = value; - unsigned int& size = OsEng.renderEngine()._onScreenInformation._size; - int sizeValue = static_cast(size); - ImGui::SliderInt("Size", &sizeValue, 0, 36); - size = static_cast(sizeValue); + // unsigned int& size = OsEng.renderEngine()._onScreenInformation._size; + // int sizeValue = static_cast(size); + // ImGui::SliderInt("Size", &sizeValue, 0, 36); + // size = static_cast(sizeValue); - int& node = OsEng.renderEngine()._onScreenInformation._node; - int iValue = node; - ImGui::SliderInt("Node#", &iValue, 0, 30); - node = iValue; - } + // int& node = OsEng.renderEngine()._onScreenInformation._node; + // int iValue = node; + // ImGui::SliderInt("Node#", &iValue, 0, 30); + // node = iValue; + // } ImGui::Spacing();