Compare commits
38 Commits
Author | SHA1 | Date | |
---|---|---|---|
477e8e6459 | |||
92a1189762 | |||
b992260506 | |||
e86f1cd95c | |||
9717f6c239 | |||
8803eaa37d | |||
e7a09d0640 | |||
9093e8d01e | |||
e771320e6a | |||
7646d4e629 | |||
c901ff9408 | |||
cb5f00cbc0 | |||
845ee0f2cd | |||
35336208de | |||
d9648152ef | |||
27a33e55e7 | |||
b421b84b11 | |||
f1012b2fe2 | |||
cc633a7c85 | |||
40b13430cb | |||
dda4e9e771 | |||
1390b73218 | |||
5f7f8dd4e5 | |||
7e4dbd7e03 | |||
6dabc32905 | |||
feedd21413 | |||
851c363aba | |||
c72bff5b2e | |||
679bf1a5c1 | |||
8150ba8f82 | |||
4af48ce87d | |||
ad9033cfe3 | |||
bf8c19c3fc | |||
9ec0f20f2a | |||
f7be52d075 | |||
dc007a981a | |||
697e8cc861 | |||
48b57e8c99 |
279
ESPUI_blocks.js
Normal file
@ -0,0 +1,279 @@
|
||||
// This is a block definition for projects like roboblocks
|
||||
//
|
||||
// Main Block
|
||||
Facilino.LANG_COLOUR_HTML = '#BDBDBD';
|
||||
Facilino.LANG_COLOUR_ESPUI = '#B1B1B1';
|
||||
|
||||
Blockly.Blocks['espui'] = {
|
||||
category: Facilino.locales.getKey('LANG_CATEGORY_HTML'),
|
||||
subcategory: Facilino.locales.getKey('LANG_SUBCATERGORY_ESPUI'),
|
||||
helpUrl: Facilino.getHelpUrl('espui'),
|
||||
tags: ['webinterface'],
|
||||
examples: ['lol.bly'],
|
||||
category_colour: Facilino.LANG_COLOUR_HTML,
|
||||
colour: Facilino.LANG_COLOUR_ESPUI,
|
||||
init: function() {
|
||||
var wifiOptions = [['No', false],['Yes', true]];
|
||||
this.appendDummyInput().appendField('UI Title:').appendField(new Blockly.FieldTextInput(Facilino.locales.getKey('LANG_ESPUI_ESPUI_TITLE')), 'ui_name');
|
||||
this.appendDummyInput().appendField(Facilino.locales.getKey('LANG_ESPUI_ESPUI_HOTSPOT')).appendField(new Blockly.FieldDropdown(wifiOptions), 'wifi_option');
|
||||
this.appendStatementInput('ui_elements').setCheck('ui_element');
|
||||
this.setColour(Facilino.LANG_COLOUR_ESPUI);
|
||||
this.setTooltip(Facilino.locales.getKey('LANG_ESPUI_ESPUI_TOOLTIP'));
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Arduino['espui'] = function(block) {
|
||||
var ui_name = block.getFieldValue('ui_name');
|
||||
var wifi_option = block.getFieldValue('wifi_option');
|
||||
var ui_elements = Blockly.Arduino.statementToCode(block, 'ui_elements');
|
||||
Blockly.Arduino.definitions_['define_wifi_h'] = '#include <WiFi.h>';
|
||||
Blockly.Arduino.definitions_['define_espui_h'] = '#include <ESPUI.h>';
|
||||
Blockly.Arduino.setups_['setup_espui'] = '\n';
|
||||
if(wifi_option){
|
||||
Blockly.Arduino.setups_['setup_espui'] +=
|
||||
' Serial.begin(115200);\n\n' +
|
||||
' WiFi.mode(WIFI_AP);\n' +
|
||||
' WiFi.softAP("' + ui_name + '");\n' +
|
||||
' Serial.print("IP address: ");\n' +
|
||||
' Serial.println(WiFi.softAPIP());\n\n';
|
||||
}
|
||||
Blockly.Arduino.setups_['setup_espui'] += ui_elements;
|
||||
Blockly.Arduino.setups_['setup_espui'] += ' ESPUI.begin("' + ui_name + '");\n';
|
||||
return null;
|
||||
};
|
||||
|
||||
//Elements
|
||||
|
||||
Blockly.Blocks['espui_button'] = {
|
||||
category: Facilino.locales.getKey('LANG_CATEGORY_HTML'),
|
||||
subcategory: Facilino.locales.getKey('LANG_SUBCATERGORY_ESPUI'),
|
||||
helpUrl: Facilino.getHelpUrl('espui_button'),
|
||||
tags: ['webinterface'],
|
||||
examples: ['lol.bly'],
|
||||
category_colour: Facilino.LANG_COLOUR_HTML,
|
||||
colour: Facilino.LANG_COLOUR_ESPUI,
|
||||
init: function() {
|
||||
var colour = new Blockly.FieldColour('#000000');
|
||||
colour.setColours(['#000000','#40e0d0','#50c878','#3498dc','#687894','#e4d422','#eb8921','#e32636']).setColumns(2);
|
||||
this.appendDummyInput().appendField(Facilino.locales.getKey('LANG_ESPUI_BUTTON_BUTTON')).appendField(new Blockly.FieldTextInput(Facilino.locales.getKey('LANG_ESPUI_NAME')), 'ui_name');
|
||||
//this.appendDummyInput().appendField('UI Color').appendField(new Blockly.FieldDropdown(colorOptions), 'ui_color');
|
||||
this.appendDummyInput().appendField(Facilino.locales.getKey('LANG_ESPUI_COLOR')).appendField(colour, 'ui_color');
|
||||
this.appendDummyInput().appendField(Facilino.locales.getKey('LANG_ESPUI_TEXT')).appendField(new Blockly.FieldTextInput(Facilino.locales.getKey('LANG_ESPUI_TEXT')), 'button_text');
|
||||
this.setColour(Facilino.LANG_COLOUR_ESPUI);
|
||||
this.setPreviousStatement(true, 'ui_element');
|
||||
this.setNextStatement(true, 'ui_element');
|
||||
this.setTooltip(Facilino.locales.getKey('LANG_ESPUI_BUTTON_TOOLTIP'));
|
||||
this.appendStatementInput('on_down').appendField(new Blockly.FieldImage('img/blocks/button_pressed.svg', 24*options.zoom, 24*options.zoom)).setCheck(null);
|
||||
this.appendStatementInput('on_up').appendField(new Blockly.FieldImage('img/blocks/button_released.svg', 24*options.zoom, 24*options.zoom)).setCheck(null);
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Arduino['espui_button'] = function(block) {
|
||||
var ui_name = block.getFieldValue('ui_name');
|
||||
var color = block.getFieldValue('ui_color');
|
||||
var colorOptions = {"#000000": "COLOR_NONE", "#40e0d0": "COLOR_TURQUOISE", "#50c878": "COLOR_EMERALD", "#3498dc": "COLOR_PETERRIVER", "#687894": "COLOR_WETASPHALT", "#e4d422": "COLOR_SUNFLOWER", "#eb8921": "COLOR_CARROT", "#e32636": "COLOR_ALIZARIN"};
|
||||
var ui_color = colorOptions[color];
|
||||
var button_text = block.getFieldValue('button_text');
|
||||
var ui_name_clean = ui_name.replace(' ', '_');
|
||||
var on_down = Blockly.Arduino.statementToCode(block, 'on_down');
|
||||
var on_up = Blockly.Arduino.statementToCode(block, 'on_up');
|
||||
Blockly.Arduino.definitions_['define_ui_button_' + ui_name_clean] =
|
||||
'void button_' + ui_name_clean + '(Control c, int type) {\n' +
|
||||
' switch(type){\n' +
|
||||
' case B_DOWN:\n' +
|
||||
on_down + '\n break;\n' +
|
||||
' case B_UP:\n' +
|
||||
on_up + '\n break;\n' +
|
||||
' }\n' +
|
||||
'}\n';
|
||||
var code = ' ESPUI.button("' + ui_name + '", &button_' + ui_name_clean + ', ' + ui_color + ', "' + button_text + '");\n';
|
||||
return code;
|
||||
};
|
||||
|
||||
Blockly.Blocks['espui_label'] = {
|
||||
category: Facilino.locales.getKey('LANG_CATEGORY_HTML'),
|
||||
subcategory: Facilino.locales.getKey('LANG_SUBCATERGORY_ESPUI'),
|
||||
helpUrl: Facilino.getHelpUrl('espui_label'),
|
||||
tags: ['webinterface'],
|
||||
examples: ['lol.bly'],
|
||||
category_colour: Facilino.LANG_COLOUR_HTML,
|
||||
colour: Facilino.LANG_COLOUR_ESPUI,
|
||||
init: function() {
|
||||
var colour = new Blockly.FieldColour('#000000');
|
||||
colour.setColours(['#000000','#40e0d0','#50c878','#3498dc','#687894','#e4d422','#eb8921','#e32636']).setColumns(2);
|
||||
this.appendDummyInput().appendField(Facilino.locales.getKey('LANG_ESPUI_LABEL_LABEL')).appendField(new Blockly.FieldTextInput(Facilino.locales.getKey('LANG_ESPUI_NAME')), 'ui_name');
|
||||
this.appendDummyInput().appendField(Facilino.locales.getKey('LANG_ESPUI_COLOR')).appendField(colour, 'ui_color');
|
||||
this.appendDummyInput().appendField(Facilino.locales.getKey('LANG_ESPUI_TEXT')).appendField(new Blockly.FieldTextInput('value'), 'start_value');
|
||||
this.setColour(Facilino.LANG_COLOUR_ESPUI);
|
||||
this.setPreviousStatement(true, 'ui_element');
|
||||
this.setNextStatement(true, 'ui_element');
|
||||
this.setTooltip(Facilino.locales.getKey('LANG_ESPUI_LABEL_TOOLTIP'));
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Arduino['espui_label'] = function(block) {
|
||||
var ui_name = block.getFieldValue('ui_name');
|
||||
var ui_color = block.getFieldValue('ui_color');
|
||||
var ui_name_clean = ui_name.replace(' ', '_');
|
||||
var start_value = block.getFieldValue('start_value');
|
||||
var code = ' ESPUI.label("' + ui_name + '", ' + ui_color + ', "' + start_value + '");\n';
|
||||
return code;
|
||||
};
|
||||
|
||||
Blockly.Blocks['espui_switcher'] = {
|
||||
category: Facilino.locales.getKey('LANG_CATEGORY_HTML'),
|
||||
subcategory: Facilino.locales.getKey('LANG_SUBCATERGORY_ESPUI'),
|
||||
helpUrl: Facilino.getHelpUrl('espui_switcher'),
|
||||
tags: ['webinterface'],
|
||||
examples: ['lol.bly'],
|
||||
category_colour: Facilino.LANG_COLOUR_HTML,
|
||||
colour: Facilino.LANG_COLOUR_ESPUI,
|
||||
init: function() {
|
||||
var colour = new Blockly.FieldColour('#000000');
|
||||
colour.setColours(['#000000','#40e0d0','#50c878','#3498dc','#687894','#e4d422','#eb8921','#e32636']).setColumns(2);
|
||||
var stateOptions = [['Off', 'false'],['On', 'true']];
|
||||
this.appendDummyInput().appendField(Facilino.locales.getKey('LANG_ESPUI_SWITCH_SWITCH')).appendField(new Blockly.FieldTextInput(Facilino.locales.getKey('LANG_ESPUI_NAME')), 'ui_name');
|
||||
this.appendDummyInput().appendField(Facilino.locales.getKey('LANG_ESPUI_COLOR')).appendField(colour, 'ui_color');
|
||||
this.appendDummyInput().appendField(Facilino.locales.getKey('LANG_ESPUI_STATE')).appendField(new Blockly.FieldDropdown(stateOptions), 'switcher_state');
|
||||
this.setColour(Facilino.LANG_COLOUR_ESPUI);
|
||||
this.setPreviousStatement(true, 'ui_element');
|
||||
this.setNextStatement(true, 'ui_element');
|
||||
this.setTooltip('A web interface button');
|
||||
this.appendStatementInput('on_on').appendField(new Blockly.FieldImage('img/blocks/switch_on.svg', 24*options.zoom, 24*options.zoom)).setCheck('code');
|
||||
this.appendStatementInput('on_off').appendField(new Blockly.FieldImage('img/blocks/switch_off.svg', 24*options.zoom, 24*options.zoom)).setCheck('code');
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Arduino['espui_switcher'] = function(block) {
|
||||
var ui_name = block.getFieldValue('ui_name');
|
||||
var color = block.getFieldValue('ui_color');
|
||||
var colorOptions = {"#000000": "COLOR_NONE", "#40e0d0": "COLOR_TURQUOISE", "#50c878": "COLOR_EMERALD", "#3498dc": "COLOR_PETERRIVER", "#687894": "COLOR_WETASPHALT", "#e4d422": "COLOR_SUNFLOWER", "#eb8921": "COLOR_CARROT", "#e32636": "COLOR_ALIZARIN"};
|
||||
var ui_color = colorOptions[color];
|
||||
var switcher_state = block.getFieldValue('switcher_state');
|
||||
var ui_name_clean = ui_name.replace(' ', '_');
|
||||
var on_on = Blockly.Arduino.statementToCode(block, 'on_down');
|
||||
var on_off = Blockly.Arduino.statementToCode(block, 'on_up');
|
||||
Blockly.Arduino.definitions_['define_ui_switcher_' + ui_name_clean] =
|
||||
'void switcher_' + ui_name_clean + '(Control c, int type) {\n' +
|
||||
' switch(type){\n' +
|
||||
' case S_ACTIVE:\n' +
|
||||
on_on + '\n break;\n' +
|
||||
' case S_INACTIVE:\n' +
|
||||
on_off + '\n break;\n' +
|
||||
' }\n' +
|
||||
'}\n';
|
||||
var code = ' ESPUI.switcher("' + ui_name + '", ' + switcher_state + ', &switcher_' + ui_name_clean + ', ' + ui_color + ');\n';
|
||||
return code;
|
||||
};
|
||||
|
||||
Blockly.Blocks['espui_pad'] = {
|
||||
category: Facilino.locales.getKey('LANG_CATEGORY_HTML'),
|
||||
subcategory: Facilino.locales.getKey('LANG_SUBCATERGORY_ESPUI'),
|
||||
helpUrl: Facilino.getHelpUrl('espui_pad'),
|
||||
tags: ['webinterface'],
|
||||
examples: ['lol.bly'],
|
||||
category_colour: Facilino.LANG_COLOUR_HTML,
|
||||
colour: Facilino.LANG_COLOUR_ESPUI,
|
||||
init: function() {
|
||||
var colour = new Blockly.FieldColour('#000000');
|
||||
colour.setColours(['#000000','#40e0d0','#50c878','#3498dc','#687894','#e4d422','#eb8921','#e32636']).setColumns(2);
|
||||
var centerOptions = [['Yes', 'false'],['No', 'true']];
|
||||
this.appendDummyInput().appendField(Facilino.locales.getKey('LANG_ESPUI_PAD_PAD')).appendField(new Blockly.FieldTextInput(Facilino.locales.getKey('LANG_ESPUI_NAME')), 'ui_name');
|
||||
this.appendDummyInput().appendField(Facilino.locales.getKey('LANG_ESPUI_COLOR')).appendField(colour, 'ui_color');
|
||||
this.appendDummyInput().appendField(Facilino.locales.getKey('LANG_ESPUI_PAD_CENTER')).appendField(new Blockly.FieldDropdown(centerOptions), 'pad_center');
|
||||
this.setColour(Facilino.LANG_COLOUR_ESPUI);
|
||||
this.setPreviousStatement(true, 'ui_element');
|
||||
this.setNextStatement(true, 'ui_element');
|
||||
this.setTooltip('A web interface button');
|
||||
this.appendStatementInput('on_down_for').appendField(new Blockly.FieldImage('img/blocks/controller_up_pressed.svg', 24*options.zoom, 24*options.zoom)).setCheck('code');
|
||||
this.appendStatementInput('on_up_for').appendField(new Blockly.FieldImage('img/blocks/controller_up_released.svg', 24*options.zoom, 24*options.zoom)).setCheck('code');
|
||||
this.appendStatementInput('on_down_back').appendField(new Blockly.FieldImage('img/blocks/controller_down_pressed.svg', 24*options.zoom, 24*options.zoom)).setCheck('code');
|
||||
this.appendStatementInput('on_up_back').appendField(new Blockly.FieldImage('img/blocks/controller_down_released.svg', 24*options.zoom, 24*options.zoom)).setCheck('code');
|
||||
this.appendStatementInput('on_down_left').appendField(new Blockly.FieldImage('img/blocks/controller_right_pressed.svg', 24*options.zoom, 24*options.zoom)).setCheck('code');
|
||||
this.appendStatementInput('on_up_left').appendField(new Blockly.FieldImage('img/blocks/controller_right_released.svg', 24*options.zoom, 24*options.zoom)).setCheck('code');
|
||||
this.appendStatementInput('on_down_right').appendField(new Blockly.FieldImage('img/blocks/controller_left_pressed.svg', 24*options.zoom, 24*options.zoom)).setCheck('code');
|
||||
this.appendStatementInput('on_up_right').appendField(new Blockly.FieldImage('img/blocks/controller_left_released.svg', 24*options.zoom, 24*options.zoom)).setCheck('code');
|
||||
this.appendStatementInput('on_down_center').appendField(new Blockly.FieldImage('img/blocks/controller_center_pressed.svg', 24*options.zoom, 24*options.zoom)).setCheck('code');
|
||||
this.appendStatementInput('on_up_center').appendField(new Blockly.FieldImage('img/blocks/controller_center_released.svg', 24*options.zoom, 24*options.zoom)).setCheck('code');
|
||||
this.lastOption=this.getFieldValue('pad_center');
|
||||
},
|
||||
onchange() {
|
||||
if (this.lastOption!==this.getFieldValue('pad_center'))
|
||||
{
|
||||
if (this.getFieldValue('pad_center')==='false')
|
||||
{
|
||||
try{
|
||||
|
||||
this.removeInput('on_down_center');
|
||||
this.removeInput('on_up_center');
|
||||
this.appendStatementInput('on_down_center').appendField(new Blockly.FieldImage('img/blocks/controller_center_pressed.svg', 24*options.zoom, 24*options.zoom)).setCheck('code');
|
||||
this.appendStatementInput('on_up_center').appendField(new Blockly.FieldImage('img/blocks/controller_center_released.svg', 24*options.zoom, 24*options.zoom)).setCheck('code');
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try{
|
||||
this.removeInput('on_down_center');
|
||||
this.removeInput('on_up_center');
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
}
|
||||
}
|
||||
this.lastOption=this.getFieldValue('pad_center');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Arduino['espui_pad'] = function(block) {
|
||||
var ui_name = block.getFieldValue('ui_name');
|
||||
var color = block.getFieldValue('ui_color');
|
||||
var colorOptions = {"#000000": "COLOR_NONE", "#40e0d0": "COLOR_TURQUOISE", "#50c878": "COLOR_EMERALD", "#3498dc": "COLOR_PETERRIVER", "#687894": "COLOR_WETASPHALT", "#e4d422": "COLOR_SUNFLOWER", "#eb8921": "COLOR_CARROT", "#e32636": "COLOR_ALIZARIN"};
|
||||
var ui_color = colorOptions[color];
|
||||
var pad_center = block.getFieldValue('pad_center');
|
||||
var ui_name_clean = ui_name.replace(' ', '_');
|
||||
var on_down_for = Blockly.Arduino.statementToCode(block, 'on_down_for');
|
||||
var on_up_for = Blockly.Arduino.statementToCode(block, 'on_up_for');
|
||||
var on_down_back = Blockly.Arduino.statementToCode(block, 'on_down_back');
|
||||
var on_up_back = Blockly.Arduino.statementToCode(block, 'on_up_back');
|
||||
var on_down_left = Blockly.Arduino.statementToCode(block, 'on_down_left');
|
||||
var on_up_left = Blockly.Arduino.statementToCode(block, 'on_up_left');
|
||||
var on_down_right = Blockly.Arduino.statementToCode(block, 'on_down_right');
|
||||
var on_up_right = Blockly.Arduino.statementToCode(block, 'on_up_right');
|
||||
var on_down_center = Blockly.Arduino.statementToCode(block, 'on_down_center');
|
||||
var on_up_center = Blockly.Arduino.statementToCode(block, 'on_up_center');
|
||||
Blockly.Arduino.definitions_['define_ui_pad_' + ui_name_clean] =
|
||||
'void pad_' + ui_name_clean + '(Control c, int type) {\n' +
|
||||
' switch(type){\n' +
|
||||
' case P_FOR_DOWN:\n' +
|
||||
on_down_for + '\n break;\n' +
|
||||
' case P_FOR_UP:\n' +
|
||||
on_up_for + '\n break;\n' +
|
||||
|
||||
' case P_BACK_DOWN:\n' +
|
||||
on_down_back + '\n break;\n' +
|
||||
' case P_BACK_UP:\n' +
|
||||
on_up_back + '\n break;\n' +
|
||||
|
||||
' case P_RIGHT_DOWN:\n' +
|
||||
on_down_left + '\n break;\n' +
|
||||
' case P_RIGHT_UP:\n' +
|
||||
on_up_left + '\n break;\n' +
|
||||
|
||||
' case P_LEFT_DOWN:\n' +
|
||||
on_down_right + '\n break;\n' +
|
||||
' case P_LEFT_UP:\n' +
|
||||
on_up_right + '\n break;\n' +
|
||||
|
||||
' case P_CENTER_DOWN:\n' +
|
||||
on_down_center + '\n break;\n' +
|
||||
' case P_CENTER_UP:\n' +
|
||||
on_up_center + '\n break;\n' +
|
||||
' }\n' +
|
||||
'}\n';
|
||||
var code = ' ESPUI.pad("' + ui_name + '", ' + pad_center + ', &pad_' + ui_name_clean + ', ' + ui_color + ');\n';
|
||||
return code;
|
||||
};
|
53
README.md
@ -29,7 +29,7 @@ This library is dependent on the following libraries to function properly.
|
||||
|
||||
Make sure all the dependencies are installed, then install like so:
|
||||
|
||||
#### Directly Through Arduino IDE
|
||||
#### Directly Through Arduino IDE (*recommended*)
|
||||
|
||||
You can find this Library in the Arduino IDE library manager
|
||||
Go to Sketch > Include Library > Library Manager > Search for "ESPUI" > Install
|
||||
@ -46,14 +46,19 @@ For macOs: Download the [Repository](https://github.com/s00500/ESPUI/archive/mas
|
||||
|
||||
Download the [Repository](https://github.com/s00500/ESPUI/archive/master.zip), Go to Sketch>Include Library>Add .zip Library> Select the Downloaded .zip File.
|
||||
|
||||
## Getting started (Filesystem upload)
|
||||
## Getting started
|
||||
|
||||
ESPUI **NEEDS** its files burnt on the SPIFFS filesystem on the ESP. **Without this ESPUI will NOT work at all**
|
||||
There are now two ways to do this: you can either use the upload tool or you use the library function `ESPUI.prepareFileSystem()`
|
||||
ESPUI serves several Files to the browser to build up its webinterface. This can be achieved in 2 wasy:
|
||||
*PROGMEM* or *SPIFFS*
|
||||
|
||||
#### Simple filesystem preparation (recomended)
|
||||
*When `ESPUI.begin()` is called the default is serving files from Memory and ESPUI should work out of the box!*
|
||||
|
||||
Just open the example sketch **prepareFileSystem** and run it on the ESP, (give it 5 - 10 seconds),
|
||||
But if this causes your program to *use too much memory* you can burn the files into the SPIFFS filesystem on the ESP.
|
||||
There are now two ways to do this: you can either use the ESP file upload tool or you use the library function `ESPUI.prepareFileSystem()`
|
||||
|
||||
#### Simple filesystem preparation (*recommended*)
|
||||
|
||||
Just open the example sketch **prepareFileSystem** and run it on the ESP, (give it up to 30 seconds, you can see the status on the Serial Monitor),
|
||||
The library will create all needed files.
|
||||
Congratulations, you are done, from now on you just need to to this again when there is a library update, or when you want to use another chip :-)
|
||||
Now you can upload your normal sketch, when you do not call the `ESPUI.prepareFileSystem()` function the compiler will strip out all the unnecessary that is already saved in the chip's filesystem and you have more programm memory to work with.
|
||||
@ -76,15 +81,30 @@ Now you are set to go and use any code you want to with this library
|
||||
|
||||
Checkout the example for the usage
|
||||
|
||||
## Available colors:
|
||||
|
||||
- COLOR_TURQUOISE
|
||||
- COLOR_EMERALD
|
||||
- COLOR_PETERRIVER
|
||||
- COLOR_WETASPHALT
|
||||
- COLOR_SUNFLOWER
|
||||
- COLOR_CARROT
|
||||
- COLOR_ALIZARIN
|
||||
- COLOR_NONE
|
||||
|
||||
## Roadmap :
|
||||
|
||||
- ~~Setup SPIFFS using values in program memory~~
|
||||
- ~~ESP8266 support~~
|
||||
- Document slider
|
||||
- ~~PlattformIO Integration~~
|
||||
- ~~Multiline Labels~~
|
||||
- ~~GZip Files and serve from memory~~
|
||||
- Datagraph output -> *WIP*
|
||||
- Number input -> *WIP*
|
||||
- Text input -> *WIP*
|
||||
- proper return value (as int and not as string) for slider
|
||||
- Maybe a slider range setting, meanwhile please use map()
|
||||
- Maybe a slider range setting, meanwhile please use *map()*
|
||||
- Improve slider stability
|
||||
- Improve general stability
|
||||
|
||||
## Documentation
|
||||
|
||||
@ -94,7 +114,7 @@ ESPUI does not need network access and can be used in standalone access point mo
|
||||
All assets are loaded from the internal SPIFFS filesystem of the ESP32.
|
||||
|
||||
This section will explain in detail how the Library is to be used from the Arduino code side. As of now the Facilino blocks are not implemented.
|
||||
In the arduino setup() routine the interface can be customised by adding UI Elements. This is done by calling the corresponding library methods on the Library object ESPUI. Eg: ESPUI.button(“button”, &myCallback); creates a button in the interface that calls the “myCallback” function when changed. All buttons and items call their callback whenever there is a state change from them. This means the button will call the callback when it is pressed and also again when it is released. To separate different events an integer number with the event name is passed to the callback function that can be handled in a switch(){}case{} statement. Here is an overview of the currently implemented different elements of the UI library:
|
||||
In the arduino setup() routine the interface can be customised by adding UI Elements. This is done by calling the corresponding library methods on the Library object ESPUI. Eg: `ESPUI.button(“button”, &myCallback);` creates a button in the interface that calls the “myCallback” function when changed. All buttons and items call their callback whenever there is a state change from them. This means the button will call the callback when it is pressed and also again when it is released. To separate different events an integer number with the event name is passed to the callback function that can be handled in a `switch(){}case{}` statement. Here is an overview of the currently implemented different elements of the UI library:
|
||||
|
||||
|
||||
#### Button
|
||||
@ -122,17 +142,24 @@ Button pads come in two flavours: with or without a center button. They are very
|
||||
|
||||

|
||||
|
||||
Labels are a nice tool to get information from the robot to the user interface. This can be done to show states, values of sensors and configuration parameters. To send data from the code use ESP.print(labelId, “Text”); . Labels get a name on creation and a initial value. The name is not changeable once the UI initialised.
|
||||
Labels are a nice tool to get information from the robot to the user interface. This can be done to show states, values of sensors and configuration parameters. To send data from the code use `ESP.print(labelId, “Text”);` . Labels get a name on creation and a initial value. The name is not changeable once the UI initialised.
|
||||
|
||||
Labels automatically wrap your text. If you want them to have multiple lines use the normal `<br>` tag in the string you print to the label
|
||||
|
||||
#### Slider
|
||||
|
||||
There is also an slider component now, needs to be documented though
|
||||

|
||||
|
||||
The Slider can be used to slide through a value from 1 to 100. Slides provide realtime data, are touch compatible and can be used to for example control a Servo. The current value is shown while the slider is dragged in a little bubble over the handle.
|
||||
|
||||
#### Initialisation of the UI
|
||||
|
||||
After all the elements are configured you can use ESPUI.begin(“Some Title”); to start the UI interface. Make sure you setup a working network connection or AccesPoint **before** (See example). The web interface can then be used from multiple devices at once and also shows an connection status in the top bar.
|
||||
After all the elements are configured you can use `ESPUI.begin(“Some Title”);` to start the UI interface. (Or `ESPUI.beginSPIFFS(“Some Title”);` respectively) Make sure you setup a working network connection or AccesPoint **before** (See example). The web interface can then be used from multiple devices at once and also shows an connection status in the top bar.
|
||||
The library is designed to be easy to use and can still be extended with a lot of more functionality.
|
||||
|
||||
|
||||
# Notes for Development
|
||||
All changes to the client side files can be made in the examples/gui/data directory. Using the file uploader thin can be used for development. After this you have to compress them and then you can gzip them. I wrote a little useful jsfiddle for this, [CHECK IT OUT](https://jsfiddle.net/s00500/yvLbhuuv/)
|
||||
|
||||
# Contribute
|
||||
Liked this Library? You can **support** me by sending me a :coffee: [Coffee](https://paypal.me/lukasbachschwell/3).
|
||||
|
339
blocks.js
@ -1,339 +0,0 @@
|
||||
// This is a block definition for projects like roboblocks
|
||||
//
|
||||
// Main Block
|
||||
Blockly.Blocks['espui'] = {
|
||||
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
|
||||
helpUrl: Facilino.getHelpUrl('espui'),
|
||||
tags: ['webinterface'],
|
||||
examples: ['lol.bly'],
|
||||
init: function() {
|
||||
var wifiOptions = [
|
||||
['No', false],
|
||||
['Yes', true]
|
||||
];
|
||||
this.appendDummyInput()
|
||||
.appendField('ESPUI Title:')
|
||||
.appendField(new Blockly.FieldTextInput('string'), 'ui_name');
|
||||
this.appendDummyInput()
|
||||
.appendField('Enable Wifi Hotspot Code:')
|
||||
.appendField(new Blockly.FieldDropdown(wifiOptions), 'wifi_option');
|
||||
this.appendStatementInput('ui_elements')
|
||||
.setCheck('ui_element');
|
||||
this.setColour("#37d1f9");
|
||||
this.setTooltip("Creates a webinterface on the ESP32");
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Arduino['espui'] = function(block) {
|
||||
var ui_name = block.getFieldValue('ui_name');
|
||||
var wifi_option = block.getFieldValue('wifi_option');
|
||||
var ui_elements = Blockly.Arduino.statementToCode(block, 'ui_elements');
|
||||
Blockly.Arduino.definitions_['define_wifi_h'] = '#include <WiFi.h>';
|
||||
Blockly.Arduino.definitions_['define_espui_h'] = '#include <ESPUI.h>';
|
||||
Blockly.Arduino.setups_['setup_espui'] = '\n';
|
||||
if(wifi_option){
|
||||
Blockly.Arduino.setups_['setup_espui'] +=
|
||||
' Serial.begin(115200);\n\n' +
|
||||
' WiFi.mode(WIFI_AP);\n' +
|
||||
' WiFi.softAP("' + ui_name + '");\n' +
|
||||
' Serial.print("IP address: ");\n' +
|
||||
' Serial.println(WiFi.softAPIP());\n\n';
|
||||
}
|
||||
Blockly.Arduino.setups_['setup_espui'] += ui_elements;
|
||||
Blockly.Arduino.setups_['setup_espui'] += ' ESPUI.begin("' + ui_name + '");\n';
|
||||
return null;
|
||||
};
|
||||
|
||||
//Elements
|
||||
|
||||
Blockly.Blocks['espui_button'] = {
|
||||
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
|
||||
helpUrl: Facilino.getHelpUrl('espui'),
|
||||
tags: ['webinterface'],
|
||||
examples: ['lol.bly'],
|
||||
init: function() {
|
||||
var colorOptions = [
|
||||
['none', 'COLOR_NONE'],
|
||||
['turquoise', 'COLOR_TURQUOISE'],
|
||||
['emerald', 'COLOR_EMERALD'],
|
||||
['peterriver', 'COLOR_PETERRIVER'],
|
||||
['wet asphalt', 'COLOR_WETASPHALT'],
|
||||
['sunflower', 'COLOR_SUNFLOWER'],
|
||||
['carrot', 'COLOR_CARROT'],
|
||||
['alizarin', 'COLOR_ALIZARIN'],
|
||||
];
|
||||
this.appendDummyInput()
|
||||
.appendField('ESPUI Button')
|
||||
.appendField(new Blockly.FieldTextInput('name'), 'ui_name');
|
||||
this.appendDummyInput()
|
||||
.appendField('UI Color')
|
||||
.appendField(new Blockly.FieldDropdown(colorOptions), 'ui_color');
|
||||
this.appendDummyInput()
|
||||
.appendField('Button Text')
|
||||
.appendField(new Blockly.FieldTextInput('name'), 'button_text');
|
||||
this.setColour("#3357c7");
|
||||
this.setPreviousStatement(true, 'ui_element');
|
||||
this.setNextStatement(true, 'ui_element');
|
||||
this.setTooltip('A web interface button');
|
||||
this.appendStatementInput('on_down')
|
||||
.appendField('Pressed:')
|
||||
.setCheck(null);
|
||||
this.appendStatementInput('on_up')
|
||||
.appendField('Released:')
|
||||
.setCheck(null);
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Arduino['espui_button'] = function(block) {
|
||||
var ui_name = block.getFieldValue('ui_name');
|
||||
var ui_color = block.getFieldValue('ui_color');
|
||||
var button_text = block.getFieldValue('button_text');
|
||||
var ui_name_clean = ui_name.replace(' ', '_');
|
||||
var on_down = Blockly.Arduino.statementToCode(block, 'on_down');
|
||||
var on_up = Blockly.Arduino.statementToCode(block, 'on_up');
|
||||
Blockly.Arduino.definitions_['define_ui_button_' + ui_name_clean] =
|
||||
'void button_' + ui_name_clean + '(Control c, int type) {\n' +
|
||||
' switch(type){\n' +
|
||||
' case B_DOWN:\n' +
|
||||
on_down + '\n break;\n' +
|
||||
' case B_UP:\n' +
|
||||
on_up + '\n break;\n' +
|
||||
' }\n' +
|
||||
'}\n';
|
||||
|
||||
var code = ' ESPUI.button("' + ui_name + '", &button_' + ui_name_clean + ', ' + ui_color + ', "' + button_text + '");\n';
|
||||
return code;
|
||||
};
|
||||
|
||||
Blockly.Blocks['espui_label'] = {
|
||||
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
|
||||
helpUrl: Facilino.getHelpUrl('espui'),
|
||||
tags: ['webinterface'],
|
||||
examples: ['lol.bly'],
|
||||
init: function() {
|
||||
var colorOptions = [
|
||||
['none', 'COLOR_NONE'],
|
||||
['turquoise', 'COLOR_TURQUOISE'],
|
||||
['emerald', 'COLOR_EMERALD'],
|
||||
['peterriver', 'COLOR_PETERRIVER'],
|
||||
['wet asphalt', 'COLOR_WETASPHALT'],
|
||||
['sunflower', 'COLOR_SUNFLOWER'],
|
||||
['carrot', 'COLOR_CARROT'],
|
||||
['alizarin', 'COLOR_ALIZARIN'],
|
||||
];
|
||||
this.appendDummyInput()
|
||||
.appendField('ESPUI Label')
|
||||
.appendField(new Blockly.FieldTextInput('label'), 'ui_name');
|
||||
this.appendDummyInput()
|
||||
.appendField('UI Color')
|
||||
.appendField(new Blockly.FieldDropdown(colorOptions), 'ui_color');
|
||||
this.appendDummyInput()
|
||||
.appendField('Initial Value:')
|
||||
.appendField(new Blockly.FieldTextInput('value'), 'start_value');
|
||||
this.setColour("#3357c7");
|
||||
this.setPreviousStatement(true, 'ui_element');
|
||||
this.setNextStatement(true, 'ui_element');
|
||||
this.setTooltip('A web interface label you can update from your code');
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Arduino['espui_label'] = function(block) {
|
||||
var ui_name = block.getFieldValue('ui_name');
|
||||
var ui_color = block.getFieldValue('ui_color');
|
||||
var ui_name_clean = ui_name.replace(' ', '_');
|
||||
var start_value = block.getFieldValue('start_value');
|
||||
|
||||
var code = ' ESPUI.label("' + ui_name + '", ' + ui_color + ', "' + start_value + '");\n';
|
||||
return code;
|
||||
};
|
||||
|
||||
Blockly.Blocks['espui_switcher'] = {
|
||||
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
|
||||
helpUrl: Facilino.getHelpUrl('espui'),
|
||||
tags: ['webinterface'],
|
||||
examples: ['lol.bly'],
|
||||
init: function() {
|
||||
var colorOptions = [
|
||||
['none', 'COLOR_NONE'],
|
||||
['turquoise', 'COLOR_TURQUOISE'],
|
||||
['emerald', 'COLOR_EMERALD'],
|
||||
['peterriver', 'COLOR_PETERRIVER'],
|
||||
['wet asphalt', 'COLOR_WETASPHALT'],
|
||||
['sunflower', 'COLOR_SUNFLOWER'],
|
||||
['carrot', 'COLOR_CARROT'],
|
||||
['alizarin', 'COLOR_ALIZARIN'],
|
||||
];
|
||||
var stateOptions = [
|
||||
['Off', 'false'],
|
||||
['On', 'true'],
|
||||
];
|
||||
this.appendDummyInput()
|
||||
.appendField('ESPUI Switcher')
|
||||
.appendField(new Blockly.FieldTextInput('name'), 'ui_name');
|
||||
this.appendDummyInput()
|
||||
.appendField('UI Color')
|
||||
.appendField(new Blockly.FieldDropdown(colorOptions), 'ui_color');
|
||||
this.appendDummyInput()
|
||||
.appendField('Initial state')
|
||||
.appendField(new Blockly.FieldDropdown(stateOptions), 'switcher_state');
|
||||
this.setColour("#3357c7");
|
||||
this.setPreviousStatement(true, 'ui_element');
|
||||
this.setNextStatement(true, 'ui_element');
|
||||
this.setTooltip('A web interface button');
|
||||
this.appendStatementInput('on_on')
|
||||
.appendField('When swithed on:')
|
||||
.setCheck(null);
|
||||
this.appendStatementInput('on_off')
|
||||
.appendField('When swithed off:')
|
||||
.setCheck(null);
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Arduino['espui_switcher'] = function(block) {
|
||||
var ui_name = block.getFieldValue('ui_name');
|
||||
var ui_color = block.getFieldValue('ui_color');
|
||||
var switcher_state = block.getFieldValue('switcher_state');
|
||||
var ui_name_clean = ui_name.replace(' ', '_');
|
||||
var on_on = Blockly.Arduino.statementToCode(block, 'on_down');
|
||||
var on_off = Blockly.Arduino.statementToCode(block, 'on_up');
|
||||
Blockly.Arduino.definitions_['define_ui_switcher_' + ui_name_clean] =
|
||||
'void switcher_' + ui_name_clean + '(Control c, int type) {\n' +
|
||||
' switch(type){\n' +
|
||||
' case S_ACTIVE:\n' +
|
||||
on_on + '\n break;\n' +
|
||||
' case S_INACTIVE:\n' +
|
||||
on_off + '\n break;\n' +
|
||||
' }\n' +
|
||||
'}\n';
|
||||
|
||||
var code = ' ESPUI.switcher("' + ui_name + '", ' + switcher_state + ', &switcher_' + ui_name_clean + ', ' + ui_color + ');\n';
|
||||
return code;
|
||||
};
|
||||
|
||||
Blockly.Blocks['espui_pad'] = {
|
||||
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
|
||||
helpUrl: Facilino.getHelpUrl('espui'),
|
||||
tags: ['webinterface'],
|
||||
examples: ['lol.bly'],
|
||||
init: function() {
|
||||
var colorOptions = [
|
||||
['none', 'COLOR_NONE'],
|
||||
['turquoise', 'COLOR_TURQUOISE'],
|
||||
['emerald', 'COLOR_EMERALD'],
|
||||
['peterriver', 'COLOR_PETERRIVER'],
|
||||
['wet asphalt', 'COLOR_WETASPHALT'],
|
||||
['sunflower', 'COLOR_SUNFLOWER'],
|
||||
['carrot', 'COLOR_CARROT'],
|
||||
['alizarin', 'COLOR_ALIZARIN'],
|
||||
];
|
||||
var centerOptions = [
|
||||
['Yes', 'false'],
|
||||
['No', 'true'],
|
||||
];
|
||||
this.appendDummyInput()
|
||||
.appendField('ESPUI ButtonPad')
|
||||
.appendField(new Blockly.FieldTextInput('name'), 'ui_name');
|
||||
this.appendDummyInput()
|
||||
.appendField('UI Color')
|
||||
.appendField(new Blockly.FieldDropdown(colorOptions), 'ui_color');
|
||||
this.appendDummyInput()
|
||||
.appendField('Center button')
|
||||
.appendField(new Blockly.FieldDropdown(centerOptions), 'pad_center');
|
||||
this.setColour("#3357c7");
|
||||
this.setPreviousStatement(true, 'ui_element');
|
||||
this.setNextStatement(true, 'ui_element');
|
||||
this.setTooltip('A web interface button');
|
||||
|
||||
this.appendStatementInput('on_down_for')
|
||||
.appendField('Forward press:')
|
||||
.setCheck(null);
|
||||
this.appendStatementInput('on_up_for')
|
||||
.appendField('Forward release:')
|
||||
.setCheck(null);
|
||||
|
||||
this.appendStatementInput('on_down_back')
|
||||
.appendField('Back press:')
|
||||
.setCheck(null);
|
||||
this.appendStatementInput('on_up_back')
|
||||
.appendField('Back release:')
|
||||
.setCheck(null);
|
||||
|
||||
this.appendStatementInput('on_down_left')
|
||||
.appendField('Right press:')
|
||||
.setCheck(null);
|
||||
this.appendStatementInput('on_up_left')
|
||||
.appendField('Right release:')
|
||||
.setCheck(null);
|
||||
|
||||
this.appendStatementInput('on_down_right')
|
||||
.appendField('Left press:')
|
||||
.setCheck(null);
|
||||
this.appendStatementInput('on_up_right')
|
||||
.appendField('Left release:')
|
||||
.setCheck(null);
|
||||
|
||||
this.appendStatementInput('on_down_center')
|
||||
.appendField('Center press:')
|
||||
.setCheck(null);
|
||||
this.appendStatementInput('on_up_center')
|
||||
.appendField('Center release:')
|
||||
.setCheck(null);
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Arduino['espui_pad'] = function(block) {
|
||||
var ui_name = block.getFieldValue('ui_name');
|
||||
var ui_color = block.getFieldValue('ui_color');
|
||||
var pad_center = block.getFieldValue('pad_center');
|
||||
var ui_name_clean = ui_name.replace(' ', '_');
|
||||
|
||||
var on_down_for = Blockly.Arduino.statementToCode(block, 'on_down_for');
|
||||
var on_up_for = Blockly.Arduino.statementToCode(block, 'on_up_for');
|
||||
|
||||
var on_down_back = Blockly.Arduino.statementToCode(block, 'on_down_back');
|
||||
var on_up_back = Blockly.Arduino.statementToCode(block, 'on_up_back');
|
||||
|
||||
var on_down_left = Blockly.Arduino.statementToCode(block, 'on_down_left');
|
||||
var on_up_left = Blockly.Arduino.statementToCode(block, 'on_up_left');
|
||||
|
||||
var on_down_right = Blockly.Arduino.statementToCode(block, 'on_down_right');
|
||||
var on_up_right = Blockly.Arduino.statementToCode(block, 'on_up_right');
|
||||
|
||||
var on_down_center = Blockly.Arduino.statementToCode(block, 'on_down_center');
|
||||
var on_up_center = Blockly.Arduino.statementToCode(block, 'on_up_center');
|
||||
|
||||
|
||||
Blockly.Arduino.definitions_['define_ui_pad_' + ui_name_clean] =
|
||||
'void pad_' + ui_name_clean + '(Control c, int type) {\n' +
|
||||
' switch(type){\n' +
|
||||
|
||||
' case P_FOR_DOWN:\n' +
|
||||
on_down_for + '\n break;\n' +
|
||||
' case P_FOR_UP:\n' +
|
||||
on_up_for + '\n break;\n' +
|
||||
|
||||
' case P_BACK_DOWN:\n' +
|
||||
on_down_back + '\n break;\n' +
|
||||
' case P_BACK_UP:\n' +
|
||||
on_up_back + '\n break;\n' +
|
||||
|
||||
' case P_RIGHT_DOWN:\n' +
|
||||
on_down_left + '\n break;\n' +
|
||||
' case P_RIGHT_UP:\n' +
|
||||
on_up_left + '\n break;\n' +
|
||||
|
||||
' case P_LEFT_DOWN:\n' +
|
||||
on_down_right + '\n break;\n' +
|
||||
' case P_LEFT_UP:\n' +
|
||||
on_up_right + '\n break;\n' +
|
||||
|
||||
' case P_CENTER_DOWN:\n' +
|
||||
on_down_center + '\n break;\n' +
|
||||
' case P_CENTER_UP:\n' +
|
||||
on_up_center + '\n break;\n' +
|
||||
' }\n' +
|
||||
'}\n';
|
||||
|
||||
var code = ' ESPUI.pad("' + ui_name + '", ' + pad_center + ', &pad_' + ui_name_clean + ', ' + ui_color + ');\n';
|
||||
return code;
|
||||
};
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 21 KiB |
BIN
docs/ui_slider.png
Normal file
After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 11 KiB |
@ -79,6 +79,12 @@
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.label-wrap {
|
||||
width: 90%;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.label.color-blue {
|
||||
background-color: #6f9ad1;
|
||||
}
|
||||
@ -322,6 +328,7 @@
|
||||
padding: 10px;
|
||||
border-radius: 3px;
|
||||
color: #fff;
|
||||
background-color: #999999;
|
||||
}
|
||||
|
||||
/* Main Head Part
|
||||
@ -496,24 +503,31 @@
|
||||
}
|
||||
|
||||
.switch input[type="checkbox"] {
|
||||
display: none;
|
||||
cursor: pointer;
|
||||
height: 10px;
|
||||
left: 12px;
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
-webkit-transition: left 0.05s ease-in-out;
|
||||
-moz-transition: left 0.05s ease-in-out;
|
||||
-o-transition: left 0.05s ease-in-out;
|
||||
-ms-transition: left 0.05s ease-in-out;
|
||||
transition: left 0.05s ease-in-out;
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
.switch.checked input[type="checkbox"] {
|
||||
.in {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 12px;
|
||||
-webkit-transition: left 0.08s ease-in-out;
|
||||
-moz-transition: left 0.08s ease-in-out;
|
||||
-o-transition: left 0.08s ease-in-out;
|
||||
-ms-transition: left 0.08s ease-in-out;
|
||||
transition: left 0.08s ease-in-out;
|
||||
}
|
||||
|
||||
.switch.checked div {
|
||||
left: 38px;
|
||||
}
|
||||
|
||||
.switch input:before {
|
||||
.switch .in:before {
|
||||
background: #fff;
|
||||
background: -moz-linear-gradient(top, #fff 0%, #f0f0f0 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #f0f0f0));
|
||||
@ -532,7 +546,7 @@
|
||||
width: 26px;
|
||||
}
|
||||
|
||||
.switch input:after {
|
||||
.switch .in:after {
|
||||
background: #f0f0f0;
|
||||
background: -moz-linear-gradient(top, #f0f0f0 0%, #fff 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f0f0f0), color-stop(100%, #fff));
|
||||
@ -548,20 +562,6 @@
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
.switch .icon-ok, .switch .icon-remove {
|
||||
line-height: 28px;
|
||||
text-shadow: 0 -2px 0 rgba(0, 0, 0, 0.2);
|
||||
margin: 0 9px;
|
||||
}
|
||||
|
||||
.switch .icon-ok {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.switch .icon-remove {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Material Design Range Slider - by Ravikumar Chauhan
|
||||
------------------------------------------------------------------------- */
|
||||
|
2
examples/gui/data/css/style.min.css
vendored
@ -10,7 +10,7 @@
|
||||
<link rel="stylesheet" href="/css/normalize.css">
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
|
||||
<script src="/js/zepto.js"></script>
|
||||
<script src="/js/zepto.min.js"></script>
|
||||
<script src="/js/slider.js"></script>
|
||||
<script src="/js/controls.js"></script>
|
||||
</head>
|
||||
|
65
examples/gui/data/js/controls.js
vendored
@ -1,14 +1,31 @@
|
||||
const UI_TITEL = 0;
|
||||
|
||||
const UI_LABEL = 1;
|
||||
const UPDATE_LABEL = 6;
|
||||
|
||||
const UI_BUTTON = 2;
|
||||
|
||||
const UI_SWITCHER = 3;
|
||||
const UPDATE_SWITCHER = 7;
|
||||
|
||||
const UI_PAD = 4;
|
||||
const UI_CPAD = 5;
|
||||
const UPDATE_LABEL = 6;
|
||||
const UPDATE_SWITCHER = 7;
|
||||
|
||||
const UI_SLIDER = 8;
|
||||
const UPDATE_SLIDER = 9;
|
||||
|
||||
|
||||
|
||||
const UI_NUMBER = 10;
|
||||
const UPDATE_NUMBER = 11;
|
||||
|
||||
const UI_TEXT_INPUT = 12;
|
||||
const UPDATE_TEXT_INPUT = 13;
|
||||
|
||||
const UI_GRAPH = 14;
|
||||
const CLEAR_GRAPH = 15;
|
||||
const ADD_GRAPH_POINT = 16;
|
||||
|
||||
const FOR = 0;
|
||||
const BACK = 1;
|
||||
const LEFT = 2;
|
||||
@ -97,7 +114,7 @@ function start() {
|
||||
$('#mainHeader').html(data.label);
|
||||
break;
|
||||
case UI_LABEL:
|
||||
$('#row').append("<div class='two columns card tcenter " + colorClass(data.color) + "'><h5 id='" + data.id + "'>" + data.label + "</h5><hr /><span id='l" + data.id + "' class='label'>" + data.value + "</span></div>");
|
||||
$('#row').append("<div class='two columns card tcenter " + colorClass(data.color) + "'><h5 id='" + data.id + "'>" + data.label + "</h5><hr /><span id='l" + data.id + "' class='label label-wrap'>" + data.value + "</span></div>");
|
||||
break;
|
||||
case UI_BUTTON:
|
||||
$('#row').append("<div class='one columns card tcenter " + colorClass(data.color) + "'><h5>" + data.label + "</h5><hr/><button onmousedown='buttonclick(" + data.id + ", true)' onmouseup='buttonclick(" + data.id + ", false)' id='" + data.id + "'>" + data.value + "</button></div>");
|
||||
@ -116,15 +133,14 @@ function start() {
|
||||
break;
|
||||
case UI_SWITCHER:
|
||||
var label = "<label id='sl" + data.id + "' class='switch checked'>";
|
||||
var input = "<input type='checkbox' id='s" + data.id + "' onClick='switcher(" + data.id + ",null)' checked>";
|
||||
var input = "<div class='in'><input type='checkbox' id='s" + data.id + "' onClick='switcher(" + data.id + ",null)' checked></div>";
|
||||
if (data.value == "0") {
|
||||
label = "<label id='sl" + data.id + "' class='switch'>";
|
||||
input = "<input type='checkbox' id='s" + data.id + "' onClick='switcher(" + data.id + ",null)' >";
|
||||
input = "<div class='in'><input type='checkbox' id='s" + data.id + "' onClick='switcher(" + data.id + ",null)' ></div>";
|
||||
}
|
||||
$('#row').append(
|
||||
"<div id='" + data.id + "' class='one columns card tcenter " + colorClass(data.color) + "'><h5>" + data.label + "</h5><hr/>" +
|
||||
label + "<i class='icon-ok'></i>" +
|
||||
"<i class='icon-remove'></i>" + input +
|
||||
label + input +
|
||||
"</label>" +
|
||||
"</div>");
|
||||
break;
|
||||
@ -233,8 +249,35 @@ function start() {
|
||||
break;
|
||||
|
||||
case UPDATE_SLIDER:
|
||||
slider_move($('#sl'+data.id), data.value ,'100', false);
|
||||
slider_move($('#sl' + data.id), data.value, '100', false);
|
||||
break;
|
||||
|
||||
case UI_NUMBER:
|
||||
$('#row').append(
|
||||
"<div class='two columns card tcenter" + colorClass(data.color) + "'>" +
|
||||
"<h5 id='" + data.id + "'>" + data.label + "</h5><hr />" +
|
||||
"<input id='num" + data.id + "' type='number' value='" + data.value + "' onchange='numberchange(" + data.id + ")' />" +
|
||||
"</div>"
|
||||
);
|
||||
break;
|
||||
|
||||
case UPDATE_NUMBER:
|
||||
$('#num' + data.id).val(data.value);
|
||||
break;
|
||||
|
||||
case UI_TEXT_INPUT:
|
||||
$('#row').append(
|
||||
"<div class='two columns card tcenter" + colorClass(data.color) + "'>" +
|
||||
"<h5 id='" + data.id + "'>" + data.label + "</h5><hr />" +
|
||||
"<input id='num" + data.id + "' type='number' value='" + data.value + "' onchange='numberchange(" + data.id + ")' />" +
|
||||
"</div>"
|
||||
);
|
||||
break;
|
||||
|
||||
case UPDATE_TEXT_INPUT:
|
||||
$('#num' + data.id).val(data.value);
|
||||
break;
|
||||
|
||||
default:
|
||||
console.error('Unknown type or event');
|
||||
break;
|
||||
@ -242,6 +285,12 @@ function start() {
|
||||
};
|
||||
}
|
||||
|
||||
function numberchange(number) {
|
||||
var val = $('#num' + data.id).val();
|
||||
websock.send("nchange:" + number + ":" + val);
|
||||
console.log(val);
|
||||
}
|
||||
|
||||
|
||||
function buttonclick(number, isdown) {
|
||||
if (isdown) websock.send("bdown:" + number);
|
||||
|
2
examples/gui/data/js/controls.min.js
vendored
@ -12,60 +12,6 @@ const char *password = "";
|
||||
long oldTime = 0;
|
||||
bool switchi = false;
|
||||
|
||||
void setup(void) {
|
||||
Serial.begin(115200);
|
||||
WiFi.mode(WIFI_AP);
|
||||
|
||||
#if defined(ESP32)
|
||||
WiFi.setHostname(ssid);
|
||||
#else
|
||||
WiFi.hostname(ssid);
|
||||
#endif
|
||||
|
||||
WiFi.softAP(ssid);
|
||||
// WiFi.softAP(ssid, password);
|
||||
Serial.println("");
|
||||
Serial.print("IP address: ");
|
||||
Serial.println(WiFi.softAPIP());
|
||||
|
||||
// change the beginning to this if you want to join an existing network
|
||||
/*
|
||||
Serial.begin(115200);
|
||||
WiFi.begin(ssid, password);
|
||||
Serial.println("");
|
||||
// Wait for connection
|
||||
while (WiFi.status() != WL_CONNECTED) {
|
||||
delay(500);
|
||||
Serial.print(".");
|
||||
}
|
||||
Serial.println("");
|
||||
Serial.print("IP address: ");
|
||||
Serial.println(WiFi.localIP());
|
||||
*/
|
||||
|
||||
ESPUI.label("Status:", COLOR_TURQUOISE, "Stop");
|
||||
ESPUI.label("Millis:", COLOR_EMERALD, "0");
|
||||
ESPUI.button("Push Button", &buttonCallback, COLOR_PETERRIVER);
|
||||
ESPUI.button("Other Button", &buttonExample, COLOR_WETASPHALT, "Press");
|
||||
ESPUI.pad("Pad with center", true, &padExample, COLOR_SUNFLOWER);
|
||||
ESPUI.pad("Pad without center", false, &padExample, COLOR_CARROT);
|
||||
ESPUI.switcher("Switch one", false, &switchExample, COLOR_ALIZARIN);
|
||||
ESPUI.switcher("Switch two", true, &otherSwitchExample, COLOR_NONE);
|
||||
ESPUI.slider("Slider one", &slider, COLOR_ALIZARIN, "30");
|
||||
ESPUI.slider("Slider two", &slider, COLOR_NONE, "100");
|
||||
|
||||
ESPUI.begin("ESP32 Control");
|
||||
}
|
||||
|
||||
void loop(void) {
|
||||
if (millis() - oldTime > 5000) {
|
||||
ESPUI.print("Millis:", String(millis()));
|
||||
switchi = !switchi;
|
||||
ESPUI.updateSwitcher("Switch one", switchi);
|
||||
oldTime = millis();
|
||||
}
|
||||
}
|
||||
|
||||
void slider(Control sender, int type) {
|
||||
Serial.println(sender.value);
|
||||
}
|
||||
@ -155,3 +101,61 @@ void otherSwitchExample(Control sender, int value) {
|
||||
Serial.print(" ");
|
||||
Serial.println(sender.id);
|
||||
}
|
||||
|
||||
void setup(void) {
|
||||
Serial.begin(115200);
|
||||
WiFi.mode(WIFI_AP);
|
||||
|
||||
#if defined(ESP32)
|
||||
WiFi.setHostname(ssid);
|
||||
#else
|
||||
WiFi.hostname(ssid);
|
||||
#endif
|
||||
|
||||
WiFi.softAP(ssid);
|
||||
// WiFi.softAP(ssid, password);
|
||||
Serial.println("");
|
||||
Serial.print("IP address: ");
|
||||
Serial.println(WiFi.softAPIP());
|
||||
|
||||
// change the beginning to this if you want to join an existing network
|
||||
/*
|
||||
Serial.begin(115200);
|
||||
WiFi.begin(ssid, password);
|
||||
Serial.println("");
|
||||
// Wait for connection
|
||||
while (WiFi.status() != WL_CONNECTED) {
|
||||
delay(500);
|
||||
Serial.print(".");
|
||||
}
|
||||
Serial.println("");
|
||||
Serial.print("IP address: ");
|
||||
Serial.println(WiFi.localIP());
|
||||
*/
|
||||
|
||||
ESPUI.label("Status:", COLOR_TURQUOISE, "Stop");
|
||||
ESPUI.label("Millis:", COLOR_EMERALD, "0");
|
||||
ESPUI.button("Push Button", &buttonCallback, COLOR_PETERRIVER);
|
||||
ESPUI.button("Other Button", &buttonExample, COLOR_WETASPHALT, "Press");
|
||||
ESPUI.pad("Pad with center", true, &padExample, COLOR_SUNFLOWER);
|
||||
ESPUI.pad("Pad without center", false, &padExample, COLOR_CARROT);
|
||||
ESPUI.switcher("Switch one", false, &switchExample, COLOR_ALIZARIN);
|
||||
ESPUI.switcher("Switch two", true, &otherSwitchExample, COLOR_NONE);
|
||||
ESPUI.slider("Slider one", &slider, COLOR_ALIZARIN, "30");
|
||||
ESPUI.slider("Slider two", &slider, COLOR_NONE, "100");
|
||||
|
||||
/*
|
||||
.begin loads and serves all files from PROGMEM directly.
|
||||
If you want to serve the files from SPIFFS use .beginSPIFFS (.prepareFileSystem has to be run in an empty sketch before)
|
||||
*/
|
||||
ESPUI.begin("ESPUI Control");
|
||||
}
|
||||
|
||||
void loop(void) {
|
||||
if (millis() - oldTime > 5000) {
|
||||
ESPUI.print("Millis:", String(millis()));
|
||||
switchi = !switchi;
|
||||
ESPUI.updateSwitcher("Switch one", switchi);
|
||||
oldTime = millis();
|
||||
}
|
||||
}
|
||||
|
2
img/blocks/acknowledgements.html
Normal file
@ -0,0 +1,2 @@
|
||||
<div>Icons made by <a href="https://www.flaticon.com/authors/smashicons" title="Smashicons">Smashicons</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div>
|
||||
<div>Icons made by <a href="http://www.freepik.com" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div>
|
54
img/blocks/button_pressed.svg
Normal file
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 297 297" style="enable-background:new 0 0 297 297;" xml:space="preserve">
|
||||
<g>
|
||||
<path d="M252.07,167.87c-4.949-29.482-26.585-35.193-35.98-36.267c-6.673-8.979-16.33-13.892-27.432-13.892
|
||||
c-2.664,0-5.165,0.28-7.412,0.697c-6.587-7.587-15.832-11.686-26.139-11.686c-0.209,0-0.906,0.002-0.906,0.005v-9.013
|
||||
c15-9.416,24.883-25.934,24.883-44.716c0-29.225-23.635-53-52.859-53S73.066,23.775,73.066,53c0,18.65,10.135,35.069,24.135,44.518
|
||||
v43.873l-0.429-1.012c-5.388-8.765-13.937-13.786-23.688-13.787c-10.507-0.001-20.581,5.932-25.753,15.112
|
||||
c-4.941,8.77-4.662,18.985,0.701,28.089l62.342,119.392c2.486,4.759,7.382,7.815,12.751,7.815h87.757
|
||||
c7.578,0,13.879-6.025,14.343-13.59l2.04-33.263C249.032,216.644,256.227,192.64,252.07,167.87z M85.136,53
|
||||
c0-22.607,18.508-41,41.115-41s40.776,18.393,40.776,41c0,11.592-4.826,22.066-12.826,29.531V69.753
|
||||
c0-3.05-0.842-8.673-0.842-8.673c0.761-2.562,1.259-5.271,1.259-8.08c0-15.649-12.643-28.335-28.293-28.335
|
||||
c-15.648,0-28.313,12.686-28.313,28.335c0,2.568,0.364,5.053,1.005,7.419c-0.017,0.052-0.199,0.101-0.216,0.152
|
||||
c-0.909,2.859-1.599,5.939-1.599,9.182v12.484C90.201,74.793,85.136,64.438,85.136,53z M215.832,245.648
|
||||
c-0.228,0.345-0.364,0.747-0.39,1.16l-2.196,35.866c-0.076,1.25-1.112,2.325-2.365,2.325h-87.757c-0.883,0-1.692-0.591-2.1-1.373
|
||||
L58.539,163.986c-7.93-13.086,3.246-25.37,14.658-25.369c5.049,0,10.146,2.388,13.653,8.176l7.994,12.275
|
||||
c1.653,2.54,3.943,3.674,6.438,3.674c4.107,0,7.918-3.088,7.918-8.077V69.753c0-11.035,8.224-16.552,16.5-16.552
|
||||
c8.276,0,16.5,5.517,16.5,16.552v48.273c0,1.346,1.381,2.376,2.637,2.376c0.236,0,0.618-0.037,0.86-0.114
|
||||
c2.311-0.744,5.794-1.564,9.619-1.564c6.569,0,14.385,2.422,19.857,11.809c0.462,0.792,1.311,1.262,2.181,1.262
|
||||
c0.278,0,0.57-0.049,0.845-0.15c2.201-0.81,6.048-1.932,10.454-1.932c6.133,0,13.357,2.176,18.744,10.4
|
||||
c1.285,1.962,3.461,3.149,5.801,3.282c7.438,0.422,23.267,4.01,27.036,26.462C243.853,191.414,237.617,212.653,215.832,245.648z"/>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
53
img/blocks/button_released.svg
Normal file
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 285.328 285.328" style="enable-background:new 0 0 285.328 285.328;" xml:space="preserve">
|
||||
<g>
|
||||
<path d="M230.71,155.764c-2.799-16.547-11.149-25.21-17.662-29.563c-6.352-4.246-12.953-5.882-18.102-6.433
|
||||
c-6.64-8.881-16.195-13.73-27.209-13.73c-2.417-0.001-4.878,0.231-7.351,0.69c-5.867-6.705-13.708-10.661-22.569-11.403
|
||||
c12.83-9.682,21.14-25.049,21.14-42.324c0-29.225-23.775-53-53-53s-53,23.775-53,53c0,18.704,9.748,35.163,24.421,44.599
|
||||
l0.017,13.992l0.041,33.745c-7.59,4.057-12.837,10.48-15.269,18.749c-3.746,12.739-0.76,29.147,9.13,50.16
|
||||
c6.509,13.827,14.322,25.924,18.062,31.44l1.658,22.07c0.74,9.854,9.061,17.572,18.942,17.572l78.646-0.097
|
||||
c9.489-0.012,17.576-7.115,18.812-16.523l3.054-23.263C229.043,216.331,235.851,186.165,230.71,155.764z M77.33,58.413L77.36,82.34
|
||||
C69.716,74.889,64.957,64.492,64.957,53c0-22.607,18.393-41,41-41c22.607,0,41,18.393,41,41c0,11.683-4.919,22.23-12.785,29.706
|
||||
l-0.029-24.361c-0.011-8.464-3.266-16.01-9.166-21.25c-5.172-4.593-12.005-7.123-19.238-7.123c-7.751,0-15.192,2.999-20.414,8.228
|
||||
C80.085,43.445,77.321,50.436,77.33,58.413z M199.797,239.861c-0.565,0.873-0.939,1.863-1.075,2.895l-3.202,24.389
|
||||
c-0.456,3.479-3.419,6.249-6.928,6.254l-78.623,0.265c-0.003,0-0.006,0-0.009,0c-3.66,0-6.702-2.989-6.976-6.64l-1.76-23.493
|
||||
c-0.093-1.235-0.509-2.46-1.211-3.48c-7.197-10.457-47.38-71.494-14.839-85.098c2.59-1.082,4.268-3.631,4.265-6.438
|
||||
c-0.021-16.613-0.086-71.755-0.109-90.112c-0.014-10.948,8.197-16.429,16.408-16.429c8.195,0,16.391,5.458,16.404,16.385
|
||||
l0.05,42.287c0.005,3.916,3.194,6.986,6.974,6.986c0.362,0,0.729-0.028,1.1-0.087c1.39-0.219,2.9-0.36,4.48-0.36
|
||||
c5.907,0,12.798,1.978,18.078,9.293c1.312,1.816,3.41,2.811,5.589,2.811c0.611,0,1.23-0.079,1.839-0.239
|
||||
c2.07-0.548,4.661-1.014,7.484-1.013c6.169,0,13.447,2.225,18.814,10.681c1.076,1.695,2.904,2.752,4.911,2.824
|
||||
c7.09,0.256,23.55,3.362,27.416,26.223C222.461,178.954,220.811,207.381,199.797,239.861z"/>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
97
img/blocks/controller_center_pressed.svg
Normal file
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 480.00001 480.00001"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="controller_center_pressed.svg"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
width="480"
|
||||
height="480"><metadata
|
||||
id="metadata47"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs45" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
id="namedview43"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.54742791"
|
||||
inkscape:cx="-10.370455"
|
||||
inkscape:cy="215.5535"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1"
|
||||
units="px" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path2"
|
||||
d="m 232.419,191.328 c 2.418,2.548 5.663,3.951 9.134,3.951 3.471,0 6.716,-1.403 9.134,-3.951 l 52.122,-54.912 c 3.923,-4.133 6.881,-11.547 6.881,-17.245 V 17.893 c 0,-7.168 -5.832,-12.9999996 -13,-12.9999996 H 186.417 c -7.168,0 -13,5.8319996 -13,12.9999996 V 119.17 c 0,5.698 2.958,13.112 6.881,17.245 z m 9.135,-165.276 c 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.282,-36.369 36.369,-36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4"
|
||||
d="m 250.687,289.565 c -2.418,-2.548 -5.662,-3.95 -9.133,-3.95 -3.471,0 -6.715,1.402 -9.134,3.95 l -52.122,54.913 c -3.923,4.133 -6.881,11.547 -6.881,17.245 V 463 c 0,7.168 5.832,13 13,13 H 296.69 c 7.168,0 13,-5.832 13,-13 V 361.723 c 0,-5.698 -2.958,-13.112 -6.881,-17.245 z m -9.133,165.276 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;fill-opacity:1;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6"
|
||||
d="M 464.107,172.31001 H 362.83 c -5.699,0 -13.112,2.958 -17.244,6.881 l -54.914,52.122 c -2.548,2.418 -3.951,5.662 -3.951,9.134 0,3.472 1.403,6.716 3.951,9.135 l 54.913,52.12 c 4.132,3.924 11.546,6.882 17.245,6.882 h 101.277 c 7.168,0 13,-5.832 13,-13 v -110.274 c 0,-7.168 -5.832,-13 -13,-13 z m -44.528,104.506 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path8"
|
||||
d="m 196.386,240.44701 c 0,-3.472 -1.403,-6.716 -3.951,-9.135 l -54.913,-52.12 c -4.132,-3.924 -11.546,-6.882 -17.245,-6.882 H 19 c -7.168,0 -13,5.832 -13,13 v 110.273 c 0,7.168 5.832,13 13,13 h 101.277 c 5.699,0 13.112,-2.958 17.244,-6.881 l 54.914,-52.122 c 2.548,-2.417 3.951,-5.662 3.951,-9.133 z m -132.858,36.369 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 10e-4,20.086 -16.282,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><g
|
||||
id="g12"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g14"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g16"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g18"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g20"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g22"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g24"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g26"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g28"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g30"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g32"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g34"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g36"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g38"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g40"
|
||||
transform="translate(0,48.893005)" /><ellipse
|
||||
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:9;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
id="path4599-2"
|
||||
cx="242.02635"
|
||||
cy="240.7314"
|
||||
rx="38.337769"
|
||||
ry="37.802738" /></svg>
|
After Width: | Height: | Size: 5.4 KiB |
97
img/blocks/controller_center_released.svg
Normal file
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 480.00001 480.00001"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="controller_center_released.svg"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
width="480"
|
||||
height="480"><metadata
|
||||
id="metadata47"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs45" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
id="namedview43"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.54742791"
|
||||
inkscape:cx="-10.370455"
|
||||
inkscape:cy="215.5535"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1"
|
||||
units="px" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path2"
|
||||
d="m 232.419,191.328 c 2.418,2.548 5.663,3.951 9.134,3.951 3.471,0 6.716,-1.403 9.134,-3.951 l 52.122,-54.912 c 3.923,-4.133 6.881,-11.547 6.881,-17.245 V 17.893 c 0,-7.168 -5.832,-12.9999996 -13,-12.9999996 H 186.417 c -7.168,0 -13,5.8319996 -13,12.9999996 V 119.17 c 0,5.698 2.958,13.112 6.881,17.245 z m 9.135,-165.276 c 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.282,-36.369 36.369,-36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4"
|
||||
d="m 250.687,289.565 c -2.418,-2.548 -5.662,-3.95 -9.133,-3.95 -3.471,0 -6.715,1.402 -9.134,3.95 l -52.122,54.913 c -3.923,4.133 -6.881,11.547 -6.881,17.245 V 463 c 0,7.168 5.832,13 13,13 H 296.69 c 7.168,0 13,-5.832 13,-13 V 361.723 c 0,-5.698 -2.958,-13.112 -6.881,-17.245 z m -9.133,165.276 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;fill-opacity:1;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6"
|
||||
d="M 464.107,172.31001 H 362.83 c -5.699,0 -13.112,2.958 -17.244,6.881 l -54.914,52.122 c -2.548,2.418 -3.951,5.662 -3.951,9.134 0,3.472 1.403,6.716 3.951,9.135 l 54.913,52.12 c 4.132,3.924 11.546,6.882 17.245,6.882 h 101.277 c 7.168,0 13,-5.832 13,-13 v -110.274 c 0,-7.168 -5.832,-13 -13,-13 z m -44.528,104.506 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path8"
|
||||
d="m 196.386,240.44701 c 0,-3.472 -1.403,-6.716 -3.951,-9.135 l -54.913,-52.12 c -4.132,-3.924 -11.546,-6.882 -17.245,-6.882 H 19 c -7.168,0 -13,5.832 -13,13 v 110.273 c 0,7.168 5.832,13 13,13 h 101.277 c 5.699,0 13.112,-2.958 17.244,-6.881 l 54.914,-52.122 c 2.548,-2.417 3.951,-5.662 3.951,-9.133 z m -132.858,36.369 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 10e-4,20.086 -16.282,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><g
|
||||
id="g12"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g14"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g16"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g18"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g20"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g22"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g24"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g26"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g28"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g30"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g32"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g34"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g36"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g38"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g40"
|
||||
transform="translate(0,48.893005)" /><ellipse
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:9;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
id="path4599-2"
|
||||
cx="242.02635"
|
||||
cy="240.7314"
|
||||
rx="38.337769"
|
||||
ry="37.802738" /></svg>
|
After Width: | Height: | Size: 5.4 KiB |
97
img/blocks/controller_down_pressed.svg
Normal file
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 480.00001 480.00001"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="controller_down_pressed.svg"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
width="480"
|
||||
height="480"><metadata
|
||||
id="metadata47"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs45" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
id="namedview43"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.54742791"
|
||||
inkscape:cx="-10.370455"
|
||||
inkscape:cy="215.5535"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1"
|
||||
units="px" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path2"
|
||||
d="m 232.419,191.328 c 2.418,2.548 5.663,3.951 9.134,3.951 3.471,0 6.716,-1.403 9.134,-3.951 l 52.122,-54.912 c 3.923,-4.133 6.881,-11.547 6.881,-17.245 V 17.893 c 0,-7.168 -5.832,-12.9999996 -13,-12.9999996 H 186.417 c -7.168,0 -13,5.8319996 -13,12.9999996 V 119.17 c 0,5.698 2.958,13.112 6.881,17.245 z m 9.135,-165.276 c 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.282,-36.369 36.369,-36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4"
|
||||
d="m 250.687,289.565 c -2.418,-2.548 -5.662,-3.95 -9.133,-3.95 -3.471,0 -6.715,1.402 -9.134,3.95 l -52.122,54.913 c -3.923,4.133 -6.881,11.547 -6.881,17.245 V 463 c 0,7.168 5.832,13 13,13 H 296.69 c 7.168,0 13,-5.832 13,-13 V 361.723 c 0,-5.698 -2.958,-13.112 -6.881,-17.245 z m -9.133,165.276 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6"
|
||||
d="M 464.107,172.31001 H 362.83 c -5.699,0 -13.112,2.958 -17.244,6.881 l -54.914,52.122 c -2.548,2.418 -3.951,5.662 -3.951,9.134 0,3.472 1.403,6.716 3.951,9.135 l 54.913,52.12 c 4.132,3.924 11.546,6.882 17.245,6.882 h 101.277 c 7.168,0 13,-5.832 13,-13 v -110.274 c 0,-7.168 -5.832,-13 -13,-13 z m -44.528,104.506 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path8"
|
||||
d="m 196.386,240.44701 c 0,-3.472 -1.403,-6.716 -3.951,-9.135 l -54.913,-52.12 c -4.132,-3.924 -11.546,-6.882 -17.245,-6.882 H 19 c -7.168,0 -13,5.832 -13,13 v 110.273 c 0,7.168 5.832,13 13,13 h 101.277 c 5.699,0 13.112,-2.958 17.244,-6.881 l 54.914,-52.122 c 2.548,-2.417 3.951,-5.662 3.951,-9.133 z m -132.858,36.369 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 10e-4,20.086 -16.282,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><g
|
||||
id="g12"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g14"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g16"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g18"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g20"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g22"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g24"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g26"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g28"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g30"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g32"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g34"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g36"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g38"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g40"
|
||||
transform="translate(0,48.893005)" /><ellipse
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#808080;stroke-width:9;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
id="path4599-2"
|
||||
cx="242.02635"
|
||||
cy="240.7314"
|
||||
rx="38.337769"
|
||||
ry="37.802738" /></svg>
|
After Width: | Height: | Size: 5.4 KiB |
97
img/blocks/controller_down_released.svg
Normal file
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 480.00001 480.00001"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="controller_down_released.svg"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
width="480"
|
||||
height="480"><metadata
|
||||
id="metadata47"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs45" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
id="namedview43"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.54742791"
|
||||
inkscape:cx="-10.370455"
|
||||
inkscape:cy="215.5535"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1"
|
||||
units="px" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path2"
|
||||
d="m 232.419,191.328 c 2.418,2.548 5.663,3.951 9.134,3.951 3.471,0 6.716,-1.403 9.134,-3.951 l 52.122,-54.912 c 3.923,-4.133 6.881,-11.547 6.881,-17.245 V 17.893 c 0,-7.168 -5.832,-12.9999996 -13,-12.9999996 H 186.417 c -7.168,0 -13,5.8319996 -13,12.9999996 V 119.17 c 0,5.698 2.958,13.112 6.881,17.245 z m 9.135,-165.276 c 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.282,-36.369 36.369,-36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4"
|
||||
d="m 250.687,289.565 c -2.418,-2.548 -5.662,-3.95 -9.133,-3.95 -3.471,0 -6.715,1.402 -9.134,3.95 l -52.122,54.913 c -3.923,4.133 -6.881,11.547 -6.881,17.245 V 463 c 0,7.168 5.832,13 13,13 H 296.69 c 7.168,0 13,-5.832 13,-13 V 361.723 c 0,-5.698 -2.958,-13.112 -6.881,-17.245 z m -9.133,165.276 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6"
|
||||
d="M 464.107,172.31001 H 362.83 c -5.699,0 -13.112,2.958 -17.244,6.881 l -54.914,52.122 c -2.548,2.418 -3.951,5.662 -3.951,9.134 0,3.472 1.403,6.716 3.951,9.135 l 54.913,52.12 c 4.132,3.924 11.546,6.882 17.245,6.882 h 101.277 c 7.168,0 13,-5.832 13,-13 v -110.274 c 0,-7.168 -5.832,-13 -13,-13 z m -44.528,104.506 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path8"
|
||||
d="m 196.386,240.44701 c 0,-3.472 -1.403,-6.716 -3.951,-9.135 l -54.913,-52.12 c -4.132,-3.924 -11.546,-6.882 -17.245,-6.882 H 19 c -7.168,0 -13,5.832 -13,13 v 110.273 c 0,7.168 5.832,13 13,13 h 101.277 c 5.699,0 13.112,-2.958 17.244,-6.881 l 54.914,-52.122 c 2.548,-2.417 3.951,-5.662 3.951,-9.133 z m -132.858,36.369 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 10e-4,20.086 -16.282,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><g
|
||||
id="g12"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g14"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g16"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g18"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g20"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g22"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g24"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g26"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g28"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g30"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g32"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g34"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g36"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g38"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g40"
|
||||
transform="translate(0,48.893005)" /><ellipse
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#808080;stroke-width:9;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
id="path4599-2"
|
||||
cx="242.02635"
|
||||
cy="240.7314"
|
||||
rx="38.337769"
|
||||
ry="37.802738" /></svg>
|
After Width: | Height: | Size: 5.4 KiB |
97
img/blocks/controller_left_pressed.svg
Normal file
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 480.00001 480.00001"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="controller_left_pressed.svg"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
width="480"
|
||||
height="480"><metadata
|
||||
id="metadata47"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs45" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
id="namedview43"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.54742791"
|
||||
inkscape:cx="-10.370455"
|
||||
inkscape:cy="215.5535"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1"
|
||||
units="px" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path2"
|
||||
d="m 232.419,191.328 c 2.418,2.548 5.663,3.951 9.134,3.951 3.471,0 6.716,-1.403 9.134,-3.951 l 52.122,-54.912 c 3.923,-4.133 6.881,-11.547 6.881,-17.245 V 17.893 c 0,-7.168 -5.832,-12.9999996 -13,-12.9999996 H 186.417 c -7.168,0 -13,5.8319996 -13,12.9999996 V 119.17 c 0,5.698 2.958,13.112 6.881,17.245 z m 9.135,-165.276 c 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.282,-36.369 36.369,-36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4"
|
||||
d="m 250.687,289.565 c -2.418,-2.548 -5.662,-3.95 -9.133,-3.95 -3.471,0 -6.715,1.402 -9.134,3.95 l -52.122,54.913 c -3.923,4.133 -6.881,11.547 -6.881,17.245 V 463 c 0,7.168 5.832,13 13,13 H 296.69 c 7.168,0 13,-5.832 13,-13 V 361.723 c 0,-5.698 -2.958,-13.112 -6.881,-17.245 z m -9.133,165.276 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;fill-opacity:1;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6"
|
||||
d="M 464.107,172.31001 H 362.83 c -5.699,0 -13.112,2.958 -17.244,6.881 l -54.914,52.122 c -2.548,2.418 -3.951,5.662 -3.951,9.134 0,3.472 1.403,6.716 3.951,9.135 l 54.913,52.12 c 4.132,3.924 11.546,6.882 17.245,6.882 h 101.277 c 7.168,0 13,-5.832 13,-13 v -110.274 c 0,-7.168 -5.832,-13 -13,-13 z m -44.528,104.506 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path8"
|
||||
d="m 196.386,240.44701 c 0,-3.472 -1.403,-6.716 -3.951,-9.135 l -54.913,-52.12 c -4.132,-3.924 -11.546,-6.882 -17.245,-6.882 H 19 c -7.168,0 -13,5.832 -13,13 v 110.273 c 0,7.168 5.832,13 13,13 h 101.277 c 5.699,0 13.112,-2.958 17.244,-6.881 l 54.914,-52.122 c 2.548,-2.417 3.951,-5.662 3.951,-9.133 z m -132.858,36.369 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 10e-4,20.086 -16.282,36.369 -36.369,36.369 z"
|
||||
style="fill:#000000;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><g
|
||||
id="g12"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g14"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g16"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g18"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g20"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g22"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g24"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g26"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g28"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g30"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g32"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g34"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g36"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g38"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g40"
|
||||
transform="translate(0,48.893005)" /><ellipse
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#808080;stroke-width:9;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
id="path4599-2"
|
||||
cx="242.02635"
|
||||
cy="240.7314"
|
||||
rx="38.337769"
|
||||
ry="37.802738" /></svg>
|
After Width: | Height: | Size: 5.4 KiB |
97
img/blocks/controller_left_released.svg
Normal file
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 480.00001 480.00001"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="controller_left_released.svg"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
width="480"
|
||||
height="480"><metadata
|
||||
id="metadata47"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs45" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
id="namedview43"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.54742791"
|
||||
inkscape:cx="-10.370455"
|
||||
inkscape:cy="215.5535"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1"
|
||||
units="px" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path2"
|
||||
d="m 232.419,191.328 c 2.418,2.548 5.663,3.951 9.134,3.951 3.471,0 6.716,-1.403 9.134,-3.951 l 52.122,-54.912 c 3.923,-4.133 6.881,-11.547 6.881,-17.245 V 17.893 c 0,-7.168 -5.832,-12.9999996 -13,-12.9999996 H 186.417 c -7.168,0 -13,5.8319996 -13,12.9999996 V 119.17 c 0,5.698 2.958,13.112 6.881,17.245 z m 9.135,-165.276 c 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.282,-36.369 36.369,-36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4"
|
||||
d="m 250.687,289.565 c -2.418,-2.548 -5.662,-3.95 -9.133,-3.95 -3.471,0 -6.715,1.402 -9.134,3.95 l -52.122,54.913 c -3.923,4.133 -6.881,11.547 -6.881,17.245 V 463 c 0,7.168 5.832,13 13,13 H 296.69 c 7.168,0 13,-5.832 13,-13 V 361.723 c 0,-5.698 -2.958,-13.112 -6.881,-17.245 z m -9.133,165.276 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;fill-opacity:1;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6"
|
||||
d="M 464.107,172.31001 H 362.83 c -5.699,0 -13.112,2.958 -17.244,6.881 l -54.914,52.122 c -2.548,2.418 -3.951,5.662 -3.951,9.134 0,3.472 1.403,6.716 3.951,9.135 l 54.913,52.12 c 4.132,3.924 11.546,6.882 17.245,6.882 h 101.277 c 7.168,0 13,-5.832 13,-13 v -110.274 c 0,-7.168 -5.832,-13 -13,-13 z m -44.528,104.506 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path8"
|
||||
d="m 196.386,240.44701 c 0,-3.472 -1.403,-6.716 -3.951,-9.135 l -54.913,-52.12 c -4.132,-3.924 -11.546,-6.882 -17.245,-6.882 H 19 c -7.168,0 -13,5.832 -13,13 v 110.273 c 0,7.168 5.832,13 13,13 h 101.277 c 5.699,0 13.112,-2.958 17.244,-6.881 l 54.914,-52.122 c 2.548,-2.417 3.951,-5.662 3.951,-9.133 z m -132.858,36.369 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 10e-4,20.086 -16.282,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><g
|
||||
id="g12"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g14"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g16"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g18"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g20"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g22"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g24"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g26"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g28"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g30"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g32"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g34"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g36"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g38"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g40"
|
||||
transform="translate(0,48.893005)" /><ellipse
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#808080;stroke-width:9;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
id="path4599-2"
|
||||
cx="242.02635"
|
||||
cy="240.7314"
|
||||
rx="38.337769"
|
||||
ry="37.802738" /></svg>
|
After Width: | Height: | Size: 5.4 KiB |
97
img/blocks/controller_right_pressed.svg
Normal file
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 480.00001 480.00001"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="controller_right_pressed.svg"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
width="480"
|
||||
height="480"><metadata
|
||||
id="metadata47"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs45" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
id="namedview43"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.54742791"
|
||||
inkscape:cx="-10.370455"
|
||||
inkscape:cy="215.5535"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1"
|
||||
units="px" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path2"
|
||||
d="m 232.419,191.328 c 2.418,2.548 5.663,3.951 9.134,3.951 3.471,0 6.716,-1.403 9.134,-3.951 l 52.122,-54.912 c 3.923,-4.133 6.881,-11.547 6.881,-17.245 V 17.893 c 0,-7.168 -5.832,-12.9999996 -13,-12.9999996 H 186.417 c -7.168,0 -13,5.8319996 -13,12.9999996 V 119.17 c 0,5.698 2.958,13.112 6.881,17.245 z m 9.135,-165.276 c 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.282,-36.369 36.369,-36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4"
|
||||
d="m 250.687,289.565 c -2.418,-2.548 -5.662,-3.95 -9.133,-3.95 -3.471,0 -6.715,1.402 -9.134,3.95 l -52.122,54.913 c -3.923,4.133 -6.881,11.547 -6.881,17.245 V 463 c 0,7.168 5.832,13 13,13 H 296.69 c 7.168,0 13,-5.832 13,-13 V 361.723 c 0,-5.698 -2.958,-13.112 -6.881,-17.245 z m -9.133,165.276 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;fill-opacity:1;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6"
|
||||
d="M 464.107,172.31001 H 362.83 c -5.699,0 -13.112,2.958 -17.244,6.881 l -54.914,52.122 c -2.548,2.418 -3.951,5.662 -3.951,9.134 0,3.472 1.403,6.716 3.951,9.135 l 54.913,52.12 c 4.132,3.924 11.546,6.882 17.245,6.882 h 101.277 c 7.168,0 13,-5.832 13,-13 v -110.274 c 0,-7.168 -5.832,-13 -13,-13 z m -44.528,104.506 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:#000000;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path8"
|
||||
d="m 196.386,240.44701 c 0,-3.472 -1.403,-6.716 -3.951,-9.135 l -54.913,-52.12 c -4.132,-3.924 -11.546,-6.882 -17.245,-6.882 H 19 c -7.168,0 -13,5.832 -13,13 v 110.273 c 0,7.168 5.832,13 13,13 h 101.277 c 5.699,0 13.112,-2.958 17.244,-6.881 l 54.914,-52.122 c 2.548,-2.417 3.951,-5.662 3.951,-9.133 z m -132.858,36.369 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 10e-4,20.086 -16.282,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><g
|
||||
id="g12"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g14"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g16"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g18"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g20"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g22"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g24"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g26"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g28"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g30"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g32"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g34"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g36"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g38"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g40"
|
||||
transform="translate(0,48.893005)" /><ellipse
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#808080;stroke-width:9;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
id="path4599-2"
|
||||
cx="242.02635"
|
||||
cy="240.7314"
|
||||
rx="38.337769"
|
||||
ry="37.802738" /></svg>
|
After Width: | Height: | Size: 5.4 KiB |
97
img/blocks/controller_right_released.svg
Normal file
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 480.00001 480.00001"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="controller_right_released.svg"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
width="480"
|
||||
height="480"><metadata
|
||||
id="metadata47"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs45" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
id="namedview43"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.54742791"
|
||||
inkscape:cx="-10.370455"
|
||||
inkscape:cy="215.5535"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1"
|
||||
units="px" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path2"
|
||||
d="m 232.419,191.328 c 2.418,2.548 5.663,3.951 9.134,3.951 3.471,0 6.716,-1.403 9.134,-3.951 l 52.122,-54.912 c 3.923,-4.133 6.881,-11.547 6.881,-17.245 V 17.893 c 0,-7.168 -5.832,-12.9999996 -13,-12.9999996 H 186.417 c -7.168,0 -13,5.8319996 -13,12.9999996 V 119.17 c 0,5.698 2.958,13.112 6.881,17.245 z m 9.135,-165.276 c 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.282,-36.369 36.369,-36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4"
|
||||
d="m 250.687,289.565 c -2.418,-2.548 -5.662,-3.95 -9.133,-3.95 -3.471,0 -6.715,1.402 -9.134,3.95 l -52.122,54.913 c -3.923,4.133 -6.881,11.547 -6.881,17.245 V 463 c 0,7.168 5.832,13 13,13 H 296.69 c 7.168,0 13,-5.832 13,-13 V 361.723 c 0,-5.698 -2.958,-13.112 -6.881,-17.245 z m -9.133,165.276 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;fill-opacity:1;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6"
|
||||
d="M 464.107,172.31001 H 362.83 c -5.699,0 -13.112,2.958 -17.244,6.881 l -54.914,52.122 c -2.548,2.418 -3.951,5.662 -3.951,9.134 0,3.472 1.403,6.716 3.951,9.135 l 54.913,52.12 c 4.132,3.924 11.546,6.882 17.245,6.882 h 101.277 c 7.168,0 13,-5.832 13,-13 v -110.274 c 0,-7.168 -5.832,-13 -13,-13 z m -44.528,104.506 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path8"
|
||||
d="m 196.386,240.44701 c 0,-3.472 -1.403,-6.716 -3.951,-9.135 l -54.913,-52.12 c -4.132,-3.924 -11.546,-6.882 -17.245,-6.882 H 19 c -7.168,0 -13,5.832 -13,13 v 110.273 c 0,7.168 5.832,13 13,13 h 101.277 c 5.699,0 13.112,-2.958 17.244,-6.881 l 54.914,-52.122 c 2.548,-2.417 3.951,-5.662 3.951,-9.133 z m -132.858,36.369 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 10e-4,20.086 -16.282,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><g
|
||||
id="g12"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g14"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g16"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g18"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g20"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g22"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g24"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g26"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g28"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g30"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g32"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g34"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g36"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g38"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g40"
|
||||
transform="translate(0,48.893005)" /><ellipse
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#808080;stroke-width:9;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
id="path4599-2"
|
||||
cx="242.02635"
|
||||
cy="240.7314"
|
||||
rx="38.337769"
|
||||
ry="37.802738" /></svg>
|
After Width: | Height: | Size: 5.4 KiB |
97
img/blocks/controller_up_pressed.svg
Normal file
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 480.00001 480.00001"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="controller_up_pressed.svg"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
width="480"
|
||||
height="480"><metadata
|
||||
id="metadata47"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs45" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
id="namedview43"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.54742791"
|
||||
inkscape:cx="-10.370455"
|
||||
inkscape:cy="215.5535"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1"
|
||||
units="px" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path2"
|
||||
d="m 232.419,191.328 c 2.418,2.548 5.663,3.951 9.134,3.951 3.471,0 6.716,-1.403 9.134,-3.951 l 52.122,-54.912 c 3.923,-4.133 6.881,-11.547 6.881,-17.245 V 17.893 c 0,-7.168 -5.832,-12.9999996 -13,-12.9999996 H 186.417 c -7.168,0 -13,5.8319996 -13,12.9999996 V 119.17 c 0,5.698 2.958,13.112 6.881,17.245 z m 9.135,-165.276 c 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.282,-36.369 36.369,-36.369 z"
|
||||
style="fill:#000000;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4"
|
||||
d="m 250.687,289.565 c -2.418,-2.548 -5.662,-3.95 -9.133,-3.95 -3.471,0 -6.715,1.402 -9.134,3.95 l -52.122,54.913 c -3.923,4.133 -6.881,11.547 -6.881,17.245 V 463 c 0,7.168 5.832,13 13,13 H 296.69 c 7.168,0 13,-5.832 13,-13 V 361.723 c 0,-5.698 -2.958,-13.112 -6.881,-17.245 z m -9.133,165.276 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;fill-opacity:1;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6"
|
||||
d="M 464.107,172.31001 H 362.83 c -5.699,0 -13.112,2.958 -17.244,6.881 l -54.914,52.122 c -2.548,2.418 -3.951,5.662 -3.951,9.134 0,3.472 1.403,6.716 3.951,9.135 l 54.913,52.12 c 4.132,3.924 11.546,6.882 17.245,6.882 h 101.277 c 7.168,0 13,-5.832 13,-13 v -110.274 c 0,-7.168 -5.832,-13 -13,-13 z m -44.528,104.506 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path8"
|
||||
d="m 196.386,240.44701 c 0,-3.472 -1.403,-6.716 -3.951,-9.135 l -54.913,-52.12 c -4.132,-3.924 -11.546,-6.882 -17.245,-6.882 H 19 c -7.168,0 -13,5.832 -13,13 v 110.273 c 0,7.168 5.832,13 13,13 h 101.277 c 5.699,0 13.112,-2.958 17.244,-6.881 l 54.914,-52.122 c 2.548,-2.417 3.951,-5.662 3.951,-9.133 z m -132.858,36.369 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 10e-4,20.086 -16.282,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><g
|
||||
id="g12"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g14"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g16"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g18"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g20"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g22"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g24"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g26"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g28"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g30"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g32"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g34"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g36"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g38"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g40"
|
||||
transform="translate(0,48.893005)" /><ellipse
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#808080;stroke-width:9;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
id="path4599-2"
|
||||
cx="242.02635"
|
||||
cy="240.7314"
|
||||
rx="38.337769"
|
||||
ry="37.802738" /></svg>
|
After Width: | Height: | Size: 5.4 KiB |
97
img/blocks/controller_up_released.svg
Normal file
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 480.00001 480.00001"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="controller_up_released.svg"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
width="480"
|
||||
height="480"><metadata
|
||||
id="metadata47"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs45" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
id="namedview43"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.54742791"
|
||||
inkscape:cx="-10.370455"
|
||||
inkscape:cy="215.5535"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1"
|
||||
units="px" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path2"
|
||||
d="m 232.419,191.328 c 2.418,2.548 5.663,3.951 9.134,3.951 3.471,0 6.716,-1.403 9.134,-3.951 l 52.122,-54.912 c 3.923,-4.133 6.881,-11.547 6.881,-17.245 V 17.893 c 0,-7.168 -5.832,-12.9999996 -13,-12.9999996 H 186.417 c -7.168,0 -13,5.8319996 -13,12.9999996 V 119.17 c 0,5.698 2.958,13.112 6.881,17.245 z m 9.135,-165.276 c 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.282,-36.369 36.369,-36.369 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4"
|
||||
d="m 250.687,289.565 c -2.418,-2.548 -5.662,-3.95 -9.133,-3.95 -3.471,0 -6.715,1.402 -9.134,3.95 l -52.122,54.913 c -3.923,4.133 -6.881,11.547 -6.881,17.245 V 463 c 0,7.168 5.832,13 13,13 H 296.69 c 7.168,0 13,-5.832 13,-13 V 361.723 c 0,-5.698 -2.958,-13.112 -6.881,-17.245 z m -9.133,165.276 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;fill-opacity:1;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6"
|
||||
d="M 464.107,172.31001 H 362.83 c -5.699,0 -13.112,2.958 -17.244,6.881 l -54.914,52.122 c -2.548,2.418 -3.951,5.662 -3.951,9.134 0,3.472 1.403,6.716 3.951,9.135 l 54.913,52.12 c 4.132,3.924 11.546,6.882 17.245,6.882 h 101.277 c 7.168,0 13,-5.832 13,-13 v -110.274 c 0,-7.168 -5.832,-13 -13,-13 z m -44.528,104.506 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 0,20.086 -16.283,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path8"
|
||||
d="m 196.386,240.44701 c 0,-3.472 -1.403,-6.716 -3.951,-9.135 l -54.913,-52.12 c -4.132,-3.924 -11.546,-6.882 -17.245,-6.882 H 19 c -7.168,0 -13,5.832 -13,13 v 110.273 c 0,7.168 5.832,13 13,13 h 101.277 c 5.699,0 13.112,-2.958 17.244,-6.881 l 54.914,-52.122 c 2.548,-2.417 3.951,-5.662 3.951,-9.133 z m -132.858,36.369 c -20.086,0 -36.369,-16.283 -36.369,-36.369 0,-20.086 16.283,-36.369 36.369,-36.369 20.086,0 36.369,16.283 36.369,36.369 10e-4,20.086 -16.282,36.369 -36.369,36.369 z"
|
||||
style="fill:none;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /><g
|
||||
id="g12"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g14"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g16"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g18"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g20"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g22"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g24"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g26"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g28"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g30"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g32"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g34"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g36"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g38"
|
||||
transform="translate(0,48.893005)" /><g
|
||||
id="g40"
|
||||
transform="translate(0,48.893005)" /><ellipse
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#808080;stroke-width:9;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
id="path4599-2"
|
||||
cx="242.02635"
|
||||
cy="240.7314"
|
||||
rx="38.337769"
|
||||
ry="37.802738" /></svg>
|
After Width: | Height: | Size: 5.4 KiB |
64
img/blocks/switch_off.svg
Normal file
@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 60 60"
|
||||
style="enable-background:new 0 0 60 60;"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="switch_off.svg"
|
||||
inkscape:version="0.92.1 r15371"><metadata
|
||||
id="metadata45"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs43" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
id="namedview41"
|
||||
showgrid="false"
|
||||
inkscape:zoom="3.9333333"
|
||||
inkscape:cx="30"
|
||||
inkscape:cy="30"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path2"
|
||||
d="M 14,20 C 8.486,20 4,24.486 4,30 4,35.514 8.486,40 14,40 19.514,40 24,35.514 24,30 24,24.486 19.514,20 14,20 Z m 0,18 c -4.411,0 -8,-3.589 -8,-8 0,-4.411 3.589,-8 8,-8 4.411,0 8,3.589 8,8 0,4.411 -3.589,8 -8,8 z" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4"
|
||||
d="M 46,16 H 14 C 6.28,16 0,22.28 0,30 0,37.72 6.28,44 14,44 H 46 C 53.72,44 60,37.72 60,30 60,22.28 53.72,16 46,16 Z m 0,26 H 14 C 7.383,42 2,36.617 2,30 2,23.383 7.383,18 14,18 h 32 c 6.617,0 12,5.383 12,12 0,6.617 -5.383,12 -12,12 z" /><g
|
||||
id="g10" /><g
|
||||
id="g12" /><g
|
||||
id="g14" /><g
|
||||
id="g16" /><g
|
||||
id="g18" /><g
|
||||
id="g20" /><g
|
||||
id="g22" /><g
|
||||
id="g24" /><g
|
||||
id="g26" /><g
|
||||
id="g28" /><g
|
||||
id="g30" /><g
|
||||
id="g32" /><g
|
||||
id="g34" /><g
|
||||
id="g36" /><g
|
||||
id="g38" /></svg>
|
After Width: | Height: | Size: 2.4 KiB |
61
img/blocks/switch_on.svg
Normal file
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 60 60"
|
||||
style="enable-background:new 0 0 60 60;"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="switch_on.svg"
|
||||
inkscape:version="0.92.1 r15371"><metadata
|
||||
id="metadata45"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs43" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
id="namedview41"
|
||||
showgrid="false"
|
||||
inkscape:zoom="3.9333333"
|
||||
inkscape:cx="30"
|
||||
inkscape:cy="30"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6"
|
||||
d="M 14,44 H 46 C 53.72,44 60,37.72 60,30 60,22.28 53.72,16 46,16 H 14 C 6.28,16 0,22.28 0,30 0,37.72 6.28,44 14,44 Z M 46,20 c 5.514,0 10,4.486 10,10 0,5.514 -4.486,10 -10,10 -5.514,0 -10,-4.486 -10,-10 0,-5.514 4.486,-10 10,-10 z" /><g
|
||||
id="g10" /><g
|
||||
id="g12" /><g
|
||||
id="g14" /><g
|
||||
id="g16" /><g
|
||||
id="g18" /><g
|
||||
id="g20" /><g
|
||||
id="g22" /><g
|
||||
id="g24" /><g
|
||||
id="g26" /><g
|
||||
id="g28" /><g
|
||||
id="g30" /><g
|
||||
id="g32" /><g
|
||||
id="g34" /><g
|
||||
id="g36" /><g
|
||||
id="g38" /></svg>
|
After Width: | Height: | Size: 2.1 KiB |
@ -20,8 +20,10 @@ pad KEYWORD2
|
||||
slider KEYWORD2
|
||||
|
||||
begin KEYWORD2
|
||||
beginSPIFFS KEYWORD2
|
||||
print KEYWORD2
|
||||
updateSwitcher KEYWORD2
|
||||
updateSlider KEYWORD2
|
||||
|
||||
#######################################
|
||||
# Instances (KEYWORD2)
|
||||
|
27
lang/ESPUI.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"langs":
|
||||
{
|
||||
"en-GB":
|
||||
{
|
||||
"keys":
|
||||
{
|
||||
"LANG_SUBCATERGORY_ESPUI": "User Interface",
|
||||
"LANG_ESPUI_ESPUI_TITLE": "Title",
|
||||
"LANG_ESPUI_ESPUI_HOTSPOT": "Enable Wifi Hotspot Code",
|
||||
"LANG_ESPUI_ESPUI_TOOLTIP": "Creates a webinterface on the ESP32/ESP8266",
|
||||
"LANG_ESPUI_BUTTON_BUTTON": "UI Button",
|
||||
"LANG_ESPUI_NAME": "name",
|
||||
"LANG_ESPUI_COLOR": "Color",
|
||||
"LANG_ESPUI_TEXT": "Text",
|
||||
"LANG_ESPUI_BUTTON_TOOLTIP": "A web interface button",
|
||||
"LANG_ESPUI_LABEL_LABEL": "UI Label",
|
||||
"LANG_ESPUI_LABEL": "Label",
|
||||
"LANG_ESPUI_LABEL_TOOLTIP": "A web interface label you can update from your code",
|
||||
"LANG_ESPUI_STATE": "State",
|
||||
"LANG_ESPUI_SWITCH_SWITCH": "UI Switch",
|
||||
"LANG_ESPUI_PAD_PAD": "UI Pad",
|
||||
"LANG_ESPUI_PAD_CENTER": "Center button?"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
28
library.json
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "ESPUI",
|
||||
"keywords": "espressif web interface iot control simple easy ui userinterface",
|
||||
"description": "ESP32 and ESP8266 Web Interface Library",
|
||||
"repository":
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/s00500/ESPUI.git"
|
||||
},
|
||||
"authors":
|
||||
[
|
||||
{
|
||||
"name": "Lukas Bachschwell",
|
||||
"email": "lukas@lbsfilm.at",
|
||||
"url": "https://lbsfilm.at",
|
||||
"maintainer": true
|
||||
}
|
||||
],
|
||||
"dependencies":
|
||||
{
|
||||
"name": "ESP Async WebServer",
|
||||
"authors": "Hristo Gochkov",
|
||||
"frameworks": "arduino"
|
||||
},
|
||||
"version": "1.4.6",
|
||||
"frameworks": "arduino",
|
||||
"platforms": "*"
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
name=ESPUI
|
||||
version=1.4.0
|
||||
version=1.4.6
|
||||
author=Lukas Bachschwell
|
||||
maintainer=Lukas Bachschwell <lukas@lbsfilm.at>
|
||||
sentence=ESP32 and ESP8266 Web Interface Library
|
||||
|
452
src/ESPUI.cpp
@ -1,110 +1,223 @@
|
||||
#include "ESPUI.h"
|
||||
|
||||
#include "uploadDataIndex.h"
|
||||
#include "dataIndexHTML.h"
|
||||
|
||||
#include "dataNormalizeCSS.h"
|
||||
#include "dataStyleCSS.h"
|
||||
|
||||
#include "uploadDataStyle.h"
|
||||
#include "uploadDataNormalize.h"
|
||||
|
||||
#include "uploadDataControls.h"
|
||||
#include "uploadDataZepto.h"
|
||||
#include "uploadDataSlider.h"
|
||||
#include "dataControlsJS.h"
|
||||
#include "dataSliderJS.h"
|
||||
#include "dataZeptoJS.h"
|
||||
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#include <functional>
|
||||
|
||||
// ################# Spiffs functions
|
||||
void deleteFile(fs::FS &fs, const char * path){
|
||||
if(!fs.exists(path)){
|
||||
#if defined(ESP32)
|
||||
void listDir(const char *dirname, uint8_t levels) {
|
||||
Serial.printf("Listing directory: %s\n", dirname);
|
||||
|
||||
File root = SPIFFS.open(dirname);
|
||||
|
||||
if (!root) {
|
||||
Serial.println("Failed to open directory");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!root.isDirectory()) {
|
||||
Serial.println("Not a directory");
|
||||
return;
|
||||
}
|
||||
|
||||
File file = root.openNextFile();
|
||||
|
||||
while (file) {
|
||||
if (file.isDirectory()) {
|
||||
Serial.print(" DIR : ");
|
||||
Serial.println(file.name());
|
||||
if (levels) {
|
||||
listDir(file.name(), levels - 1);
|
||||
}
|
||||
} else {
|
||||
Serial.print(" FILE: ");
|
||||
Serial.print(file.name());
|
||||
Serial.print(" SIZE: ");
|
||||
Serial.println(file.size());
|
||||
}
|
||||
|
||||
file = root.openNextFile();
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
void listDir(const char *dirname, uint8_t levels) {
|
||||
// ignoring levels for esp8266
|
||||
Serial.printf("Listing directory: %s\n", dirname);
|
||||
|
||||
String str = "";
|
||||
Dir dir = SPIFFS.openDir("/");
|
||||
while (dir.next()) {
|
||||
Serial.print(" FILE: ");
|
||||
Serial.print(dir.fileName());
|
||||
Serial.print(" SIZE: ");
|
||||
Serial.println(dir.fileSize());
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void ESPUIClass::list() {
|
||||
if (!SPIFFS.begin()) {
|
||||
Serial.println("SPIFFS Mount Failed");
|
||||
return;
|
||||
}
|
||||
listDir("/", 1);
|
||||
#if defined(ESP32)
|
||||
Serial.println(SPIFFS.totalBytes());
|
||||
Serial.println(SPIFFS.usedBytes());
|
||||
#else
|
||||
FSInfo fs_info;
|
||||
SPIFFS.info(fs_info);
|
||||
|
||||
Serial.println(fs_info.totalBytes);
|
||||
Serial.println(fs_info.usedBytes);
|
||||
#endif
|
||||
}
|
||||
|
||||
void deleteFile(const char *path) {
|
||||
if (debug) Serial.print(SPIFFS.exists(path));
|
||||
if (!SPIFFS.exists(path)) {
|
||||
Serial.printf("File: %s does not exist, not deleting\n", path);
|
||||
return;
|
||||
}
|
||||
|
||||
Serial.printf("Deleting file: %s\n", path);
|
||||
|
||||
if(fs.remove(path)){
|
||||
if (SPIFFS.remove(path)) {
|
||||
Serial.println("File deleted");
|
||||
} else {
|
||||
Serial.println("Delete failed");
|
||||
}
|
||||
}
|
||||
|
||||
void writeFile(fs::FS &fs, const char * path, const char * data){
|
||||
void writeFile(const char *path, const char *data) {
|
||||
Serial.printf("Writing file: %s\n", path);
|
||||
|
||||
File file = fs.open(path, FILE_WRITE);
|
||||
if(!file){
|
||||
File file = SPIFFS.open(path, FILE_WRITE);
|
||||
if (!file) {
|
||||
Serial.println("Failed to open file for writing");
|
||||
return;
|
||||
}
|
||||
if(file.print(FPSTR(data))){
|
||||
#if defined(ESP32)
|
||||
if (file.print(data)) {
|
||||
Serial.println("File written");
|
||||
} else {
|
||||
Serial.println("Write failed");
|
||||
}
|
||||
#else
|
||||
if (file.print(FPSTR(data))) {
|
||||
Serial.println("File written");
|
||||
} else {
|
||||
Serial.println("Write failed");
|
||||
}
|
||||
#endif
|
||||
file.close();
|
||||
}
|
||||
|
||||
// end Spiffs functions
|
||||
|
||||
void ESPUIClass::prepareFileSystem(){
|
||||
// this function should only be used once
|
||||
void ESPUIClass::prepareFileSystem() {
|
||||
// this function should only be used once
|
||||
|
||||
Serial.println('About to prepare filesystem...');
|
||||
if(!SPIFFS.begin()) {
|
||||
Serial.println("About to prepare filesystem...");
|
||||
|
||||
#if defined(ESP32)
|
||||
SPIFFS.format();
|
||||
if (!SPIFFS.begin(true)) {
|
||||
Serial.println("SPIFFS Mount Failed");
|
||||
return;
|
||||
}
|
||||
listDir("/", 1);
|
||||
Serial.println("SPIFFS Mount ESP32 Done");
|
||||
#else
|
||||
SPIFFS.format();
|
||||
SPIFFS.begin();
|
||||
Serial.println("SPIFFS Mount ESP8266 Done");
|
||||
#endif
|
||||
|
||||
deleteFile("/index.htm");
|
||||
|
||||
deleteFile("/css/style.css");
|
||||
deleteFile("/css/normalize.css");
|
||||
|
||||
deleteFile("/js/zepto.min.js");
|
||||
deleteFile("/js/controls.js");
|
||||
deleteFile("/js/slider.js");
|
||||
|
||||
Serial.println("Cleanup done");
|
||||
|
||||
// Now write
|
||||
writeFile("/index.htm", HTML_INDEX);
|
||||
|
||||
writeFile("/css/style.css", CSS_STYLE);
|
||||
writeFile("/css/normalize.css", CSS_NORMALIZE);
|
||||
|
||||
writeFile("/js/zepto.min.js", JS_ZEPTO);
|
||||
writeFile("/js/controls.js", JS_CONTROLS);
|
||||
writeFile("/js/slider.js", JS_SLIDER);
|
||||
|
||||
Serial.println("Done Initializing filesystem :-)");
|
||||
|
||||
#if defined(ESP32)
|
||||
if(debug) listDir("/", 1);
|
||||
#endif
|
||||
|
||||
SPIFFS.end();
|
||||
}
|
||||
|
||||
deleteFile(SPIFFS, "/index.htm");
|
||||
|
||||
deleteFile(SPIFFS, "/css/style.css");
|
||||
deleteFile(SPIFFS, "/css/normalize.css");
|
||||
|
||||
deleteFile(SPIFFS, "/js/controls.js");
|
||||
deleteFile(SPIFFS, "/js/zepto.js");
|
||||
deleteFile(SPIFFS, "/js/slider.js");
|
||||
|
||||
Serial.println('Cleanup done');
|
||||
|
||||
// Now write
|
||||
writeFile(SPIFFS, "/index.htm", HTML_INDEX);
|
||||
|
||||
writeFile(SPIFFS, "/css/style.css", CSS_STYLE);
|
||||
writeFile(SPIFFS, "/css/normalize.css", CSS_NORMALIZE);
|
||||
|
||||
writeFile(SPIFFS, "/js/zepto.js", JS_ZEPTO);
|
||||
writeFile(SPIFFS, "/js/controls.js", JS_CONTROLS);
|
||||
writeFile(SPIFFS, "/js/slider.js", JS_SLIDER);
|
||||
|
||||
Serial.println("Done Initializing filesystem :-)");
|
||||
}
|
||||
|
||||
|
||||
// Handle Websockets Communication
|
||||
void onWsEvent(AsyncWebSocket *server, AsyncWebSocketClient *client,
|
||||
AwsEventType type, void *arg, uint8_t *data, size_t len) {
|
||||
switch (type) {
|
||||
case WS_EVT_DISCONNECT:
|
||||
case WS_EVT_DISCONNECT: {
|
||||
if (debug)
|
||||
Serial.printf("Disconnected!\n");
|
||||
break;
|
||||
}
|
||||
case WS_EVT_PONG: {
|
||||
if (debug)
|
||||
Serial.printf("Received PONG!\n");
|
||||
break;
|
||||
}
|
||||
case WS_EVT_ERROR: {
|
||||
if (debug)
|
||||
Serial.printf("WebSocket Error!\n");
|
||||
break;
|
||||
}
|
||||
case WS_EVT_CONNECT: {
|
||||
if (debug)
|
||||
Serial.println("Connected");
|
||||
if (debug) {
|
||||
Serial.print("Connected: ");
|
||||
Serial.println(client->id());
|
||||
}
|
||||
|
||||
ESPUI.jsonDom(client);
|
||||
if (debug)
|
||||
if (debug) {
|
||||
Serial.println("JSON Data Sent to Client!");
|
||||
}
|
||||
} break;
|
||||
case WS_EVT_DATA:
|
||||
case WS_EVT_DATA: {
|
||||
String msg = "";
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
msg += (char)data[i];
|
||||
}
|
||||
|
||||
int id = msg.substring(msg.lastIndexOf(':') + 1).toInt();
|
||||
if (id >= ESPUI.cIndex){
|
||||
if(debug) Serial.println("Maleformated id in websocket message");
|
||||
if (id >= ESPUI.cIndex) {
|
||||
if (debug)
|
||||
Serial.println("Maleformated id in websocket message");
|
||||
return;
|
||||
}
|
||||
|
||||
Control *c = ESPUI.controls[msg.substring(msg.lastIndexOf(':') + 1).toInt()];
|
||||
|
||||
if (msg.startsWith("bdown:")) {
|
||||
@ -141,17 +254,22 @@ void onWsEvent(AsyncWebSocket *server, AsyncWebSocketClient *client,
|
||||
int value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')).toInt();
|
||||
ESPUI.updateSlider(c->id, value, client->id());
|
||||
c->callback(*c, SL_VALUE);
|
||||
} else if (msg.startsWith("nvalue:")) {
|
||||
int value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')).toInt();
|
||||
ESPUI.updateNumber(c->id, value, client->id());
|
||||
c->callback(*c, N_VALUE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ESPUIClass::label(const char *label, int color, String value) {
|
||||
int ESPUIClass::label(const char *label, int color, String value) {
|
||||
if (labelExists(label)) {
|
||||
if (debug)
|
||||
Serial.println("UI ERROR: Element " + String(label) +
|
||||
" exists, skipping creating element!");
|
||||
return;
|
||||
if (debug) Serial.println("UI ERROR: Element " + String(label) + " exists, skipping creating element!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
Control *newL = new Control();
|
||||
@ -166,15 +284,32 @@ void ESPUIClass::label(const char *label, int color, String value) {
|
||||
newL->id = cIndex;
|
||||
controls[cIndex] = newL;
|
||||
cIndex++;
|
||||
return cIndex - 1;
|
||||
}
|
||||
|
||||
int ESPUIClass::graph(const char *label, int color) {
|
||||
if (labelExists(label)) {
|
||||
if (debug) Serial.println("UI ERROR: Element " + String(label) + " exists, skipping creating element!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
Control *newG = new Control();
|
||||
newG->type = UI_GRAPH;
|
||||
newG->label = label;
|
||||
newG->color = color;
|
||||
newG->id = cIndex;
|
||||
controls[cIndex] = newG;
|
||||
cIndex++;
|
||||
return cIndex - 1;
|
||||
}
|
||||
|
||||
// TODO: this still needs a range setting
|
||||
void ESPUIClass::slider(const char *label, void (*callBack)(Control, int), int color, String value) {
|
||||
int ESPUIClass::slider(const char *label, void (*callBack)(Control, int), int color, String value) {
|
||||
if (labelExists(label)) {
|
||||
if (debug)
|
||||
Serial.println("UI ERROR: Element " + String(label) +
|
||||
" exists, skipping creating element!");
|
||||
return;
|
||||
return -1;
|
||||
}
|
||||
|
||||
Control *newSL = new Control();
|
||||
@ -189,15 +324,16 @@ void ESPUIClass::slider(const char *label, void (*callBack)(Control, int), int c
|
||||
newSL->id = cIndex;
|
||||
controls[cIndex] = newSL;
|
||||
cIndex++;
|
||||
return cIndex - 1;
|
||||
}
|
||||
|
||||
void ESPUIClass::button(const char *label, void (*callBack)(Control, int),
|
||||
int ESPUIClass::button(const char *label, void (*callBack)(Control, int),
|
||||
int color, String value) {
|
||||
if (labelExists(label)) {
|
||||
if (debug)
|
||||
Serial.println("UI ERROR: Element " + String(label) +
|
||||
" exists, skipping creating element!");
|
||||
return;
|
||||
return -1;
|
||||
}
|
||||
|
||||
Control *newB = new Control();
|
||||
@ -214,15 +350,15 @@ void ESPUIClass::button(const char *label, void (*callBack)(Control, int),
|
||||
newB->id = cIndex;
|
||||
controls[cIndex] = newB;
|
||||
cIndex++;
|
||||
return cIndex - 1;
|
||||
}
|
||||
|
||||
void ESPUIClass::switcher(const char *label, bool startState,
|
||||
void (*callBack)(Control, int), int color) {
|
||||
int ESPUIClass::switcher(const char *label, bool startState, void (*callBack)(Control, int), int color) {
|
||||
if (labelExists(label)) {
|
||||
if (debug)
|
||||
Serial.println("UI ERROR: Element " + String(label) +
|
||||
" exists, skipping creating element!");
|
||||
return;
|
||||
return -1;
|
||||
}
|
||||
|
||||
Control *newS = new Control();
|
||||
@ -234,15 +370,16 @@ void ESPUIClass::switcher(const char *label, bool startState,
|
||||
newS->id = cIndex;
|
||||
controls[cIndex] = newS;
|
||||
cIndex++;
|
||||
return cIndex - 1;
|
||||
}
|
||||
|
||||
void ESPUIClass::pad(const char *label, bool center,
|
||||
int ESPUIClass::pad(const char *label, bool center,
|
||||
void (*callBack)(Control, int), int color) {
|
||||
if (labelExists(label)) {
|
||||
if (debug)
|
||||
Serial.println("UI ERROR: Element " + String(label) +
|
||||
" exists, skipping creating element!");
|
||||
return;
|
||||
return -1;
|
||||
}
|
||||
|
||||
Control *newP = new Control();
|
||||
@ -256,6 +393,27 @@ void ESPUIClass::pad(const char *label, bool center,
|
||||
newP->id = cIndex;
|
||||
controls[cIndex] = newP;
|
||||
cIndex++;
|
||||
return cIndex - 1;
|
||||
}
|
||||
|
||||
// TODO: min and max need to be saved, they also need to be sent to the frontend
|
||||
int ESPUIClass::number(const char *label, void (*callBack)(Control, int), int color, int number, int min, int max) {
|
||||
if (labelExists(label)) {
|
||||
if (debug)
|
||||
Serial.println("UI ERROR: Element " + String(label) + " exists, skipping creating element!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
Control *newN = new Control();
|
||||
newN->type = UI_NUMBER;
|
||||
newN->label = label;
|
||||
newN->color = color;
|
||||
newN->value = String(number);
|
||||
newN->callback = callBack;
|
||||
newN->id = cIndex;
|
||||
controls[cIndex] = newN;
|
||||
cIndex++;
|
||||
return cIndex - 1;
|
||||
}
|
||||
|
||||
void ESPUIClass::print(int id, String value) {
|
||||
@ -285,25 +443,7 @@ void ESPUIClass::print(String label, String value) {
|
||||
print(getIdByLabel(label), value);
|
||||
}
|
||||
|
||||
void ESPUIClass::updateSwitcher(int id, bool nValue, int clientId ) {
|
||||
if (id < cIndex && controls[id]->type == UI_SWITCHER) {
|
||||
controls[id]->value = nValue ? 1 : 0;
|
||||
String json;
|
||||
StaticJsonBuffer<200> jsonBuffer;
|
||||
JsonObject &root = jsonBuffer.createObject();
|
||||
root["type"] = UPDATE_SWITCHER;
|
||||
root["value"] = nValue ? 1 : 0;
|
||||
root["id"] = String(id);
|
||||
root.printTo(json);
|
||||
textThem(json, clientId);
|
||||
} else {
|
||||
if (debug)
|
||||
Serial.println(String("Error: ") + String(id) +
|
||||
String(" is no switcher"));
|
||||
}
|
||||
}
|
||||
|
||||
void ESPUIClass::updateSlider(int id, int nValue, int clientId ) {
|
||||
void ESPUIClass::updateSlider(int id, int nValue, int clientId) {
|
||||
if (id < cIndex && controls[id]->type == UI_SLIDER) {
|
||||
controls[id]->value = nValue;
|
||||
String json;
|
||||
@ -316,26 +456,71 @@ void ESPUIClass::updateSlider(int id, int nValue, int clientId ) {
|
||||
textThem(json, clientId);
|
||||
} else {
|
||||
if (debug)
|
||||
Serial.println(String("Error: ") + String(id) +
|
||||
String(" is no slider"));
|
||||
Serial.println(String("Error: ") + String(id) + String(" is no slider"));
|
||||
}
|
||||
}
|
||||
|
||||
void ESPUIClass::updateSwitcher(int id, bool nValue, int clientId) {
|
||||
if (id < cIndex && controls[id]->type == UI_SWITCHER) {
|
||||
controls[id]->value = nValue ? 1 : 0;
|
||||
String json;
|
||||
StaticJsonBuffer<200> jsonBuffer;
|
||||
JsonObject &root = jsonBuffer.createObject();
|
||||
root["type"] = UPDATE_SWITCHER;
|
||||
root["value"] = nValue ? 1 : 0;
|
||||
root["id"] = String(id);
|
||||
root.printTo(json);
|
||||
textThem(json, clientId);
|
||||
} else {
|
||||
if (debug) Serial.println(String("Error: ") + String(id) + String(" is no switcher"));
|
||||
}
|
||||
}
|
||||
|
||||
void ESPUIClass::updateSwitcher(String label, bool nValue, int clientId) {
|
||||
if (!labelExists(label)) {
|
||||
if (debug)
|
||||
Serial.println("UI ERROR: Element does not " + String(label) +
|
||||
" exist, cannot update!");
|
||||
Serial.println("UI ERROR: Element does not " + String(label) + " exist, cannot update!");
|
||||
return;
|
||||
}
|
||||
updateSwitcher(getIdByLabel(label), nValue, clientId);
|
||||
}
|
||||
|
||||
void ESPUIClass::textThem(String text, int clientId){
|
||||
for(int i = 1; i <= this->ws->count(); i++){
|
||||
if(clientId!=i){
|
||||
this->ws->client(i)->text(text);
|
||||
void ESPUIClass::updateNumber(int id, int number, int clientId) {
|
||||
if (id < cIndex && controls[id]->type == UI_NUMBER) {
|
||||
controls[id]->value = number;
|
||||
String json;
|
||||
StaticJsonBuffer<200> jsonBuffer;
|
||||
JsonObject &root = jsonBuffer.createObject();
|
||||
root["type"] = UPDATE_NUMBER;
|
||||
root["value"] = String(number);
|
||||
root["id"] = String(id);
|
||||
root.printTo(json);
|
||||
textThem(json, clientId);
|
||||
} else {
|
||||
if (debug) Serial.println(String("Error: ") + String(id) + String(" is no number"));
|
||||
}
|
||||
}
|
||||
|
||||
void ESPUIClass::updateNumber(String label, int number, int clientId) {
|
||||
if (!labelExists(label)) {
|
||||
if (debug) Serial.println("UI ERROR: Element does not " + String(label) + " exist, cannot update!");
|
||||
return;
|
||||
}
|
||||
updateNumber(getIdByLabel(label), number, clientId);
|
||||
}
|
||||
|
||||
// This is a hacky workaround because ESPAsyncWebServer does not have a function
|
||||
// like this and it's clients array is private
|
||||
void ESPUIClass::textThem(String text, int clientId) {
|
||||
int tryId = 0;
|
||||
for (int count = 0; count < this->ws->count();) {
|
||||
if (this->ws->hasClient(tryId)) {
|
||||
if (clientId != tryId) {
|
||||
this->ws->client(tryId)->text(text);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
tryId++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -376,18 +561,22 @@ void ESPUIClass::jsonDom(AsyncWebSocketClient *client) {
|
||||
}
|
||||
}
|
||||
|
||||
void ESPUIClass::begin(const char *_title) {
|
||||
void ESPUIClass::beginSPIFFS(const char *_title) {
|
||||
|
||||
ui_title = _title;
|
||||
server = new AsyncWebServer(80);
|
||||
ws = new AsyncWebSocket("/ws");
|
||||
if(!SPIFFS.begin()) {
|
||||
Serial.println("SPIFFS Mount Failed, PLEASE CHECK THE README ON HOW TO PREPARE YOUR ESP!!!!!!!");
|
||||
|
||||
if (!SPIFFS.begin()) {
|
||||
Serial.println("SPIFFS Mount Failed, PLEASE CHECK THE README ON HOW TO "
|
||||
"PREPARE YOUR ESP!!!!!!!");
|
||||
return;
|
||||
}
|
||||
listDir("/", 1);
|
||||
|
||||
if(!SPIFFS.exists( "/index.htm")) {
|
||||
Serial.println("Please read the README!!!!!!!, Make sure to ESPUI.prepareFileSystem() once in an empty sketch");
|
||||
if (!SPIFFS.exists("/index.htm")) {
|
||||
Serial.println("Please read the README!!!!!!!, Make sure to "
|
||||
"ESPUI.prepareFileSystem() once in an empty sketch");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -397,7 +586,76 @@ void ESPUIClass::begin(const char *_title) {
|
||||
|
||||
// Heap for general Servertest
|
||||
server->on("/heap", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
request->send(200, "text/plain", String(ESP.getFreeHeap()));
|
||||
request->send(200, "text/plain", String(ESP.getFreeHeap()) + " In SPIFFSmode");
|
||||
});
|
||||
|
||||
server->onNotFound(
|
||||
[](AsyncWebServerRequest *request) {
|
||||
request->send(404);
|
||||
});
|
||||
|
||||
server->on("/zepto.js", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, "application/javascript", JS_ZEPTO_GZIP, sizeof(JS_ZEPTO_GZIP));
|
||||
response->addHeader("Content-Encoding", "gzip");
|
||||
request->send(response);
|
||||
});
|
||||
|
||||
server->begin();
|
||||
if (debug)
|
||||
Serial.println("UI Initialized");
|
||||
}
|
||||
|
||||
void ESPUIClass::begin(const char *_title) {
|
||||
|
||||
ui_title = _title;
|
||||
server = new AsyncWebServer(80);
|
||||
ws = new AsyncWebSocket("/ws");
|
||||
|
||||
ws->onEvent(onWsEvent);
|
||||
server->addHandler(ws);
|
||||
|
||||
server->on("/", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", HTML_INDEX);
|
||||
request->send(response);
|
||||
});
|
||||
|
||||
// Javascript files
|
||||
|
||||
server->on("/js/zepto.min.js", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, "application/javascript", JS_ZEPTO_GZIP, sizeof(JS_ZEPTO_GZIP));
|
||||
response->addHeader("Content-Encoding", "gzip");
|
||||
request->send(response);
|
||||
});
|
||||
|
||||
server->on("/js/controls.js", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, "application/javascript", JS_CONTROLS_GZIP, sizeof(JS_CONTROLS_GZIP));
|
||||
response->addHeader("Content-Encoding", "gzip");
|
||||
request->send(response);
|
||||
});
|
||||
|
||||
server->on("/js/slider.js", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, "application/javascript", JS_SLIDER_GZIP, sizeof(JS_SLIDER_GZIP));
|
||||
response->addHeader("Content-Encoding", "gzip");
|
||||
request->send(response);
|
||||
});
|
||||
|
||||
// Stylesheets
|
||||
|
||||
server->on("/css/style.css", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, "text/css", CSS_STYLE_GZIP, sizeof(CSS_STYLE_GZIP));
|
||||
response->addHeader("Content-Encoding", "gzip");
|
||||
request->send(response);
|
||||
});
|
||||
|
||||
server->on("/css/normalize.css", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, "text/css", CSS_NORMALIZE_GZIP, sizeof(CSS_NORMALIZE_GZIP));
|
||||
response->addHeader("Content-Encoding", "gzip");
|
||||
request->send(response);
|
||||
});
|
||||
|
||||
// Heap for general Servertest
|
||||
server->on("/heap", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
request->send(200, "text/plain", String(ESP.getFreeHeap())+ " In Memorymode");
|
||||
});
|
||||
|
||||
server->onNotFound(
|
||||
|
95
src/ESPUI.h
@ -39,18 +39,35 @@ typedef struct Control {
|
||||
unsigned int color;
|
||||
} Control;
|
||||
|
||||
// Types
|
||||
// Message Types (and control types)
|
||||
#define UI_TITEL 0
|
||||
|
||||
#define UI_LABEL 1
|
||||
#define UPDATE_LABEL 6
|
||||
|
||||
#define UI_BUTTON 2
|
||||
|
||||
#define UI_SWITCHER 3
|
||||
#define UPDATE_SWITCHER 7
|
||||
|
||||
#define UI_PAD 4
|
||||
#define UI_CPAD 5
|
||||
#define UPDATE_LABEL 6
|
||||
#define UPDATE_SWITCHER 7
|
||||
|
||||
|
||||
#define UI_SLIDER 8
|
||||
#define UPDATE_SLIDER 9
|
||||
|
||||
#define UI_NUMBER 10
|
||||
#define UPDATE_NUMBER 11
|
||||
|
||||
#define UI_TEXT_INPUT 12
|
||||
#define UPDATE_TEXT_INPUT 13
|
||||
|
||||
#define UI_GRAPH 14
|
||||
#define CLEAR_GRAPH 15
|
||||
#define ADD_GRAPH_POINT 16
|
||||
|
||||
|
||||
// Values
|
||||
#define B_DOWN -1
|
||||
#define B_UP 1
|
||||
@ -70,7 +87,7 @@ typedef struct Control {
|
||||
#define S_INACTIVE 7
|
||||
|
||||
#define SL_VALUE 8
|
||||
|
||||
#define N_VALUE 9
|
||||
|
||||
// Colors
|
||||
#define COLOR_TURQUOISE 0
|
||||
@ -86,44 +103,56 @@ typedef struct Control {
|
||||
class ESPUIClass {
|
||||
|
||||
public:
|
||||
void begin(const char *_title); // Setup servers and page
|
||||
void begin(const char *_title); // Setup servers and page in Memorymode
|
||||
void beginSPIFFS(const char *_title); // Setup servers and page in SPIFFSmode
|
||||
|
||||
void prepareFileSystem(); // Initially preps the filesystem and loads a lot of stuff into SPIFFS
|
||||
void prepareFileSystem(); // Initially preps the filesystem and loads a lot of stuff into SPIFFS
|
||||
void list();
|
||||
// Creating Elements
|
||||
|
||||
// Creating Elements
|
||||
void label(const char *label, int color, String value = ""); // Create Label
|
||||
void button(const char *label, void (*callBack)(Control, int), int color,
|
||||
String value = ""); // Create Event Button
|
||||
void switcher(const char *label, bool startState,
|
||||
void (*callBack)(Control, int),
|
||||
int color); // Create Toggle Button
|
||||
void pad(const char *label, bool centerButton, void (*callBack)(Control, int),
|
||||
int color); // Create Pad Control
|
||||
void slider(const char *label, void (*callBack)(Control, int), int color, String value); // Create Slider Control
|
||||
int button(const char *label, void (*callBack)(Control, int), int color, String value = ""); // Create Event Button
|
||||
int switcher(const char *label, bool startState, void (*callBack)(Control, int), int color); // Create Toggle Button
|
||||
int pad(const char *label, bool centerButton, void (*callBack)(Control, int), int color); // Create Pad Control
|
||||
int slider(const char *label, void (*callBack)(Control, int), int color, String value); // Create Slider Control
|
||||
int number(const char *label, void (*callBack)(Control, int), int color, int number, int min, int max); // Create a Number Input Control
|
||||
|
||||
// Update Elements
|
||||
void print(int id, String value);
|
||||
void print(String label, String value);
|
||||
// Output only
|
||||
int label(const char *label, int color, String value = ""); // Create Label
|
||||
int graph(const char *label, int color); // Create Graph display
|
||||
|
||||
void updateSwitcher(int id, bool nValue, int clientId = -1);
|
||||
void updateSwitcher(String label, bool nValue, int clientId = -1);
|
||||
// Update Elements
|
||||
void print(int id, String value);
|
||||
void print(String label, String value);
|
||||
|
||||
void updateSlider(int id, int nValue, int clientId = -1);
|
||||
void updateSlider(String label, int nValue, int clientId = -1);
|
||||
void updateSwitcher(int id, bool nValue, int clientId = -1);
|
||||
void updateSwitcher(String label, bool nValue, int clientId = -1);
|
||||
|
||||
void textThem(String text, int clientId);
|
||||
void updateSlider(int id, int nValue, int clientId = -1);
|
||||
void updateSlider(String label, int nValue, int clientId = -1);
|
||||
|
||||
// Variables ---
|
||||
const char *ui_title = "ESPUI"; // Store UI Title and Header Name
|
||||
int cIndex = 0; // Control index
|
||||
Control *controls[25];
|
||||
void jsonDom(AsyncWebSocketClient *client);
|
||||
int getIdByLabel(String label);
|
||||
bool labelExists(String label);
|
||||
void updateNumber(int id, int nValue, int clientId = -1);
|
||||
void updateNumber(String label, int nValue, int clientId = -1);
|
||||
|
||||
void clearGraph(int id, int clientId = -1);
|
||||
void clearGraph(String label, int clientId = -1);
|
||||
|
||||
void addGraphPoint(int id, int nValue, int clientId = -1);
|
||||
void addGraphPoint(String label, int nValue, int clientId = -1);
|
||||
|
||||
|
||||
void textThem(String text, int clientId);
|
||||
|
||||
// Variables ---
|
||||
const char *ui_title = "ESPUI"; // Store UI Title and Header Name
|
||||
int cIndex = 0; // Control index
|
||||
Control *controls[25];
|
||||
void jsonDom(AsyncWebSocketClient *client);
|
||||
int getIdByLabel(String label);
|
||||
bool labelExists(String label);
|
||||
|
||||
private:
|
||||
AsyncWebServer *server;
|
||||
AsyncWebSocket *ws;
|
||||
AsyncWebServer *server;
|
||||
AsyncWebSocket *ws;
|
||||
};
|
||||
|
||||
extern ESPUIClass ESPUI;
|
||||
|
5
src/dataControlsJS.h
Normal file
@ -10,7 +10,7 @@ const char HTML_INDEX[] PROGMEM = R"=====(
|
||||
<link rel="stylesheet" href="/css/normalize.css">
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
|
||||
<script src="/js/zepto.js"></script>
|
||||
<script src="/js/zepto.min.js"></script>
|
||||
<script src="/js/slider.js"></script>
|
||||
<script src="/js/controls.js"></script>
|
||||
</head>
|
5
src/dataNormalizeCSS.h
Normal file
@ -0,0 +1,5 @@
|
||||
const char CSS_NORMALIZE[] PROGMEM = R"=====(
|
||||
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}
|
||||
)=====";
|
||||
|
||||
const uint8_t CSS_NORMALIZE_GZIP[865] PROGMEM = { 31,139,8,0,0,0,0,0,0,3,149,84,93,111,219,58,12,125,223,175,8,90,12,184,3,228,194,237,221,214,65,198,126,73,144,7,90,162,109,45,250,130,36,167,201,12,255,247,81,182,227,36,93,122,129,139,60,196,166,37,242,240,156,67,118,201,232,161,113,54,21,13,24,165,79,60,130,141,69,196,160,154,170,48,177,72,120,76,69,84,191,177,0,249,171,143,137,63,151,229,231,170,120,195,122,175,210,253,175,99,237,228,105,48,16,90,101,121,57,66,72,74,104,100,16,149,68,38,49,129,210,145,53,170,21,224,147,114,54,63,246,1,89,227,92,194,192,58,4,153,255,218,224,122,207,12,40,203,12,218,158,89,56,176,136,98,186,17,123,67,233,79,131,84,209,107,56,241,90,59,177,31,161,151,202,49,1,246,0,145,249,224,218,128,49,178,3,85,117,235,73,101,181,178,88,76,23,170,3,102,104,160,11,208,170,181,188,134,136,249,235,156,136,91,151,254,217,10,98,38,56,29,119,95,214,20,214,89,172,58,84,109,151,168,187,109,167,164,68,187,99,9,13,125,78,120,115,110,132,161,6,177,207,189,88,89,8,167,93,224,41,16,195,30,2,218,52,2,7,234,232,64,228,240,206,17,156,193,245,41,67,200,180,213,117,216,38,149,52,238,134,218,5,226,164,168,93,74,206,240,103,127,220,72,122,68,57,214,44,18,60,219,206,10,190,205,160,106,167,229,40,27,59,7,99,58,105,228,42,81,143,98,236,158,151,32,73,198,95,208,84,139,74,79,223,95,209,108,202,145,94,247,87,136,249,99,211,148,213,12,251,177,44,203,49,26,208,250,42,197,15,82,59,246,132,162,247,87,209,215,111,159,171,137,230,51,75,149,119,81,101,229,120,64,226,136,26,254,144,251,156,41,57,207,139,242,233,27,154,156,124,88,218,166,200,75,14,41,211,46,132,16,75,241,208,78,66,241,64,238,249,50,100,14,27,237,222,248,172,202,56,91,235,236,197,103,234,241,107,233,143,99,23,134,194,184,223,68,232,49,35,86,182,229,89,104,82,36,135,170,15,194,171,230,158,82,174,149,160,79,110,20,142,172,189,175,37,217,14,89,4,227,111,70,202,56,235,72,113,129,108,125,170,46,108,17,170,177,238,169,69,203,148,245,125,98,206,167,217,252,68,9,25,158,229,33,35,187,192,48,11,161,108,71,211,153,166,12,235,203,58,109,115,166,11,188,131,138,170,214,120,174,48,167,28,166,185,157,140,216,184,96,102,171,46,39,58,90,8,155,9,200,54,157,60,254,124,152,227,15,59,118,29,164,209,194,244,46,70,90,25,69,193,225,188,29,192,123,4,42,34,144,207,73,42,209,135,72,45,120,167,136,214,176,148,220,210,196,0,97,148,187,235,226,107,112,88,46,73,108,160,215,105,185,196,249,164,96,227,68,31,11,101,45,173,140,233,222,223,241,213,44,149,7,41,179,168,229,56,29,29,174,61,106,137,7,208,227,117,63,162,67,177,39,225,223,183,14,180,29,30,242,80,174,46,89,231,243,248,190,198,114,199,246,166,198,240,176,35,116,11,55,19,180,34,122,101,139,107,241,63,60,79,139,225,246,252,176,0,159,252,119,35,3,113,46,186,251,50,100,221,27,133,90,86,255,229,255,243,197,255,53,30,119,49,92,240,207,145,66,100,24,250,94,203,31,94,145,40,92,128,188,61,238,117,52,89,119,106,137,12,121,150,58,111,200,232,180,146,155,71,81,230,223,58,31,155,23,127,209,232,233,95,218,39,155,167,239,47,211,223,107,94,46,26,91,180,242,158,101,214,41,188,157,252,243,176,254,189,129,83,182,239,121,117,211,232,106,240,17,249,249,161,90,62,228,109,176,20,144,44,117,195,165,224,167,63,69,20,17,138,155,7,0,0 };
|
6
src/dataSliderJS.h
Normal file
@ -0,0 +1,6 @@
|
||||
const char JS_SLIDER[] PROGMEM = R"=====(
|
||||
function rkmd_rangeSlider(b){var f,e,c,a,g,d,h;f=$(b);e=f.width();c=f.offset().left;g=f;g.each(function(k,j){a=$(this);a.append(sliderDiscrete_tmplt());d=a.find('input[type="range"]');h=a.find(".slider");slider_fill=h.find(".slider-fill");slider_handle=h.find(".slider-handle");slider_label=h.find(".slider-label");var l=parseInt(d.val());slider_fill.css("width",l+"%");slider_handle.css("left",l+"%");slider_label.find("span").text(l)});f.on("mousedown touchstart",".slider-handle",function(o){if(o.button===2){return false}var m=$(this).parents(".rkmd-slider");var l=m.width();var i=m.offset().left;var k=m.find('input[type="range"]').is(":disabled");if(k===true){return false}$(this).addClass("is-active");var p=function(r){var q=r.pageX-i;if(q<=l&&!(q<"0")){slider_move(m,q,l,true)}};var n=function(q){$(this).off(j);m.find(".is-active").removeClass("is-active")};var j={mousemove:p,touchmove:p,mouseup:n,touchend:n};$(document).on(j)});f.on("mousedown touchstart",".slider",function(p){if(p.button===2){return false}var m=$(this).parents(".rkmd-slider");var l=m.width();var i=m.offset().left;var k=m.find('input[type="range"]').is(":disabled");if(k===true){return false}var o=p.pageX-i;if(o<=l&&!(o<"0")){slider_move(m,o,l,true)}var n=function(q){$(this).off(j)};var j={mouseup:n,touchend:n};$(document).on(j)})}function sliderDiscrete_tmplt(){var a='<div class="slider"><div class="slider-fill"></div><div class="slider-handle"><div class="slider-label"><span>0</span></div></div></div>';return a}function slider_move(g,a,h,e){var i=parseInt(Math.round(a/h*100));var b=g.find(".slider-fill");var c=g.find(".slider-handle");var f=g.find('input[type="range"]');b.css("width",i+"%");c.css({left:i+"%",transition:"none","-webkit-transition":"none","-moz-transition":"none"});f.val(i);if(g.find(".slider-handle span").text()!=i){g.find(".slider-handle span").text(i);var d=g.attr("id").substring(2);if(e){websock.send("slvalue:"+i+":"+d)}}};
|
||||
)=====";
|
||||
|
||||
|
||||
const uint8_t JS_SLIDER_GZIP[] PROGMEM = { 31,139,8,0,0,0,0,0,0,3,213,85,203,146,211,48,16,252,149,172,106,33,22,235,104,195,30,227,40,23,184,112,224,196,133,42,138,218,146,45,217,86,34,75,142,37,103,1,87,254,157,145,108,231,13,236,149,139,31,51,147,86,207,244,184,147,183,58,115,210,232,73,179,169,248,115,195,116,33,190,40,201,69,19,165,184,219,177,102,146,199,34,206,98,22,23,49,143,203,36,167,247,144,72,4,205,201,139,228,174,140,112,146,193,179,201,115,43,92,132,137,18,185,75,10,154,39,5,17,44,43,163,124,128,143,54,241,26,119,12,126,237,74,105,113,194,8,171,107,161,121,100,195,97,31,165,205,26,225,196,179,171,106,5,56,56,225,148,145,92,66,193,84,234,186,117,223,220,207,90,80,20,248,161,239,83,156,148,99,30,145,30,2,225,164,127,120,206,165,82,180,60,207,206,124,240,88,82,50,205,149,184,42,234,195,199,50,197,82,113,13,21,162,80,228,167,163,104,205,26,43,62,105,23,113,178,99,202,83,63,161,65,50,107,35,20,38,133,98,245,128,222,92,82,232,11,252,212,46,243,225,148,225,100,91,51,141,48,113,226,135,139,20,222,227,4,38,174,35,84,153,214,10,110,94,244,196,153,54,43,173,99,13,192,92,118,19,31,52,48,184,147,121,100,72,218,58,103,52,165,244,9,119,48,245,182,209,147,156,41,43,246,190,163,106,212,136,64,103,66,59,160,71,252,110,204,14,99,238,251,174,14,11,224,223,37,188,159,47,129,143,110,32,250,23,17,137,4,240,5,151,150,165,74,112,64,6,118,27,160,229,154,86,92,48,27,57,49,206,63,40,230,103,38,237,140,65,91,59,49,48,170,233,161,207,166,223,220,45,109,160,135,66,124,157,73,143,188,93,82,245,246,237,29,220,209,28,97,220,13,115,174,204,78,68,85,188,141,85,28,206,221,239,3,156,62,194,109,113,55,30,15,45,70,107,156,84,227,70,156,144,32,141,240,80,215,236,122,188,53,237,130,92,190,102,81,199,65,176,225,57,196,219,122,161,251,40,124,21,11,189,79,238,35,110,178,182,2,5,176,23,123,253,90,217,79,244,174,131,222,245,255,168,183,71,51,180,62,213,207,12,250,153,155,250,153,131,126,255,82,239,92,143,215,204,125,63,130,77,110,187,85,216,54,70,167,75,46,119,147,204,47,0,69,195,244,86,215,177,222,138,86,203,71,200,220,74,15,159,237,173,84,239,60,171,165,247,131,213,124,249,24,238,3,208,201,117,154,12,179,100,151,204,251,105,21,96,231,101,44,122,222,242,232,96,159,153,43,73,99,90,16,144,61,150,239,222,207,231,184,87,59,165,197,109,59,245,201,236,42,121,176,209,240,255,49,166,255,96,228,233,153,71,202,222,3,179,16,236,252,98,45,66,8,180,101,218,74,223,202,2,105,163,193,214,208,236,69,164,27,233,102,199,20,58,230,42,243,235,70,34,124,67,222,166,101,88,190,219,196,39,167,118,139,239,168,196,221,43,10,101,223,46,135,118,153,115,13,88,0,108,56,177,109,106,93,35,117,17,61,133,19,97,232,192,218,154,108,67,172,8,214,174,128,78,43,22,232,1,250,132,43,7,3,218,39,191,1,31,225,29,112,150,7,0,0 };
|
5
src/dataStyleCSS.h
Normal file
9
src/dataZeptoJS.h
Normal file
@ -1,3 +0,0 @@
|
||||
const char CSS_NORMALIZE[] PROGMEM = R"=====(
|
||||
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}
|
||||
)=====";
|
@ -1,3 +0,0 @@
|
||||
const char JS_SLIDER[] PROGMEM = R"=====(
|
||||
function rkmd_rangeSlider(b){var f,e,c,a,g,d,h;f=$(b);e=f.width();c=f.offset().left;g=f;g.each(function(k,j){a=$(this);a.append(sliderDiscrete_tmplt());d=a.find('input[type="range"]');h=a.find(".slider");slider_fill=h.find(".slider-fill");slider_handle=h.find(".slider-handle");slider_label=h.find(".slider-label");var l=parseInt(d.val());slider_fill.css("width",l+"%");slider_handle.css("left",l+"%");slider_label.find("span").text(l)});f.on("mousedown touchstart",".slider-handle",function(o){if(o.button===2){return false}var m=$(this).parents(".rkmd-slider");var l=m.width();var i=m.offset().left;var k=m.find('input[type="range"]').is(":disabled");if(k===true){return false}$(this).addClass("is-active");var p=function(r){var q=r.pageX-i;if(q<=l&&!(q<"0")){slider_move(m,q,l,true)}};var n=function(q){$(this).off(j);m.find(".is-active").removeClass("is-active")};var j={mousemove:p,touchmove:p,mouseup:n,touchend:n};$(document).on(j)});f.on("mousedown touchstart",".slider",function(p){if(p.button===2){return false}var m=$(this).parents(".rkmd-slider");var l=m.width();var i=m.offset().left;var k=m.find('input[type="range"]').is(":disabled");if(k===true){return false}var o=p.pageX-i;if(o<=l&&!(o<"0")){slider_move(m,o,l,true)}var n=function(q){$(this).off(j)};var j={mouseup:n,touchend:n};$(document).on(j)})}function sliderDiscrete_tmplt(){var a='<div class="slider"><div class="slider-fill"></div><div class="slider-handle"><div class="slider-label"><span>0</span></div></div></div>';return a}function slider_move(g,a,h,e){var i=parseInt(Math.round(a/h*100));var b=g.find(".slider-fill");var c=g.find(".slider-handle");var f=g.find('input[type="range"]');b.css("width",i+"%");c.css({left:i+"%",transition:"none","-webkit-transition":"none","-moz-transition":"none"});f.val(i);if(g.find(".slider-handle span").text()!=i){g.find(".slider-handle span").text(i);var d=g.attr("id").substring(2);if(e){websock.send("slvalue:"+i+":"+d)}}};
|
||||
)=====";
|