moved libs to submodules, small fix in Node move ctor

This commit is contained in:
2017-01-31 11:21:56 +00:00
parent a80556f418
commit d313e815d3
9 changed files with 33 additions and 12 deletions

4
.gitignore vendored
View File

@@ -1,6 +1,8 @@
xcuserdata
libs
xcshareddata/
x64/
.vs/
engine.vcxproj.user
ipch/
engine.VC.opendb
engine.sdf

12
.gitmodules vendored Normal file
View File

@@ -0,0 +1,12 @@
[submodule "libs/glm"]
path = libs/glm
url = https://github.com/g-truc/glm.git
[submodule "libs/stb/stb"]
path = libs/stb/stb
url = https://github.com/nothings/stb.git
[submodule "libs/yoga"]
path = libs/yoga
url = https://github.com/facebook/yoga.git
[submodule "libs/tinyxml2"]
path = libs/tinyxml2
url = https://github.com/leethomason/tinyxml2.git

View File

@@ -3,17 +3,17 @@
<node dir="col" wrap="0" width="100%" height="100%" pad="5">
<!-- toolbar -->
<border height="50" width="100%" pad="5" dir="row" color=".2">
<plane width="50" margin="0 5 0 0" color=".1"></plane>
<plane width="50" margin="0 5 0 0" color=".2"></plane>
<plane width="50" margin="0 5 0 0" color=".3"></plane>
<border width="50" margin="0 5 0 0" color=".1" thickness="2" border-color="1"></border>
<border width="50" margin="0 5 0 0" color=".2" thickness="2" border-color="1"></border>
<border width="50" margin="0 5 0 0" color=".3" thickness="2" border-color="1"></border>
<separator width="10" />
<plane width="50" margin="0 5 0 0" color=".1"></plane>
<plane width="50" margin="0 5 0 0" color=".2"></plane>
<plane width="50" margin="0 5 0 0" color=".3"></plane>
<border width="50" margin="0 5 0 0" color=".1" thickness="2" border-color="1"></border>
<border width="50" margin="0 5 0 0" color=".2" thickness="2" border-color="1"></border>
<border width="50" margin="0 5 0 0" color=".3" thickness="2" border-color="1"></border>
<separator width="10" />
<plane width="50" margin="0 5 0 0"></plane>
<plane width="50" margin="0 5 0 0"></plane>
<plane width="50" margin="0 5 0 0"></plane>
<border width="50" margin="0 5 0 0"></border>
<border width="50" margin="0 5 0 0"></border>
<border width="50" margin="0 5 0 0"></border>
</border>
<!-- central row -->
<plane grow="1" dir="row" wrap="1" height="0">

View File

@@ -125,11 +125,11 @@ void App::update(float dt)
glEnable(GL_SCISSOR_TEST);
for (auto& n : layout)
{
auto box = n.m_clip;
glScissor(box.x, height - box.y - box.w, box.z, box.w);
if (n.m_widget)
{
auto box = n.m_widget->clip;
glScissor(box.x, height - box.y - box.w, box.z, box.w);
n.m_widget->draw();
}
}

View File

@@ -108,6 +108,9 @@ public:
Node&& operator=(Node&& o) { return std::forward<Node>(o); }
Node(Node&& o)
{
m_name = std::move(o.m_name);
m_path = std::move(o.m_path);
m_widget = std::move(o.m_widget);
m_children = std::move(o.m_children);
for (auto& c : m_children)
c.parent = this;

1
libs/glm Submodule

Submodule libs/glm added at f84437dc56

1
libs/stb/stb Submodule

Submodule libs/stb/stb added at 59a5a155b4

1
libs/tinyxml2 Submodule

Submodule libs/tinyxml2 added at 1f5ab7cd0b

1
libs/yoga Submodule

Submodule libs/yoga added at c217553cf8