Fix some minor stuff

This commit is contained in:
Jérôme Leclercq
2020-09-06 17:09:39 +02:00
parent 67b0d70b7c
commit 193deb6c04
10 changed files with 96 additions and 94 deletions

View File

@@ -39,7 +39,7 @@ namespace Ndk
void SetGeomOffset(const Nz::Vector2f& geomOffset);
CollisionComponent2D& operator=(Nz::Collider2DRef geom);
CollisionComponent2D& operator=(CollisionComponent2D&& collision) = default;
CollisionComponent2D& operator=(CollisionComponent2D&& collision) = delete;
static ComponentIndex componentIndex;

View File

@@ -24,8 +24,6 @@ namespace Ndk
LightComponent(const LightComponent& light) = default;
~LightComponent() = default;
LightComponent& operator=(const LightComponent& light) = default;
static ComponentIndex componentIndex;
};
}

View File

@@ -10,34 +10,27 @@
#include <NDK/Prerequisites.hpp>
#include <NDK/BaseWidget.hpp>
#include <NDK/Widgets/Enums.hpp>
#include <vector>
#include <memory>
namespace Ndk
{
class NDK_API BoxLayout : public BaseWidget
{
public:
inline BoxLayout(BaseWidget* parent, BoxLayoutOrientation orientation);
BoxLayout(BaseWidget* parent, BoxLayoutOrientation orientation);
BoxLayout(const BoxLayout&) = delete;
BoxLayout(BoxLayout&&) = default;
~BoxLayout() = default;
BoxLayout(BoxLayout&&) = delete;
~BoxLayout();
void Layout() override;
BoxLayout& operator=(const BoxLayout&) = delete;
BoxLayout& operator=(BoxLayout&&) = default;
BoxLayout& operator=(BoxLayout&&) = delete;
private:
struct ChildInfo
{
BaseWidget* widget;
bool isConstrained;
float maximumSize;
float minimumSize;
float size;
};
struct State;
std::vector<ChildInfo> m_childInfos;
std::unique_ptr<State> m_state;
BoxLayoutOrientation m_orientation;
float m_spacing;
};

View File

@@ -6,10 +6,4 @@
namespace Ndk
{
BoxLayout::BoxLayout(BaseWidget* parent, BoxLayoutOrientation orientation) :
BaseWidget(parent),
m_orientation(orientation),
m_spacing(5.f)
{
}
}