refactor ui initialization each group in a function, new document dialog, fix parallax camera and drawing order clipping problem

This commit is contained in:
2017-08-11 23:26:19 +01:00
parent f08fd42a50
commit 1550dfff03
9 changed files with 689 additions and 473 deletions

View File

@@ -239,6 +239,27 @@
</border>
</border>
</layout>
<!-- NewDoc Dialog Popup -->
<layout id="dialog-newdoc">
<border positioning="absolute" position="0 0" color=".4 .4 .4 .8" width="100%" height="100%" align="center" justify="center">
<border thickness="1" border-color=".2" pad="3">
<border width="400" height="30" color=".2 .2 .2 .9" dir="row" align="center" justify="center">
<text text="Create New Pano Project" font-face="arial" font-size="11"></text>
</border>
<border width="400" color="0 0 0 .9" pad="10" dir="col">
<node dir="row">
<text text="Project name: " font-face="arial" font-size="11"/>
<text-input id="txt-input" width="100" height="20" color=".3"/>
</node>
<node height="40" grow="1" dir="row" align="flex-end" justify="flex-end">
<button id="btn-ok" text="Create Project" width="100" height="30" margin="0 10 0 0"/>
<button id="btn-cancel" text="Cancel" width="60" height="30" pad="10"/>
</node>
</border>
</border>
</border>
</layout>
<!--settings window-->
<layout id="settings">
@@ -307,6 +328,7 @@
<!--file menu-->
<layout id="file-menu">
<popup-menu positioning="absolute" position="100 100" width="150" thickness="1" border-color=".1" color=".4 .4 .4 .8" dir="col">
<!--
<button-custom height="30" align="center" color=".2" pad="0 20 0 10" dir="row">
<checkbox width="20" height="20"/>
<node pad="5" width="100%">
@@ -319,21 +341,22 @@
<slider-h/>
</node>
</button-custom>
<button-custom text="Menu" height="30" align="center" color=".2" pad="0 0 0 10" dir="row">
-->
<button-custom id="file-newdoc" text="Menu" height="30" align="center" color=".2" pad="0 0 0 10" dir="row">
<icon icon="page_add" width="20"/>
<text text="New Panodoc" margin="0 0 0 5" font-face="arial" font-size="11"/>
</button-custom>
<button-custom text="Menu" height="30" align="center" color=".2" pad="0 0 0 10" dir="row">
<button-custom id="file-open" text="Menu" height="30" align="center" color=".2" pad="0 0 0 10" dir="row">
<icon icon="page_add" width="20"/>
<text text="Open" margin="0 0 0 5" font-face="arial" font-size="11"/>
</button-custom>
<button-custom id="file-save" text="Menu" height="30" align="center" color=".2" pad="0 0 0 10" dir="row">
<icon icon="disk" width="20"/>
<text text="Save" margin="0 0 0 5" font-face="arial" font-size="11"/>
</button-custom>
<button-custom text="Menu" height="30" align="center" color=".2" pad="0 0 0 10" dir="row">
<icon icon="disk_multiple" width="20"/>
<text text="Save as.." margin="0 0 0 5" font-face="arial" font-size="11"/>
</button-custom>
<button-custom text="Menu" height="30" align="center" color=".2" pad="0 0 0 10" dir="row">
<icon icon="add" width="20"/>
<text text="Add reference" margin="0 0 0 5" font-face="arial" font-size="11"/>
<button-custom id="file-export" text="Menu" height="30" align="center" color=".2" pad="0 0 0 10" dir="row">
<icon icon="disk" width="20"/>
<text text="Export PNG" margin="0 0 0 5" font-face="arial" font-size="11"/>
</button-custom>
<button-custom text="Menu" height="30" align="center" color=".2" pad="0 0 0 10" dir="row">
<icon width="20"/>
@@ -397,6 +420,7 @@
<text text="Layers" font-face="arial" font-size="11"/>
</button-custom>
<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"/>
@@ -406,22 +430,30 @@
</border>
<!-- toolbar -->
<border id="toolbar" height="50" width="100%" pad="5" dir="row" color=".2 .2 .2 .6">
<!--
<button id="btn-open" width="50" height="100%" margin="0 5 0 0" text="Open"/>
<button id="btn-save" width="50" height="100%" margin="0 5 0 0" text="Save"/>
<button id="btn-export" width="50" height="100%" margin="0 5 0 0" text="Export"/>
<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-custom id="btn-bucket" width="50" height="100%" margin="0 20 0 0" thickness="1" border-color="0 0 0 1" pad="2">
<image path="data/ui/bucket.png" width="100%" height="100%" align="center" justify="flex-end"/>
</button-custom>
-->
<button id="btn-undo" width="50" height="100%" margin="0 5 0 0" text="Undo"/>
<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"/>
<button id="btn-erase" width="60" height="100%" margin="0 0 0 0" text="Erase"/>
<button id="btn-line" width="50" height="100%" margin="0 0 0 0" text="Line"/>
<button id="btn-cam" width="70" height="100%" margin="0 0 0 0" text="Camera"/>
<button id="btn-grid" width="50" height="100%" margin="0 0 0 0" text="Grid"/>
<button id="btn-fill" width="50" height="100%" margin="0 0 0 0" text="Fill"/>
<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"/>
<button id="btn-erase" width="60" height="100%" margin="0 0 0 5" text="Erase"/>
<button id="btn-cam" width="70" height="100%" margin="0 0 0 5" text="Camera"/>
<button id="btn-line" width="50" height="100%" margin="0 0 0 5" text="Line"/>
<button id="btn-grid" width="50" height="100%" margin="0 0 0 0" text="Grid"/>
<button id="btn-fill" width="50" height="100%" margin="0 0 0 0" text="Fill"/>
<button-custom id="btn-bucket" width="50" height="100%" margin="0 0 0 5" thickness="1" border-color="0 0 0 1" pad="2">
<image path="data/ui/bucket.png" width="100%" height="100%" align="center" justify="flex-end"/>
</button-custom>
</node>
<!--
<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"/>