<?xml version="1.0"?>
<root
  xmlns="http://panopainter.com/layout.xsd"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>

  <layout id="tpl-panel-grid">
    <node width="350" margin="0 0 10 0" rtl="ltr">
      <border id="title" height="30" color=".4" align="center" justify="center">
        <text text="Grids" color="1 1 1 1"/>
      </border>
      <border color=".4" pad="5" dir="col" width="100%" grow="1">

        <node dir="row" margin="0 0 10 0">
          <node width="200" grow="1"  margin="0 5 0 0">
            <border color=".2" height="20" justify="center" align="center">
              <text text="Heightmap"/>
            </border>
            <border color="1" align="center" pad="5" margin="0 0 5 0" min-height="70">
              <image-texture id="grid-heightmap-preview" width="100%" grow="1" height="100" aspect-ratio="1"/>
            </border>
          </node>
          <node width="100" pad="0" dir="col">
            <button id="grid-heightmap-load" text="Open" width="100" height="30" margin="0 2 0 0"/>
            <button id="grid-heightmap-clear" text="Clear" width="100" height="30" margin="0 2 0 0"/>
            <button id="grid-heightmap-reload" text="Reload" width="100" height="30" margin="0 2 0 0"/>
          </node>
        </node>

        <scroll id="scroller" color=".4" scroll-color=".2" grow="1">
          <node dir="row">
            <node width="36%" dir="col">
              <node height="20" justify="center">
                <text text="Opacity"/>
              </node>
              <node height="20" justify="center">
                <text text="Value"/>
              </node>
              <node height="20" justify="center">
                <text text="Offset"/>
              </node>
              <node height="30" justify="center" margin="5 0 0 0">
                <text text="Resolution"/>
              </node>
            </node>
            <node dir="col" align="center" grow="1" width="1" flood-events="1">
              <node height="20" pad="1" width="100%">
                <slider-h id="grid-ground-opacity"/>
              </node>
              <node height="20" pad="1" width="100%">
                <slider-h id="grid-ground-value" value="0.0"/>
              </node>
              <node height="20" pad="1" width="100%">
                <slider-h id="grid-ground-offset" value="0.25"/>
              </node>
              <node height="30" pad="1" width="100%" dir="row" margin="5 0 0 0">
                <combobox id="grid-ground-resolution" width="100%" height="28" combo-list="0.1,0.5,1,2,4,8" default="2"/>
              </node>
            </node>
          </node>
          <node height="5"/>
          <node dir="row">
            <node width="36%" dir="col">
              <node height="30" justify="center" margin="5 0 0 0">
                <text text="Shading"/>
              </node>
              <node height="20" justify="center" margin="5 0 0 0">
                <text text="Wireframe"/>
              </node>
              <!--<node height="20" justify="center"><text text="Thickness"/></node>-->
              <node height="20" justify="center">
                <text text="Height"/>
              </node>
              <node height="20" justify="center">
                <text text="Light Yaw"/>
              </node>
              <node height="20" justify="center">
                <text text="Light Pitch"/>
              </node>
              <node height="20" justify="center">
                <text text="Ambient"/>
              </node>
              <node height="20" justify="center">
                <text text="Radius"/>
              </node>
              <node height="30" justify="center" margin="5 0 0 0">
                <text text="Samples"/>
              </node>
              <node height="30" justify="center" margin="5 0 0 0">
                <text text="Tex Res."/>
              </node>
            </node>
            <node dir="col" align="center" grow="1" width="1" flood-events="1" color=".3" >
              <node height="30" pad="1" width="100%" dir="row" margin="5 0 0 0">
                <combobox id="grid-heightmap-shading" width="100%" height="28" combo-list="Transparent,Flat,Solid,Textured" default="0"/>
              </node>
              <node height="20" pad="1" width="100%" margin="5 0 0 0">
                <slider-h id="grid-heightmap-wireframe" value="1.0"/>
              </node>
              <!--<node height="20" pad="1" width="100%"><slider-h id="grid-heightmap-thickness" value="0.5"/></node>-->
              <node height="20" pad="1" width="100%">
                <slider-h id="grid-heightmap-height" value="0.25"/>
              </node>
              <node height="20" pad="1" width="100%">
                <slider-h id="grid-heightmap-lyaw" value="0.5"/>
              </node>
              <node height="20" pad="1" width="100%">
                <slider-h id="grid-heightmap-lpitch" value="0.1"/>
              </node>
              <node height="20" pad="1" width="100%">
                <slider-h id="grid-heightmap-ambient" value="0.0"/>
              </node>
              <node height="20" pad="1" width="100%">
                <slider-h id="grid-heightmap-radius" value="0.25"/>
              </node>
              <node height="30" pad="1" width="100%" dir="row" margin="5 0 0 0">
                <combobox id="grid-heightmap-samples" width="100%" height="28" combo-list="1,4,8,16,32,64,128" default="2"/>
              </node>
              <node height="30" pad="1" width="100%" dir="row" margin="5 0 0 0">
                <combobox id="grid-heightmap-texres" width="100%" height="28" combo-list="256,512,1024,2048,4096" default="1"/>
              </node>
            </node>
          </node>
        </scroll>

        <button id="grid-render" text="Render Lightmap" height="30" margin="5 0 0 0"/>
        <button id="grid-commit" text="Commit to Layer" height="30" margin="5 0 0 0"/>

      </border>
    </node>
  </layout>

</root>
