added right click, popup menu, mark for destroy

This commit is contained in:
2017-02-20 02:25:59 +00:00
parent 4e3f898d4b
commit ee5e4c2d98
8 changed files with 210 additions and 74 deletions

View File

@@ -6,9 +6,9 @@
</border>
</layout>
<layout id="multi-button-item">
<border height="50%" width="50%" color=".1" thickness="2" border-color=".5" justify="center" align="center">
<button-custom height="50%" width="50%" justify="center" align="center">
<text text="A" font-face="arial" font-size="11"/>
</border>
</button-custom>
</layout>
<layout id="multi-button">
<node width="50" margin="0 5 0 0" dir="row" wrap="1">
@@ -26,10 +26,10 @@
<border positioning="absolute" position="0 0" color=".4 .4 .4 .8" width="100%" height="100%" align="center" justify="center">
<border thickness="5" border-color=".2" pad="3">
<border width="400" height="30" color=".2 .2 .2 .9" dir="row" align="center" justify="center">
<text text="Shit! Bug happens." font-face="arial" font-size="11"></text>
<text text="Just a test message" font-face="arial" font-size="11"></text>
</border>
<border width="400" color="0 0 0 .9" pad="10" dir="col">
<text text="Yep, it's a bug. No worries, it happens. Try Unity and see." font-face="arial" font-size="11"></text>
<text text="Longer description for the error or the message." font-face="arial" font-size="11"></text>
<node height="40" grow="1" dir="row" align="flex-end" justify="flex-end">
<button id="btn-ok" text="Ok" width="50" height="30" margin="0 10 0 0"/>
<button text="Cancel" width="60" height="30" pad="10"/>
@@ -38,6 +38,14 @@
</border>
</border>
</layout>
<layout id="popup-menu">
<popup-menu positioning="absolute" position="100 100" width="100" pad="2" thickness="1" border-color=".1" color=".4 .4 .4 .8" dir="col">
<button text="Menu" height="25"/>
<button text="Menu" height="25"/>
<button text="Menu" height="25"/>
<button text="Menu" height="25"/>
</popup-menu>
</layout>
<layout id="main">
<node dir="col" wrap="0" width="100%" height="100%" pad="5">
<border margin="0 0 5 0" pad="3 0 3 3" color=".3" width="100%" height="25" dir="row" align="center">
@@ -47,20 +55,29 @@
</border>
<!-- toolbar -->
<border id="toolbar" height="50" width="100%" pad="5" dir="row" color=".2">
<button id="btn-close" width="50" height="100%" margin="0 5 0 0" text="Button"/>
<button id="btn-close" width="50" height="100%" margin="0 5 0 0" text="Close"/>
<button id="btn-popup" width="50" height="100%" margin="0 5 0 0" text="Popup"/>
<ref id="multi-button"/>
<ref id="multi-button"/>
<ref id="multi-button"/>
<border width="50" margin="0 5 0 0" color=".1" thickness="2" border-color=".5" justify="center" align="center">
<text text="button" font-face="arial" font-size="11"/>
</border>
<separator width="10"/>
<border width="50" margin="0 5 0 0" color=".1" thickness="2" border-color=".5" justify="center" align="center"><text text="red" font-face="arial" font-size="11" color="1 0 0 1"/></border>
<border width="50" margin="0 5 0 0" color=".2" thickness="2" border-color=".5" justify="center" align="center"><text text="blue" font-face="arial" font-size="11" color=".4 .4 1 1"/></border>
<border width="50" margin="0 5 0 0" color=".3" thickness="2" border-color=".5" justify="center" align="center"><text text="green" font-face="arial" font-size="11" color="0 1 0 1"/></border>
<button-custom width="50" margin="0 5 0 0" color=".1" thickness="2" border-color=".5" justify="center" align="center"><text text="red" font-face="arial" font-size="11" color="1 0 0 1"/></button-custom>
<button-custom width="50" margin="0 5 0 0" color=".3" thickness="2" border-color=".5" justify="center" align="center"><text text="green" font-face="arial" font-size="11" color="0 1 0 1"/></button-custom>
<button-custom width="50" margin="0 5 0 0" color=".2" thickness="2" border-color=".5" justify="center" align="center"><text text="blue" font-face="arial" font-size="11" color=".4 .4 1 1"/></button-custom>
<separator width="10"/>
<border width="50" margin="0 5 0 0" color=".1" thickness="2" border-color=".7" pad="4">
<!--button with image-->
<button-custom width="50" margin="0 5 0 0" thickness="1" border-color=".0" pad="8">
<image path="data/icons.png" region="30 30 90 90" width="100%" height="100%" align="center" justify="flex-end">
<!--<text text="Groups" font-face="arial" font-size="11" color=".1"/>-->
</image>
</button-custom>
<button-custom width="50" margin="0 5 0 0" thickness="1" border-color=".0" pad="8">
<image path="data/icons.png" region="143 155 203 215" width="100%" height="100%" align="center" justify="flex-end">
<!--<text text="Settings" font-face="arial" font-size="11"/>-->
</image>
</button-custom>
<!--<border width="50" margin="0 5 0 0" color=".1" thickness="2" border-color=".7" pad="4">
<image path="data/uvs.jpg" region="0 0 50 50" width="100%" height="100%" align="center" justify="flex-end">
<text text="atlas" font-face="arial" font-size="11"/>
</image>
@@ -78,14 +95,31 @@
<separator width="10"/>
<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 width="50" margin="0 5 0 0"></border>-->
</border>
<!-- central row -->
<node grow="1" dir="row" wrap="1" height="0">
<border width="60" color=".2" margin="0 10 0 0" dir="col" pad="4">
<border height="4" margin="-4 0 0 0"/>
<button-custom width="50" margin="5 5 0 0" thickness="1" border-color=".0" pad="8">
<image path="data/icons.png" region="143 155 203 215" width="100%" height="30" align="center" justify="flex-end"/>
</button-custom>
<button-custom width="50" margin="5 5 0 0" thickness="1" border-color=".0" pad="8">
<image path="data/icons.png" region="143 155 203 215" width="100%" height="30" align="center" justify="flex-end"/>
</button-custom>
<button-custom width="50" margin="5 5 0 0" thickness="1" border-color=".0" pad="8">
<image path="data/icons.png" region="143 155 203 215" width="100%" height="30" align="center" justify="flex-end"/>
</button-custom>
<button-custom width="50" margin="5 5 0 0" thickness="1" border-color=".0" pad="8">
<image path="data/icons.png" region="143 155 203 215" width="100%" height="30" align="center" justify="flex-end"/>
</button-custom>
</border>
<!-- side bar -->
<node width="200" height="100%" dir="col" color=".2">
<border pad="15" margin="10 0 10 0" color=".3" width="100%" height="auto">
<border height="30" color=".4" />
<border height="30" color=".5" align="center" justify="center">
<text text="Common Tools" font-face="arial" font-size="11" color="1 1 1 1"/>
</border>
<border height="30" color=".4" />
<border height="30" color=".4" />
<border height="30" color=".4" />
@@ -98,16 +132,17 @@
</border>
</node>
<!-- content panel -->
<border margin="10 0 10 10" border-color=".8" width="1" grow="1" pad="10" wrap="1" dir="col" justify="center" align="center">
<text text="hello widget" font-face="arial" font-size="30" color="0 1 1 1"/>
<text text="this is a small description of the useless big text above" font-face="arial" font-size="11" color="0 1 1 1"/>
<image id="check" margin="10 0 0 0" path="data/uvs.jpg" width="100" height="100" region="0 0 100 100"/>
<border margin="10 0 10 10" border-color=".8" color="1" width="1" grow="1" pad="10" wrap="1" dir="col" justify="center" align="center">
<text text="Viewport" font-face="arial" font-size="30" color="0 .1 .1 1"/>
<text text="Made in C++11 using OpenGL 3.1" font-face="arial" font-size="11" color="0 .1 .1 1"/>
<!--<text text="this is a small description of the useless big text above" font-face="arial" font-size="11" color="0 1 1 1"/>-->
<image id="check" margin="10 0 0 0" path="data/meme/nothing-to-do-here.jpg" width="300" height="200"/>
</border>
</node>
<!-- status bar -->
<border height="30" width="100%" color=".15" border-color=".3" dir="row" pad="0 0 0 10" align="center">
<text text="Status Bar: nothing to show here." font-face="arial" font-size="11"/>
<text text="#opengl #fromscratch #not-made-with-unity" font-face="arial" font-size="11" margin="0 0 0 10" color=".2 .5 1 1"/>
<text text="#opengl #fromscratch #c++" font-face="arial" font-size="11" margin="0 0 0 10" color=".2 .5 1 1"/>
</border>
</node>
</layout>