fix layer draw order, change layout menu to toolbar and more space on top status bar
This commit is contained in:
@@ -410,7 +410,7 @@
|
||||
</node>
|
||||
<!-- menu bar -->
|
||||
<border flood-events="1" margin="0 0 0 0" pad="0 0 0 0" color=".1" width="100%" height="30" dir="row" align="center">
|
||||
<button-custom id="menu-file" height="100%" margin="0 0 0 0" justify="center" align="center" pad="8" color=".1">
|
||||
<!--<button-custom id="menu-file" height="100%" margin="0 0 0 0" justify="center" align="center" pad="8" color=".1">
|
||||
<text text="File" font-face="arial" font-size="11"/>
|
||||
</button-custom>
|
||||
<button-custom id="menu-edit" height="100%" margin="0 0 0 0" justify="center" align="center" pad="8" color=".1">
|
||||
@@ -418,9 +418,9 @@
|
||||
</button-custom>
|
||||
<button-custom id="menu-layers" height="100%" margin="0 0 0 0" justify="center" align="center" pad="8" color=".1">
|
||||
<text text="Layers" font-face="arial" font-size="11"/>
|
||||
</button-custom>
|
||||
</button-custom>-->
|
||||
<text id="txt-docname" text="Document: no-name" font-face="arial" font-size="11" margin="0 20 0 10" color=".6 .6 .6 1"/>
|
||||
<node height="100%" color="1" grow="1" align="center" justify="flex-end" dir="row">
|
||||
<text id="txt-docname" text="Document: no-name" font-face="arial" font-size="11" margin="0 20 0 0" color=".6 .6 .6 1"/>
|
||||
<text id="txt-memory" text="History memory: 0.00 Mb" font-face="arial" font-size="11" margin="0 5 0 0" color=".6 .6 .6 1"/>
|
||||
<button-custom id="btn-clean-memory" margin="0 20 0 0">
|
||||
<icon icon="delete" width="20"/>
|
||||
@@ -437,7 +437,15 @@
|
||||
<button id="btn-anim" width="50" height="100%" margin="0 5 0 0" text="Anim"/>
|
||||
<button id="btn-clear" width="50" height="100%" margin="0 5 0 15" text="Clear"/>
|
||||
-->
|
||||
<button id="btn-undo" width="50" height="100%" margin="0 5 0 0" text="Undo"/>
|
||||
<button-custom id="menu-file" width="50" height="100%" margin="0 0 0 0" justify="center" align="center" pad="8" color=".1">
|
||||
<text text="File" font-face="arial" font-size="11"/>
|
||||
</button-custom>
|
||||
<button-custom id="menu-edit" width="50" height="100%" margin="0 0 0 0" justify="center" align="center" pad="8" color=".1">
|
||||
<text text="Edit" font-face="arial" font-size="11"/>
|
||||
</button-custom>
|
||||
<button-custom id="menu-layers" width="60" height="100%" margin="0 0 0 0" justify="center" align="center" pad="8" color=".1">
|
||||
<text text="Layers" font-face="arial" font-size="11"/>
|
||||
</button-custom>
|
||||
<node dir="row" justify="center" grow="1">
|
||||
<button id="btn-pen" width="50" height="100%" margin="0 0 0 0" text="Pen"/>
|
||||
<button id="btn-pick" width="50" height="100%" margin="0 0 0 0" text="Pick"/>
|
||||
@@ -454,6 +462,7 @@
|
||||
<image path="data/ui/bucket.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
||||
</button-custom>
|
||||
</node>
|
||||
<button id="btn-undo" width="50" height="100%" margin="0 5 0 0" text="Undo"/>
|
||||
<!--
|
||||
<button-custom id="btn-layer" width="50" height="100%" margin="0 5 0 0" thickness="1" border-color="0 0 0 1" pad="6" align="center" justify="center">
|
||||
<icon width="100%" height="100%" icon="disk"/>
|
||||
|
||||
@@ -101,14 +101,15 @@ void NodeCanvas::draw()
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
for (auto layer_index : m_canvas->m_order)
|
||||
for (size_t i = 0; i < m_canvas->m_order.size(); i++)
|
||||
{
|
||||
auto layer_index = m_canvas->m_order[i];
|
||||
for (int plane_index = 0; plane_index < 6; plane_index++)
|
||||
{
|
||||
if (m_canvas->m_layers[layer_index].m_opacity == .0f)
|
||||
continue;
|
||||
|
||||
int z = (int)m_canvas->m_order.size() - layer_index;
|
||||
int z = (int)m_canvas->m_order.size() - i;
|
||||
auto plane_mvp_z = proj * camera *
|
||||
glm::scale(glm::vec3(z + 1)) *
|
||||
m_canvas->m_plane_transform[plane_index] *
|
||||
|
||||
Reference in New Issue
Block a user