Removing slang temporarily
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
target_sources(SeeleEngine
|
||||
PRIVATE
|
||||
UIComponent.h
|
||||
UIComponent.cpp
|
||||
Element.h
|
||||
Element.cpp
|
||||
RenderHierarchy.h
|
||||
RenderHierarchy.cpp
|
||||
UIRenderPath.h
|
||||
UIRenderPath.cpp)
|
||||
@@ -0,0 +1,42 @@
|
||||
#include "Element.h"
|
||||
|
||||
using namespace Seele;
|
||||
using namespace Seele::UI;
|
||||
|
||||
Element::Element()
|
||||
{
|
||||
}
|
||||
|
||||
Element::~Element()
|
||||
{
|
||||
}
|
||||
|
||||
void Element::addElement(PElement element)
|
||||
{
|
||||
children.add(element);
|
||||
}
|
||||
|
||||
const Array<PElement> Element::getChildren() const
|
||||
{
|
||||
return children;
|
||||
}
|
||||
|
||||
void Element::clear()
|
||||
{
|
||||
children.clear();
|
||||
}
|
||||
|
||||
void Element::remove(PElement element)
|
||||
{
|
||||
children.remove(children.find(element));
|
||||
}
|
||||
|
||||
void Element::setEnabled(bool newEnabled)
|
||||
{
|
||||
enabled = newEnabled;
|
||||
}
|
||||
|
||||
bool Element::isEnabled() const
|
||||
{
|
||||
return enabled;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
#include "MinimalEngine.h"
|
||||
|
||||
namespace Seele
|
||||
{
|
||||
namespace UI
|
||||
{
|
||||
//Element defines any part of the UI
|
||||
DECLARE_REF(Element)
|
||||
class Element
|
||||
{
|
||||
public:
|
||||
Element();
|
||||
virtual ~Element();
|
||||
void addElement(PElement element);
|
||||
const Array<PElement> getChildren() const;
|
||||
void clear();
|
||||
void remove(PElement element);
|
||||
void setEnabled(bool newEnabled);
|
||||
bool isEnabled() const;
|
||||
protected:
|
||||
bool enabled;
|
||||
Array<PElement> children;
|
||||
};
|
||||
DEFINE_REF(Element)
|
||||
} // namespace UI
|
||||
} // namespace Seele
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
namespace Seele
|
||||
{
|
||||
namespace UI
|
||||
{
|
||||
class RenderHierarchy
|
||||
{
|
||||
public:
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
} // namespace UI
|
||||
} // namespace Seele
|
||||
@@ -1,15 +0,0 @@
|
||||
#pragma once
|
||||
#include "MinimalEngine.h"
|
||||
namespace Seele
|
||||
{
|
||||
DECLARE_REF(UIRenderPath)
|
||||
class UIComponent
|
||||
{
|
||||
public:
|
||||
UIComponent(PUIRenderPath renderer);
|
||||
virtual ~UIComponent();
|
||||
private:
|
||||
PUIRenderPath renderer;
|
||||
};
|
||||
DEFINE_REF(UIComponent);
|
||||
} // namespace Seele
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "Window/RenderPath.h"
|
||||
#include "UIComponent.h"
|
||||
#include "Element.h"
|
||||
|
||||
namespace Seele
|
||||
{
|
||||
@@ -13,6 +13,7 @@ public:
|
||||
virtual void render();
|
||||
virtual void endFrame();
|
||||
private:
|
||||
Array<UI::PElement> rootElements;
|
||||
};
|
||||
DEFINE_REF(UIRenderPath);
|
||||
} // namespace Seele
|
||||
|
||||
Reference in New Issue
Block a user