Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <layout>
- <!--
- Этот файл содержит описание внешнего вида пульта, а также действия с его элементами.
- Файл обрабатывается клиентом, т.е. в смартфоне/планшете.
- -->
- <!--
- ЛЕГЕНДА ПО ЭЛЕМЕНТАМ
- layout Слой. Внутри этого элемента должны быть все остальные элементы
- row Горизонтальный ряд
- button Кнопка
- text Поле для ввода текста
- label Текстовый инфо блок
- ЛЕГЕНДА ПО ПАРАМЕТРАМ ЭЛЕМЕНТОВ
- id Идентификатор, по которому можно к обратится к элементу в коде remote.lua
- weight Толщина, в условных единицах. Для "row" играет роль высоты, для остальных элементов - ширины
- text Первоначальный текст элемента
- textalign Положение текста. Выравнивание текста внутри элемента ( left, center, right )
- color Цвет ( https://github.com/unifiedremote/Docs/blob/master/controls/styling.md )
- hint Текстовая подсказка для элементов ввода текста
- image Своя картинка для элемента. Указывайте относительный путь от папки пульта
- icon Стандартная иконка для элемента ( https://github.com/unifiedremote/Docs/blob/master/res/icons.md )
- ЛЕГЕНДА ПО ДЕЙСТВИЯМ С ЭЛЕМЕНТАМИ
- ontap При любом касании элемента, выполняется функция, указанная внутри этого параметра
- ondown При нажатии на элемент, выполняется функция, указанная ..
- onup При отпускании (отжатии) элемента, выполняется функция, ..
- onhold При долгом нажатии на элемент, ..
- onchange При любом измении элемента, ..
- Описание остальных элементов, параметров и значений смотрите здесь
- https://github.com/unifiedremote/Docs/tree/master/controls
- -->
- <!-- КООРДИНАТЫ ОСЕЙ, СКОРОСТЬ ПОДАЧИ / ШПИНДЕЛЯ -->
- <row weight="6">
- <label weight="5" text="X" color="green" />
- <label weight="34" id="xPos" text="0.000" />
- <label weight="5" text="F" color="purple" />
- <label weight="18" id="fValue" text="0" />
- <label weight="15" id="fPercent" text="100%" />
- <button weight="12" ontap="feedrateDown" text="-" />
- <button weight="12" ontap="feedrateUp" text="+" />
- </row>
- <row weight="6">
- <label weight="5" text="Y" color="blue" />
- <label weight="34" id="yPos" text="0.000" />
- <label weight="5" text="S" color="orange" />
- <label weight="34" id="sValue" text="0" />
- <button weight="12" ontap="spindleSpeedDown" text="-" />
- <button weight="12" ontap="spindleSpeedUp" text="+" />
- </row>
- <row weight="6">
- <label weight="5" text="Z" color="red" />
- <label weight="34" id="zPos" text="0.000" />
- <!-- текст и цвет этой кнопки меняются если шпиндель включён -->
- <button
- id = "toggleSpindle"
- weight = "67"
- ontap = "toggleSpindle"
- text = "SPINDLE"
- light = "normal:orange;focus:#FFCC99;active:#FFCC99;color:#FFFFFF;"
- dark = "normal:orange;focus:#FFCC99;active:#FFCC99;color:#FFFFFF;"
- />
- </row>
- <!-- КНОПКИ УПРАВЛЕНИЯ -->
- <row weight="9">
- <button weight="20" ontap="estop" image="estop256.png" color="transparent" />
- <button weight="20" ontap="play" icon="play" />
- <button weight="20" ontap="pause" icon="pause" />
- <button weight="20" ontap="stop" icon="stop" />
- <button weight="26" ontap="refAllHome" text="HOME" color="pink" />
- </row>
- <!-- JOG ПАНЕЛЬ -->
- <row weight="10">
- <button weight="14" text="X=0" ontap="xZero" color="green" />
- <button weight="26" text="--X" ondown="xFastMinusStart" onup="xFastMinusEnd" color="green" />
- <button weight="20" text="-X" ondown="xSlowMinusStart" onup="xSlowMinusEnd" color="green" />
- <button weight="20" text="X+" ondown="xSlowPlusStart" onup="xSlowPlusEnd" color="green" />
- <button weight="26" text="X++" ondown="xFastPlusStart" onup="xFastPlusEnd" color="green" />
- </row>
- <row weight="10">
- <button weight="14" text="Y=0" ontap="yZero" color="blue" />
- <button weight="26" text="--Y" ondown="yFastMinusStart" onup="yFastMinusEnd" color="blue" />
- <button weight="20" text="-Y" ondown="ySlowMinusStart" onup="ySlowMinusEnd" color="blue" />
- <button weight="20" text="Y+" ondown="ySlowPlusStart" onup="ySlowPlusEnd" color="blue" />
- <button weight="26" text="Y++" ondown="yFastPlusStart" onup="yFastPlusEnd" color="blue" />
- </row>
- <row weight="10">
- <button weight="14" text="Z=0" ontap="zZero" color="red" />
- <button weight="26" text="--Z" ondown="zFastMinusStart" onup="zFastMinusEnd" color="red" />
- <button weight="20" text="-Z" ondown="zSlowMinusStart" onup="zSlowMinusEnd" color="red" />
- <button weight="20" text="Z+" ondown="zSlowPlusStart" onup="zSlowPlusEnd" color="red" />
- <button weight="26" text="Z++" ondown="zFastPlusStart" onup="zFastPlusEnd" color="red" />
- </row>
- <!-- ВВОД MDI КОМАНД -->
- <row weight="7">
- <text id="MDIinput" weight="9" hint="enter command here" onchange="MDItextChanged" textalign="center" />
- <button weight="2" text="SEND" ontap="MDIrun" color="blue" />
- </row>
- <!-- ИНФО БЛОК -->
- <row weight="6">
- <label id="infoLabel" text="info panel" />
- </row>
- </layout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement