forked from JeanPhilippeKernel/RendererEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improving the Imgui layer abstraction (JeanPhilippeKernel#413)
* updated formatting and fixed minors issues * refactored imgui layer
- Loading branch information
1 parent
d08d098
commit 454c921
Showing
14 changed files
with
248 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +0,0 @@ | ||
#include <pch.h> | ||
#include <UIComponent.h> | ||
|
||
using namespace ZEngine; | ||
using namespace ZEngine::Helpers; | ||
|
||
namespace Tetragrama::Components | ||
{ | ||
UIComponent::UIComponent(std::string_view name, bool visibility, bool can_be_closed) : m_name(name.data()), m_visibility(visibility), m_can_be_closed(can_be_closed) {} | ||
|
||
UIComponent::UIComponent(const Ref<Layers::ImguiLayer>& layer, std::string_view name, bool visibility, bool can_be_closed) : m_parent_layer(layer), m_name(name.data()), m_visibility(visibility), m_can_be_closed(can_be_closed) {} | ||
|
||
void UIComponent::SetName(std::string_view name) | ||
{ | ||
std::string_view current(m_name); | ||
if (current.compare(name) != 0) | ||
{ | ||
m_name = name.data(); | ||
} | ||
} | ||
|
||
void UIComponent::SetVisibility(bool visibility) | ||
{ | ||
m_visibility = visibility; | ||
} | ||
|
||
std::string_view UIComponent::GetName() const | ||
{ | ||
return m_name; | ||
} | ||
|
||
bool UIComponent::GetVisibility() const | ||
{ | ||
return m_visibility; | ||
} | ||
|
||
void UIComponent::SetParentLayer(const Ref<Layers::ImguiLayer>& layer) | ||
{ | ||
m_parent_layer = layer; | ||
} | ||
|
||
bool UIComponent::HasParentLayer() const | ||
{ | ||
return m_parent_layer.expired() == false; | ||
} | ||
|
||
void UIComponent::SetParentUI(const Ref<UIComponent>& item) | ||
{ | ||
m_parent_ui = item; | ||
} | ||
|
||
bool UIComponent::HasParentUI() const | ||
{ | ||
return m_parent_ui.expired() == false; | ||
} | ||
} // namespace Tetragrama::Components | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.