Advertisement
MX_Master

UnifiedRemote - NCStudio5 Vertical - layout.xml

Jul 31st, 2015
421
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 6.75 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <layout>
  3.  
  4.     <!--
  5.        Этот файл содержит описание внешнего вида пульта, а также действия с его элементами.
  6.        Файл обрабатывается клиентом, т.е. в смартфоне/планшете.
  7.    -->
  8.  
  9.  
  10.  
  11.  
  12.  
  13.     <!--
  14.        ЛЕГЕНДА ПО ЭЛЕМЕНТАМ
  15.            layout          Слой. Внутри этого элемента должны быть все остальные элементы
  16.            row             Горизонтальный ряд
  17.            button          Кнопка
  18.            text            Поле для ввода текста
  19.            label           Текстовый инфо блок
  20.        
  21.        ЛЕГЕНДА ПО ПАРАМЕТРАМ ЭЛЕМЕНТОВ
  22.            id              Идентификатор, по которому можно к обратится к элементу в коде remote.lua
  23.            weight          Толщина, в условных единицах. Для "row" играет роль высоты, для остальных элементов - ширины
  24.            text            Первоначальный текст элемента
  25.            textalign       Положение текста. Выравнивание текста внутри элемента ( left, center, right )
  26.            color           Цвет ( https://github.com/unifiedremote/Docs/blob/master/controls/styling.md )
  27.            hint            Текстовая подсказка для элементов ввода текста
  28.            image           Своя картинка для элемента. Указывайте относительный путь от папки пульта
  29.            icon            Стандартная иконка для элемента ( https://github.com/unifiedremote/Docs/blob/master/res/icons.md )
  30.            
  31.        ЛЕГЕНДА ПО ДЕЙСТВИЯМ С ЭЛЕМЕНТАМИ
  32.            ontap           При любом касании элемента,         выполняется функция, указанная внутри этого параметра
  33.            ondown          При нажатии на элемент,             выполняется функция, указанная ..
  34.            onup            При отпускании (отжатии) элемента,  выполняется функция, ..
  35.            onhold          При долгом нажатии на элемент,      ..
  36.            onchange        При любом измении элемента,         ..
  37.  
  38.        Описание остальных элементов, параметров и значений смотрите здесь
  39.            https://github.com/unifiedremote/Docs/tree/master/controls
  40.    -->
  41.  
  42.  
  43.  
  44.  
  45.  
  46.     <!-- КООРДИНАТЫ ОСЕЙ, СКОРОСТЬ ПОДАЧИ / ШПИНДЕЛЯ -->
  47.  
  48.     <row weight="6">
  49.         <label weight="5" text="X" color="green" />
  50.         <label weight="34" id="xPos" text="0.000" />
  51.  
  52.         <label weight="5" text="F" color="purple" />
  53.         <label weight="18" id="fValue" text="0" />
  54.         <label weight="15" id="fPercent" text="100%" />
  55.         <button weight="12" ontap="feedrateDown" text="-" />
  56.         <button weight="12" ontap="feedrateUp" text="+" />
  57.     </row>
  58.  
  59.     <row weight="6">
  60.         <label weight="5" text="Y" color="blue" />
  61.         <label weight="34" id="yPos" text="0.000" />
  62.  
  63.         <label weight="5" text="S" color="orange" />
  64.         <label weight="34" id="sValue" text="0" />
  65.         <button weight="12" ontap="spindleSpeedDown" text="-" />
  66.         <button weight="12" ontap="spindleSpeedUp" text="+" />
  67.     </row>
  68.  
  69.     <row weight="6">
  70.         <label weight="5" text="Z" color="red" />
  71.         <label weight="34" id="zPos" text="0.000" />
  72.  
  73.         <!-- текст и цвет этой кнопки меняются если шпиндель включён -->
  74.         <button
  75.            id      = "toggleSpindle"
  76.            weight  = "67"
  77.            ontap   = "toggleSpindle"
  78.            text    = "SPINDLE"
  79.            light   = "normal:orange;focus:#FFCC99;active:#FFCC99;color:#FFFFFF;"
  80.            dark    = "normal:orange;focus:#FFCC99;active:#FFCC99;color:#FFFFFF;"
  81.        />
  82.     </row>
  83.  
  84.  
  85.  
  86.  
  87.  
  88.     <!-- КНОПКИ УПРАВЛЕНИЯ -->
  89.    
  90.     <row weight="9">
  91.         <button weight="20" ontap="estop" image="estop256.png" color="transparent" />
  92.         <button weight="20" ontap="play" icon="play" />
  93.         <button weight="20" ontap="pause" icon="pause" />
  94.         <button weight="20" ontap="stop" icon="stop" />
  95.         <button weight="26" ontap="refAllHome" text="HOME" color="pink" />
  96.     </row>
  97.  
  98.  
  99.  
  100.  
  101.  
  102.     <!-- JOG ПАНЕЛЬ -->
  103.  
  104.     <row weight="10">
  105.         <button weight="14" text="X=0" ontap="xZero" color="green" />
  106.         <button weight="26" text="--X" ondown="xFastMinusStart" onup="xFastMinusEnd" color="green" />
  107.         <button weight="20" text="-X" ondown="xSlowMinusStart" onup="xSlowMinusEnd" color="green" />
  108.         <button weight="20" text="X+" ondown="xSlowPlusStart" onup="xSlowPlusEnd" color="green" />
  109.         <button weight="26" text="X++" ondown="xFastPlusStart" onup="xFastPlusEnd" color="green" />
  110.     </row>
  111.  
  112.     <row weight="10">
  113.         <button weight="14" text="Y=0" ontap="yZero" color="blue" />
  114.         <button weight="26" text="--Y" ondown="yFastMinusStart" onup="yFastMinusEnd" color="blue" />
  115.         <button weight="20" text="-Y" ondown="ySlowMinusStart" onup="ySlowMinusEnd" color="blue" />
  116.         <button weight="20" text="Y+" ondown="ySlowPlusStart" onup="ySlowPlusEnd" color="blue" />
  117.         <button weight="26" text="Y++" ondown="yFastPlusStart" onup="yFastPlusEnd" color="blue" />
  118.     </row>
  119.  
  120.     <row weight="10">
  121.         <button weight="14" text="Z=0" ontap="zZero" color="red" />
  122.         <button weight="26" text="--Z" ondown="zFastMinusStart" onup="zFastMinusEnd" color="red" />
  123.         <button weight="20" text="-Z" ondown="zSlowMinusStart" onup="zSlowMinusEnd" color="red" />
  124.         <button weight="20" text="Z+" ondown="zSlowPlusStart" onup="zSlowPlusEnd" color="red" />
  125.         <button weight="26" text="Z++" ondown="zFastPlusStart" onup="zFastPlusEnd" color="red" />
  126.     </row>
  127.  
  128.  
  129.  
  130.  
  131.  
  132.     <!-- ВВОД MDI КОМАНД -->
  133.  
  134.     <row weight="7">
  135.         <text id="MDIinput" weight="9" hint="enter command here" onchange="MDItextChanged" textalign="center" />
  136.         <button weight="2" text="SEND" ontap="MDIrun" color="blue" />
  137.     </row>
  138.  
  139.  
  140.  
  141.  
  142.  
  143.     <!-- ИНФО БЛОК -->
  144.  
  145.     <row weight="6">
  146.         <label id="infoLabel" text="info panel" />
  147.     </row>
  148.  
  149. </layout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement