commit 4b1796250c61695b54b92cd80f865af3bc9f5c3e Author: Felix Date: Sun May 11 19:19:24 2025 +0200 Initial commit Half-baked state. Most of the UI is mostly done, but the integration with Grist (or any other data provider) is still missing. diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0af181c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Godot 4+ specific ignores +.godot/ +/android/ diff --git a/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_de.json b/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_de.json new file mode 100644 index 0000000..4a68ca5 --- /dev/null +++ b/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_de.json @@ -0,0 +1,503 @@ +{ + "debug": false, + "layouts": [ + { + "name": "standart-characters", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "Q", + "display": "q", + "display-uppercase": "Q" + }, + { + "type": "char", + "output": "W", + "display": "w", + "display-uppercase": "W" + }, + { + "type": "char", + "output": "E", + "display": "e", + "display-uppercase": "E" + }, + { + "type": "char", + "output": "R", + "display": "r", + "display-uppercase": "R" + }, + { + "type": "char", + "output": "T", + "display": "t", + "display-uppercase": "T" + }, + { + "type": "char", + "output": "Z", + "display": "z", + "display-uppercase": "Z" + }, + { + "type": "char", + "output": "U", + "display": "u", + "display-uppercase": "U" + }, + { + "type": "char", + "output": "I", + "display": "i", + "display-uppercase": "I" + }, + { + "type": "char", + "output": "O", + "display": "o", + "display-uppercase": "O" + }, + { + "type": "char", + "output": "P", + "display": "p", + "display-uppercase": "P" + }, + { + "type": "char", + "output": "ü", + "display": "ü", + "display-uppercase": "Ü" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "A", + "display": "a", + "display-uppercase": "A" + }, + { + "type": "char", + "output": "S", + "display": "s", + "display-uppercase": "S" + }, + { + "type": "char", + "output": "D", + "display": "d", + "display-uppercase": "D" + }, + { + "type": "char", + "output": "F", + "display": "f", + "display-uppercase": "F" + }, + { + "type": "char", + "output": "G", + "display": "g", + "display-uppercase": "G" + }, + { + "type": "char", + "output": "H", + "display": "h", + "display-uppercase": "H" + }, + { + "type": "char", + "output": "J", + "display": "j", + "display-uppercase": "J" + }, + { + "type": "char", + "output": "K", + "display": "k", + "display-uppercase": "K" + }, + { + "type": "char", + "output": "L", + "display": "l", + "display-uppercase": "L" + }, + { + "type": "char", + "output": "ö", + "display": "ö", + "display-uppercase": "Ö" + }, + { + "type": "char", + "output": "ä", + "display": "ä", + "display-uppercase": "Ä" + }, + { + "type": "special", + "output": "Return", + "display-icon": "PREDEFINED:ENTER", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "Y", + "display": "y", + "display-uppercase": "Y" + }, + { + "type": "char", + "output": "X", + "display": "x", + "display-uppercase": "X" + }, + { + "type": "char", + "output": "C", + "display": "c", + "display-uppercase": "C" + }, + { + "type": "char", + "output": "V", + "display": "v", + "display-uppercase": "V" + }, + { + "type": "char", + "output": "B", + "display": "b", + "display-uppercase": "B" + }, + { + "type": "char", + "output": "N", + "display": "n", + "display-uppercase": "N" + }, + { + "type": "char", + "output": "M", + "display": "m", + "display-uppercase": "M" + }, + { + "type": "char", + "output": "@", + "display": "@", + "display-uppercase": "@" + }, + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "special-characters", + "display": "&123", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": ",", + "display": "," + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 5 + }, + { + "type": "char", + "output": ".", + "display": "." + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 2 + } + ] + } + ] + }, + { + "name": "special-characters", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "1", + "display": "1" + }, + { + "type": "char", + "output": "2", + "display": "2" + }, + { + "type": "char", + "output": "3", + "display": "3" + }, + { + "type": "char", + "output": "4", + "display": "4" + }, + { + "type": "char", + "output": "5", + "display": "5" + }, + { + "type": "char", + "output": "6", + "display": "6" + }, + { + "type": "char", + "output": "7", + "display": "7" + }, + { + "type": "char", + "output": "8", + "display": "8" + }, + { + "type": "char", + "output": "9", + "display": "9" + }, + { + "type": "char", + "output": "0", + "display": "0" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "@", + "display": "@" + }, + { + "type": "char", + "output": "#", + "display": "#" + }, + { + "type": "char", + "output": "$", + "display": "$" + }, + { + "type": "char", + "output": "%", + "display": "%" + }, + { + "type": "char", + "output": "&", + "display": "&" + }, + { + "type": "char", + "output": "-", + "display": "-" + }, + { + "type": "char", + "output": "+", + "display": "+" + }, + { + "type": "char", + "output": "=", + "display": "=" + }, + { + "type": "char", + "output": "~", + "display": "~" + }, + { + "type": "char", + "output": "(", + "display": "(" + }, + { + "type": "char", + "output": ")", + "display": ")" + }, + { + "type": "special", + "output": "Return", + "display-icon": "PREDEFINED:ENTER", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "*", + "display": "*" + }, + { + "type": "char", + "output": "\"", + "display": "\"" + }, + { + "type": "char", + "output": "'", + "display": "'" + }, + { + "type": "char", + "output": ":", + "display": ":" + }, + { + "type": "char", + "output": ";", + "display": ";" + }, + { + "type": "char", + "output": "!", + "display": "!" + }, + { + "type": "char", + "output": "?", + "display": "?" + }, + { + "type": "char", + "output": "<", + "display": "<" + }, + { + "type": "char", + "output": ">", + "display": ">" + }, + { + "type": "char", + "output": "{", + "display": "{" + }, + { + "type": "char", + "output": "}", + "display": "}" + }, + { + "type": "char", + "output": "[", + "display": "[" + }, + { + "type": "char", + "output": "]", + "display": "]" + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "standart-characters", + "display": "ABC", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "_", + "display": "_" + }, + { + "type": "char", + "output": "/", + "display": "/" + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 5 + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 2 + } + ] + } + ] + } + ] +} diff --git a/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_de_fr.json b/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_de_fr.json new file mode 100644 index 0000000..fb6bbec --- /dev/null +++ b/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_de_fr.json @@ -0,0 +1,774 @@ +{ + "debug": false, + "layouts": [ + { + "name": "standart-characters-ch-de", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "Q", + "display": "q", + "display-uppercase": "Q" + }, + { + "type": "char", + "output": "W", + "display": "w", + "display-uppercase": "W" + }, + { + "type": "char", + "output": "E", + "display": "e", + "display-uppercase": "E" + }, + { + "type": "char", + "output": "R", + "display": "r", + "display-uppercase": "R" + }, + { + "type": "char", + "output": "T", + "display": "t", + "display-uppercase": "T" + }, + { + "type": "char", + "output": "Z", + "display": "z", + "display-uppercase": "Z" + }, + { + "type": "char", + "output": "U", + "display": "u", + "display-uppercase": "U" + }, + { + "type": "char", + "output": "I", + "display": "i", + "display-uppercase": "I" + }, + { + "type": "char", + "output": "O", + "display": "o", + "display-uppercase": "O" + }, + { + "type": "char", + "output": "P", + "display": "p", + "display-uppercase": "P" + }, + { + "type": "char", + "output": "ü", + "display": "ü", + "display-uppercase": "Ü" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "A", + "display": "a", + "display-uppercase": "A" + }, + { + "type": "char", + "output": "S", + "display": "s", + "display-uppercase": "S" + }, + { + "type": "char", + "output": "D", + "display": "d", + "display-uppercase": "D" + }, + { + "type": "char", + "output": "F", + "display": "f", + "display-uppercase": "F" + }, + { + "type": "char", + "output": "G", + "display": "g", + "display-uppercase": "G" + }, + { + "type": "char", + "output": "H", + "display": "h", + "display-uppercase": "H" + }, + { + "type": "char", + "output": "J", + "display": "j", + "display-uppercase": "J" + }, + { + "type": "char", + "output": "K", + "display": "k", + "display-uppercase": "K" + }, + { + "type": "char", + "output": "L", + "display": "l", + "display-uppercase": "L" + }, + { + "type": "char", + "output": "ö", + "display": "ö", + "display-uppercase": "Ö" + }, + { + "type": "char", + "output": "ä", + "display": "ä", + "display-uppercase": "Ä" + }, + { + "type": "special", + "output": "Return", + "display": "Enter", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "Y", + "display": "y", + "display-uppercase": "Y" + }, + { + "type": "char", + "output": "X", + "display": "x", + "display-uppercase": "X" + }, + { + "type": "char", + "output": "C", + "display": "c", + "display-uppercase": "C" + }, + { + "type": "char", + "output": "V", + "display": "v", + "display-uppercase": "V" + }, + { + "type": "char", + "output": "B", + "display": "b", + "display-uppercase": "B" + }, + { + "type": "char", + "output": "N", + "display": "n", + "display-uppercase": "N" + }, + { + "type": "char", + "output": "M", + "display": "m", + "display-uppercase": "M" + }, + { + "type": "char", + "output": "@", + "display": "@", + "display-uppercase": "@" + }, + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "standart-characters-ch-fr", + "display": "FR", + "stretch-ratio": 1.5 + }, + { + "type": "switch-layout", + "layout-name": "special-characters", + "display": "&123", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": ",", + "display": "," + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 5 + }, + { + "type": "char", + "output": ".", + "display": "." + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 2 + } + ] + } + ] + }, + { + "name": "standart-characters-ch-fr", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "Q", + "display": "q", + "display-uppercase": "Q" + }, + { + "type": "char", + "output": "W", + "display": "w", + "display-uppercase": "W" + }, + { + "type": "char", + "output": "E", + "display": "e", + "display-uppercase": "E" + }, + { + "type": "char", + "output": "R", + "display": "r", + "display-uppercase": "R" + }, + { + "type": "char", + "output": "T", + "display": "t", + "display-uppercase": "T" + }, + { + "type": "char", + "output": "Z", + "display": "z", + "display-uppercase": "Z" + }, + { + "type": "char", + "output": "U", + "display": "u", + "display-uppercase": "U" + }, + { + "type": "char", + "output": "I", + "display": "i", + "display-uppercase": "I" + }, + { + "type": "char", + "output": "O", + "display": "o", + "display-uppercase": "O" + }, + { + "type": "char", + "output": "P", + "display": "p", + "display-uppercase": "P" + }, + { + "type": "char", + "output": "è", + "display": "è", + "display-uppercase": "È" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "A", + "display": "a", + "display-uppercase": "A" + }, + { + "type": "char", + "output": "S", + "display": "s", + "display-uppercase": "S" + }, + { + "type": "char", + "output": "D", + "display": "d", + "display-uppercase": "D" + }, + { + "type": "char", + "output": "F", + "display": "f", + "display-uppercase": "F" + }, + { + "type": "char", + "output": "G", + "display": "g", + "display-uppercase": "G" + }, + { + "type": "char", + "output": "H", + "display": "h", + "display-uppercase": "H" + }, + { + "type": "char", + "output": "J", + "display": "j", + "display-uppercase": "J" + }, + { + "type": "char", + "output": "K", + "display": "k", + "display-uppercase": "K" + }, + { + "type": "char", + "output": "L", + "display": "l", + "display-uppercase": "L" + }, + { + "type": "char", + "output": "é", + "display": "é", + "display-uppercase": "É" + }, + { + "type": "char", + "output": "à", + "display": "à", + "display-uppercase": "À" + }, + { + "type": "special", + "output": "Return", + "display": "Enter", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "Y", + "display": "y", + "display-uppercase": "Y" + }, + { + "type": "char", + "output": "X", + "display": "x", + "display-uppercase": "X" + }, + { + "type": "char", + "output": "C", + "display": "c", + "display-uppercase": "C" + }, + { + "type": "char", + "output": "V", + "display": "v", + "display-uppercase": "V" + }, + { + "type": "char", + "output": "B", + "display": "b", + "display-uppercase": "B" + }, + { + "type": "char", + "output": "N", + "display": "n", + "display-uppercase": "N" + }, + { + "type": "char", + "output": "M", + "display": "m", + "display-uppercase": "M" + }, + { + "type": "char", + "output": "@", + "display": "@", + "display-uppercase": "@" + }, + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "standart-characters-ch-de", + "display": "DE", + "stretch-ratio": 1.5 + }, + { + "type": "switch-layout", + "layout-name": "special-characters", + "display": "&123", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": ",", + "display": "," + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 5 + }, + { + "type": "char", + "output": ".", + "display": "." + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 2 + } + ] + } + ] + }, + { + "name": "special-characters", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "1", + "display": "1" + }, + { + "type": "char", + "output": "2", + "display": "2" + }, + { + "type": "char", + "output": "3", + "display": "3" + }, + { + "type": "char", + "output": "4", + "display": "4" + }, + { + "type": "char", + "output": "5", + "display": "5" + }, + { + "type": "char", + "output": "6", + "display": "6" + }, + { + "type": "char", + "output": "7", + "display": "7" + }, + { + "type": "char", + "output": "8", + "display": "8" + }, + { + "type": "char", + "output": "9", + "display": "9" + }, + { + "type": "char", + "output": "0", + "display": "0" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "@", + "display": "@" + }, + { + "type": "char", + "output": "#", + "display": "#" + }, + { + "type": "char", + "output": "$", + "display": "$" + }, + { + "type": "char", + "output": "%", + "display": "%" + }, + { + "type": "char", + "output": "&", + "display": "&" + }, + { + "type": "char", + "output": "-", + "display": "-" + }, + { + "type": "char", + "output": "+", + "display": "+" + }, + { + "type": "char", + "output": "=", + "display": "=" + }, + { + "type": "char", + "output": "~", + "display": "~" + }, + { + "type": "char", + "output": "(", + "display": "(" + }, + { + "type": "char", + "output": ")", + "display": ")" + }, + { + "type": "special", + "output": "Return", + "display": "Enter", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "*", + "display": "*" + }, + { + "type": "char", + "output": "\"", + "display": "\"" + }, + { + "type": "char", + "output": "'", + "display": "'" + }, + { + "type": "char", + "output": ":", + "display": ":" + }, + { + "type": "char", + "output": ";", + "display": ";" + }, + { + "type": "char", + "output": "!", + "display": "!" + }, + { + "type": "char", + "output": "?", + "display": "?" + }, + { + "type": "char", + "output": "<", + "display": "<" + }, + { + "type": "char", + "output": ">", + "display": ">" + }, + { + "type": "char", + "output": "{", + "display": "{" + }, + { + "type": "char", + "output": "}", + "display": "}" + }, + { + "type": "char", + "output": "[", + "display": "[" + }, + { + "type": "char", + "output": "]", + "display": "]" + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "PREVIOUS-LAYOUT", + "display": "ABC", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "_", + "display": "_" + }, + { + "type": "char", + "output": "/", + "display": "/" + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 5 + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 2 + } + ] + } + ] + } + ] +} diff --git a/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_de_fr_en.json b/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_de_fr_en.json new file mode 100644 index 0000000..041d178 --- /dev/null +++ b/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_de_fr_en.json @@ -0,0 +1,1015 @@ +{ + "debug": false, + "layouts": [ + { + "name": "standart-characters-ch-de", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "Q", + "display": "q", + "display-uppercase": "Q" + }, + { + "type": "char", + "output": "W", + "display": "w", + "display-uppercase": "W" + }, + { + "type": "char", + "output": "E", + "display": "e", + "display-uppercase": "E" + }, + { + "type": "char", + "output": "R", + "display": "r", + "display-uppercase": "R" + }, + { + "type": "char", + "output": "T", + "display": "t", + "display-uppercase": "T" + }, + { + "type": "char", + "output": "Z", + "display": "z", + "display-uppercase": "Z" + }, + { + "type": "char", + "output": "U", + "display": "u", + "display-uppercase": "U" + }, + { + "type": "char", + "output": "I", + "display": "i", + "display-uppercase": "I" + }, + { + "type": "char", + "output": "O", + "display": "o", + "display-uppercase": "O" + }, + { + "type": "char", + "output": "P", + "display": "p", + "display-uppercase": "P" + }, + { + "type": "char", + "output": "ü", + "display": "ü", + "display-uppercase": "Ü" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "A", + "display": "a", + "display-uppercase": "A" + }, + { + "type": "char", + "output": "S", + "display": "s", + "display-uppercase": "S" + }, + { + "type": "char", + "output": "D", + "display": "d", + "display-uppercase": "D" + }, + { + "type": "char", + "output": "F", + "display": "f", + "display-uppercase": "F" + }, + { + "type": "char", + "output": "G", + "display": "g", + "display-uppercase": "G" + }, + { + "type": "char", + "output": "H", + "display": "h", + "display-uppercase": "H" + }, + { + "type": "char", + "output": "J", + "display": "j", + "display-uppercase": "J" + }, + { + "type": "char", + "output": "K", + "display": "k", + "display-uppercase": "K" + }, + { + "type": "char", + "output": "L", + "display": "l", + "display-uppercase": "L" + }, + { + "type": "char", + "output": "ö", + "display": "ö", + "display-uppercase": "Ö" + }, + { + "type": "char", + "output": "ä", + "display": "ä", + "display-uppercase": "Ä" + }, + { + "type": "special", + "output": "Return", + "display-icon": "PREDEFINED:ENTER", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "Y", + "display": "y", + "display-uppercase": "Y" + }, + { + "type": "char", + "output": "X", + "display": "x", + "display-uppercase": "X" + }, + { + "type": "char", + "output": "C", + "display": "c", + "display-uppercase": "C" + }, + { + "type": "char", + "output": "V", + "display": "v", + "display-uppercase": "V" + }, + { + "type": "char", + "output": "B", + "display": "b", + "display-uppercase": "B" + }, + { + "type": "char", + "output": "N", + "display": "n", + "display-uppercase": "N" + }, + { + "type": "char", + "output": "M", + "display": "m", + "display-uppercase": "M" + }, + { + "type": "char", + "output": "@", + "display": "@", + "display-uppercase": "@" + }, + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "standart-characters-ch-fr", + "display": "FR", + "stretch-ratio": 1.5 + }, + { + "type": "switch-layout", + "layout-name": "special-characters", + "display": "&123", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": ",", + "display": "," + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 3.5 + }, + { + "type": "char", + "output": ".", + "display": "." + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 1.5 + } + ] + } + ] + }, + { + "name": "standart-characters-ch-fr", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "Q", + "display": "q", + "display-uppercase": "Q" + }, + { + "type": "char", + "output": "W", + "display": "w", + "display-uppercase": "W" + }, + { + "type": "char", + "output": "E", + "display": "e", + "display-uppercase": "E" + }, + { + "type": "char", + "output": "R", + "display": "r", + "display-uppercase": "R" + }, + { + "type": "char", + "output": "T", + "display": "t", + "display-uppercase": "T" + }, + { + "type": "char", + "output": "Z", + "display": "z", + "display-uppercase": "Z" + }, + { + "type": "char", + "output": "U", + "display": "u", + "display-uppercase": "U" + }, + { + "type": "char", + "output": "I", + "display": "i", + "display-uppercase": "I" + }, + { + "type": "char", + "output": "O", + "display": "o", + "display-uppercase": "O" + }, + { + "type": "char", + "output": "P", + "display": "p", + "display-uppercase": "P" + }, + { + "type": "char", + "output": "è", + "display": "è", + "display-uppercase": "È" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "A", + "display": "a", + "display-uppercase": "A" + }, + { + "type": "char", + "output": "S", + "display": "s", + "display-uppercase": "S" + }, + { + "type": "char", + "output": "D", + "display": "d", + "display-uppercase": "D" + }, + { + "type": "char", + "output": "F", + "display": "f", + "display-uppercase": "F" + }, + { + "type": "char", + "output": "G", + "display": "g", + "display-uppercase": "G" + }, + { + "type": "char", + "output": "H", + "display": "h", + "display-uppercase": "H" + }, + { + "type": "char", + "output": "J", + "display": "j", + "display-uppercase": "J" + }, + { + "type": "char", + "output": "K", + "display": "k", + "display-uppercase": "K" + }, + { + "type": "char", + "output": "L", + "display": "l", + "display-uppercase": "L" + }, + { + "type": "char", + "output": "é", + "display": "é", + "display-uppercase": "É" + }, + { + "type": "char", + "output": "à", + "display": "à", + "display-uppercase": "À" + }, + { + "type": "special", + "output": "Return", + "display-icon": "PREDEFINED:ENTER", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "Y", + "display": "y", + "display-uppercase": "Y" + }, + { + "type": "char", + "output": "X", + "display": "x", + "display-uppercase": "X" + }, + { + "type": "char", + "output": "C", + "display": "c", + "display-uppercase": "C" + }, + { + "type": "char", + "output": "V", + "display": "v", + "display-uppercase": "V" + }, + { + "type": "char", + "output": "B", + "display": "b", + "display-uppercase": "B" + }, + { + "type": "char", + "output": "N", + "display": "n", + "display-uppercase": "N" + }, + { + "type": "char", + "output": "M", + "display": "m", + "display-uppercase": "M" + }, + { + "type": "char", + "output": "@", + "display": "@", + "display-uppercase": "@" + }, + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "standart-characters-en", + "display": "EN", + "stretch-ratio": 1.5 + }, + { + "type": "switch-layout", + "layout-name": "special-characters", + "display": "&123", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": ",", + "display": "," + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 3.5 + }, + { + "type": "char", + "output": ".", + "display": "." + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 1.5 + } + ] + } + ] + }, + { + "name": "standart-characters-en", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "Q", + "display": "q", + "display-uppercase": "Q" + }, + { + "type": "char", + "output": "W", + "display": "w", + "display-uppercase": "W" + }, + { + "type": "char", + "output": "E", + "display": "e", + "display-uppercase": "E" + }, + { + "type": "char", + "output": "R", + "display": "r", + "display-uppercase": "R" + }, + { + "type": "char", + "output": "T", + "display": "t", + "display-uppercase": "T" + }, + { + "type": "char", + "output": "Y", + "display": "y", + "display-uppercase": "Y" + }, + { + "type": "char", + "output": "U", + "display": "u", + "display-uppercase": "U" + }, + { + "type": "char", + "output": "I", + "display": "i", + "display-uppercase": "I" + }, + { + "type": "char", + "output": "O", + "display": "o", + "display-uppercase": "O" + }, + { + "type": "char", + "output": "P", + "display": "p", + "display-uppercase": "P" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "A", + "display": "a", + "display-uppercase": "A" + }, + { + "type": "char", + "output": "S", + "display": "s", + "display-uppercase": "S" + }, + { + "type": "char", + "output": "D", + "display": "d", + "display-uppercase": "D" + }, + { + "type": "char", + "output": "F", + "display": "f", + "display-uppercase": "F" + }, + { + "type": "char", + "output": "G", + "display": "g", + "display-uppercase": "G" + }, + { + "type": "char", + "output": "H", + "display": "h", + "display-uppercase": "H" + }, + { + "type": "char", + "output": "J", + "display": "j", + "display-uppercase": "J" + }, + { + "type": "char", + "output": "K", + "display": "k", + "display-uppercase": "K" + }, + { + "type": "char", + "output": "L", + "display": "l", + "display-uppercase": "L" + }, + { + "type": "special", + "output": "Return", + "display-icon": "PREDEFINED:ENTER", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "Z", + "display": "z", + "display-uppercase": "Z" + }, + { + "type": "char", + "output": "X", + "display": "x", + "display-uppercase": "X" + }, + { + "type": "char", + "output": "C", + "display": "c", + "display-uppercase": "C" + }, + { + "type": "char", + "output": "V", + "display": "v", + "display-uppercase": "V" + }, + { + "type": "char", + "output": "B", + "display": "b", + "display-uppercase": "B" + }, + { + "type": "char", + "output": "N", + "display": "n", + "display-uppercase": "N" + }, + { + "type": "char", + "output": "M", + "display": "m", + "display-uppercase": "M" + }, + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "standart-characters-ch-de", + "display": "DE", + "stretch-ratio": 1.5 + }, + { + "type": "switch-layout", + "layout-name": "special-characters", + "display": "&123", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": ",", + "display": "," + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 3.5 + }, + { + "type": "char", + "output": ".", + "display": "." + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 1.5 + } + ] + } + ] + }, + { + "name": "special-characters", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "1", + "display": "1" + }, + { + "type": "char", + "output": "2", + "display": "2" + }, + { + "type": "char", + "output": "3", + "display": "3" + }, + { + "type": "char", + "output": "4", + "display": "4" + }, + { + "type": "char", + "output": "5", + "display": "5" + }, + { + "type": "char", + "output": "6", + "display": "6" + }, + { + "type": "char", + "output": "7", + "display": "7" + }, + { + "type": "char", + "output": "8", + "display": "8" + }, + { + "type": "char", + "output": "9", + "display": "9" + }, + { + "type": "char", + "output": "0", + "display": "0" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "@", + "display": "@" + }, + { + "type": "char", + "output": "#", + "display": "#" + }, + { + "type": "char", + "output": "$", + "display": "$" + }, + { + "type": "char", + "output": "%", + "display": "%" + }, + { + "type": "char", + "output": "&", + "display": "&" + }, + { + "type": "char", + "output": "-", + "display": "-" + }, + { + "type": "char", + "output": "+", + "display": "+" + }, + { + "type": "char", + "output": "=", + "display": "=" + }, + { + "type": "char", + "output": "~", + "display": "~" + }, + { + "type": "char", + "output": "(", + "display": "(" + }, + { + "type": "char", + "output": ")", + "display": ")" + }, + { + "type": "special", + "output": "Return", + "display-icon": "PREDEFINED:ENTER", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "*", + "display": "*" + }, + { + "type": "char", + "output": "\"", + "display": "\"" + }, + { + "type": "char", + "output": "'", + "display": "'" + }, + { + "type": "char", + "output": ":", + "display": ":" + }, + { + "type": "char", + "output": ";", + "display": ";" + }, + { + "type": "char", + "output": "!", + "display": "!" + }, + { + "type": "char", + "output": "?", + "display": "?" + }, + { + "type": "char", + "output": "<", + "display": "<" + }, + { + "type": "char", + "output": ">", + "display": ">" + }, + { + "type": "char", + "output": "{", + "display": "{" + }, + { + "type": "char", + "output": "}", + "display": "}" + }, + { + "type": "char", + "output": "[", + "display": "[" + }, + { + "type": "char", + "output": "]", + "display": "]" + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "PREVIOUS-LAYOUT", + "display": "ABC", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "_", + "display": "_" + }, + { + "type": "char", + "output": "/", + "display": "/" + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 3.5 + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 1.5 + } + ] + } + ] + } + ] +} diff --git a/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_default.json b/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_default.json new file mode 100644 index 0000000..20143a6 --- /dev/null +++ b/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_default.json @@ -0,0 +1,479 @@ +{ + "debug": false, + "layouts": [ + { + "name": "standart-characters", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "Q", + "display": "q", + "display-uppercase": "Q" + }, + { + "type": "char", + "output": "W", + "display": "w", + "display-uppercase": "W" + }, + { + "type": "char", + "output": "E", + "display": "e", + "display-uppercase": "E" + }, + { + "type": "char", + "output": "R", + "display": "r", + "display-uppercase": "R" + }, + { + "type": "char", + "output": "T", + "display": "t", + "display-uppercase": "T" + }, + { + "type": "char", + "output": "Y", + "display": "y", + "display-uppercase": "Y" + }, + { + "type": "char", + "output": "U", + "display": "u", + "display-uppercase": "U" + }, + { + "type": "char", + "output": "I", + "display": "i", + "display-uppercase": "I" + }, + { + "type": "char", + "output": "O", + "display": "o", + "display-uppercase": "O" + }, + { + "type": "char", + "output": "P", + "display": "p", + "display-uppercase": "P" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "A", + "display": "a", + "display-uppercase": "A" + }, + { + "type": "char", + "output": "S", + "display": "s", + "display-uppercase": "S" + }, + { + "type": "char", + "output": "D", + "display": "d", + "display-uppercase": "D" + }, + { + "type": "char", + "output": "F", + "display": "f", + "display-uppercase": "F" + }, + { + "type": "char", + "output": "G", + "display": "g", + "display-uppercase": "G" + }, + { + "type": "char", + "output": "H", + "display": "h", + "display-uppercase": "H" + }, + { + "type": "char", + "output": "J", + "display": "j", + "display-uppercase": "J" + }, + { + "type": "char", + "output": "K", + "display": "k", + "display-uppercase": "K" + }, + { + "type": "char", + "output": "L", + "display": "l", + "display-uppercase": "L" + }, + { + "type": "special", + "output": "Return", + "display": "Enter", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "Z", + "display": "z", + "display-uppercase": "Z" + }, + { + "type": "char", + "output": "X", + "display": "x", + "display-uppercase": "X" + }, + { + "type": "char", + "output": "C", + "display": "c", + "display-uppercase": "C" + }, + { + "type": "char", + "output": "V", + "display": "v", + "display-uppercase": "V" + }, + { + "type": "char", + "output": "B", + "display": "b", + "display-uppercase": "B" + }, + { + "type": "char", + "output": "N", + "display": "n", + "display-uppercase": "N" + }, + { + "type": "char", + "output": "M", + "display": "m", + "display-uppercase": "M" + }, + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "special-characters", + "display": "&123", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": ",", + "display": "," + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 5 + }, + { + "type": "char", + "output": ".", + "display": "." + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 2 + } + ] + } + ] + }, + { + "name": "special-characters", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "1", + "display": "1" + }, + { + "type": "char", + "output": "2", + "display": "2" + }, + { + "type": "char", + "output": "3", + "display": "3" + }, + { + "type": "char", + "output": "4", + "display": "4" + }, + { + "type": "char", + "output": "5", + "display": "5" + }, + { + "type": "char", + "output": "6", + "display": "6" + }, + { + "type": "char", + "output": "7", + "display": "7" + }, + { + "type": "char", + "output": "8", + "display": "8" + }, + { + "type": "char", + "output": "9", + "display": "9" + }, + { + "type": "char", + "output": "0", + "display": "0" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "@", + "display": "@" + }, + { + "type": "char", + "output": "#", + "display": "#" + }, + { + "type": "char", + "output": "$", + "display": "$" + }, + { + "type": "char", + "output": "%", + "display": "%" + }, + { + "type": "char", + "output": "&", + "display": "&" + }, + { + "type": "char", + "output": "-", + "display": "-" + }, + { + "type": "char", + "output": "+", + "display": "+" + }, + { + "type": "char", + "output": "=", + "display": "=" + }, + { + "type": "char", + "output": "~", + "display": "~" + }, + { + "type": "char", + "output": "(", + "display": "(" + }, + { + "type": "char", + "output": ")", + "display": ")" + }, + { + "type": "special", + "output": "Return", + "display": "Enter", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "*", + "display": "*" + }, + { + "type": "char", + "output": "\"", + "display": "\"" + }, + { + "type": "char", + "output": "'", + "display": "'" + }, + { + "type": "char", + "output": ":", + "display": ":" + }, + { + "type": "char", + "output": ";", + "display": ";" + }, + { + "type": "char", + "output": "!", + "display": "!" + }, + { + "type": "char", + "output": "?", + "display": "?" + }, + { + "type": "char", + "output": "<", + "display": "<" + }, + { + "type": "char", + "output": ">", + "display": ">" + }, + { + "type": "char", + "output": "{", + "display": "{" + }, + { + "type": "char", + "output": "}", + "display": "}" + }, + { + "type": "char", + "output": "[", + "display": "[" + }, + { + "type": "char", + "output": "]", + "display": "]" + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "standart-characters", + "display": "ABC", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "_", + "display": "_" + }, + { + "type": "char", + "output": "/", + "display": "/" + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 5 + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 2 + } + ] + } + ] + } + ] +} diff --git a/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_email.json b/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_email.json new file mode 100644 index 0000000..8856f22 --- /dev/null +++ b/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_email.json @@ -0,0 +1,489 @@ +{ + "debug": false, + "layouts": [ + { + "name": "standart-characters", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "Q", + "display": "q", + "display-uppercase": "Q" + }, + { + "type": "char", + "output": "W", + "display": "w", + "display-uppercase": "W" + }, + { + "type": "char", + "output": "E", + "display": "e", + "display-uppercase": "E" + }, + { + "type": "char", + "output": "R", + "display": "r", + "display-uppercase": "R" + }, + { + "type": "char", + "output": "T", + "display": "t", + "display-uppercase": "T" + }, + { + "type": "char", + "output": "Y", + "display": "y", + "display-uppercase": "Y" + }, + { + "type": "char", + "output": "U", + "display": "u", + "display-uppercase": "U" + }, + { + "type": "char", + "output": "I", + "display": "i", + "display-uppercase": "I" + }, + { + "type": "char", + "output": "O", + "display": "o", + "display-uppercase": "O" + }, + { + "type": "char", + "output": "P", + "display": "p", + "display-uppercase": "P" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "A", + "display": "a", + "display-uppercase": "A" + }, + { + "type": "char", + "output": "S", + "display": "s", + "display-uppercase": "S" + }, + { + "type": "char", + "output": "D", + "display": "d", + "display-uppercase": "D" + }, + { + "type": "char", + "output": "F", + "display": "f", + "display-uppercase": "F" + }, + { + "type": "char", + "output": "G", + "display": "g", + "display-uppercase": "G" + }, + { + "type": "char", + "output": "H", + "display": "h", + "display-uppercase": "H" + }, + { + "type": "char", + "output": "J", + "display": "j", + "display-uppercase": "J" + }, + { + "type": "char", + "output": "K", + "display": "k", + "display-uppercase": "K" + }, + { + "type": "char", + "output": "L", + "display": "l", + "display-uppercase": "L" + }, + { + "type": "special", + "output": "Return", + "display": "Enter", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "Z", + "display": "z", + "display-uppercase": "Z" + }, + { + "type": "char", + "output": "X", + "display": "x", + "display-uppercase": "X" + }, + { + "type": "char", + "output": "C", + "display": "c", + "display-uppercase": "C" + }, + { + "type": "char", + "output": "V", + "display": "v", + "display-uppercase": "V" + }, + { + "type": "char", + "output": "B", + "display": "b", + "display-uppercase": "B" + }, + { + "type": "char", + "output": "N", + "display": "n", + "display-uppercase": "N" + }, + { + "type": "char", + "output": "M", + "display": "m", + "display-uppercase": "M" + }, + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "special-characters", + "display": "&123", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "-", + "display": "-" + }, + { + "type": "char", + "output": "_", + "display": "_" + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 4 + }, + { + "type": "char", + "output": "@", + "display": "@" + }, + { + "type": "char", + "output": ".", + "display": "." + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 2 + } + ] + } + ] + }, + { + "name": "special-characters", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "1", + "display": "1" + }, + { + "type": "char", + "output": "2", + "display": "2" + }, + { + "type": "char", + "output": "3", + "display": "3" + }, + { + "type": "char", + "output": "4", + "display": "4" + }, + { + "type": "char", + "output": "5", + "display": "5" + }, + { + "type": "char", + "output": "6", + "display": "6" + }, + { + "type": "char", + "output": "7", + "display": "7" + }, + { + "type": "char", + "output": "8", + "display": "8" + }, + { + "type": "char", + "output": "9", + "display": "9" + }, + { + "type": "char", + "output": "0", + "display": "0" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "@", + "display": "@" + }, + { + "type": "char", + "output": "#", + "display": "#" + }, + { + "type": "char", + "output": "$", + "display": "$" + }, + { + "type": "char", + "output": "%", + "display": "%" + }, + { + "type": "char", + "output": "&", + "display": "&" + }, + { + "type": "char", + "output": "-", + "display": "-" + }, + { + "type": "char", + "output": "+", + "display": "+" + }, + { + "type": "char", + "output": "=", + "display": "=" + }, + { + "type": "char", + "output": "~", + "display": "~" + }, + { + "type": "char", + "output": "(", + "display": "(" + }, + { + "type": "char", + "output": ")", + "display": ")" + }, + { + "type": "special", + "output": "Return", + "display": "Enter", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "*", + "display": "*" + }, + { + "type": "char", + "output": "\"", + "display": "\"" + }, + { + "type": "char", + "output": "'", + "display": "'" + }, + { + "type": "char", + "output": ":", + "display": ":" + }, + { + "type": "char", + "output": ";", + "display": ";" + }, + { + "type": "char", + "output": "!", + "display": "!" + }, + { + "type": "char", + "output": "?", + "display": "?" + }, + { + "type": "char", + "output": "<", + "display": "<" + }, + { + "type": "char", + "output": ">", + "display": ">" + }, + { + "type": "char", + "output": "{", + "display": "{" + }, + { + "type": "char", + "output": "}", + "display": "}" + }, + { + "type": "char", + "output": "[", + "display": "[" + }, + { + "type": "char", + "output": "]", + "display": "]" + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "standart-characters", + "display": "ABC", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "_", + "display": "_" + }, + { + "type": "char", + "output": "/", + "display": "/" + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 5 + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 2 + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_en.json b/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_en.json new file mode 100644 index 0000000..4aa9485 --- /dev/null +++ b/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_en.json @@ -0,0 +1,479 @@ +{ + "debug": false, + "layouts": [ + { + "name": "standart-characters", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "Q", + "display": "q", + "display-uppercase": "Q" + }, + { + "type": "char", + "output": "W", + "display": "w", + "display-uppercase": "W" + }, + { + "type": "char", + "output": "E", + "display": "e", + "display-uppercase": "E" + }, + { + "type": "char", + "output": "R", + "display": "r", + "display-uppercase": "R" + }, + { + "type": "char", + "output": "T", + "display": "t", + "display-uppercase": "T" + }, + { + "type": "char", + "output": "Y", + "display": "y", + "display-uppercase": "Y" + }, + { + "type": "char", + "output": "U", + "display": "u", + "display-uppercase": "U" + }, + { + "type": "char", + "output": "I", + "display": "i", + "display-uppercase": "I" + }, + { + "type": "char", + "output": "O", + "display": "o", + "display-uppercase": "O" + }, + { + "type": "char", + "output": "P", + "display": "p", + "display-uppercase": "P" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "A", + "display": "a", + "display-uppercase": "A" + }, + { + "type": "char", + "output": "S", + "display": "s", + "display-uppercase": "S" + }, + { + "type": "char", + "output": "D", + "display": "d", + "display-uppercase": "D" + }, + { + "type": "char", + "output": "F", + "display": "f", + "display-uppercase": "F" + }, + { + "type": "char", + "output": "G", + "display": "g", + "display-uppercase": "G" + }, + { + "type": "char", + "output": "H", + "display": "h", + "display-uppercase": "H" + }, + { + "type": "char", + "output": "J", + "display": "j", + "display-uppercase": "J" + }, + { + "type": "char", + "output": "K", + "display": "k", + "display-uppercase": "K" + }, + { + "type": "char", + "output": "L", + "display": "l", + "display-uppercase": "L" + }, + { + "type": "special", + "output": "Return", + "display-icon": "PREDEFINED:ENTER", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "Z", + "display": "z", + "display-uppercase": "Z" + }, + { + "type": "char", + "output": "X", + "display": "x", + "display-uppercase": "X" + }, + { + "type": "char", + "output": "C", + "display": "c", + "display-uppercase": "C" + }, + { + "type": "char", + "output": "V", + "display": "v", + "display-uppercase": "V" + }, + { + "type": "char", + "output": "B", + "display": "b", + "display-uppercase": "B" + }, + { + "type": "char", + "output": "N", + "display": "n", + "display-uppercase": "N" + }, + { + "type": "char", + "output": "M", + "display": "m", + "display-uppercase": "M" + }, + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "special-characters", + "display": "&123", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": ",", + "display": "," + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 5 + }, + { + "type": "char", + "output": ".", + "display": "." + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 2 + } + ] + } + ] + }, + { + "name": "special-characters", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "1", + "display": "1" + }, + { + "type": "char", + "output": "2", + "display": "2" + }, + { + "type": "char", + "output": "3", + "display": "3" + }, + { + "type": "char", + "output": "4", + "display": "4" + }, + { + "type": "char", + "output": "5", + "display": "5" + }, + { + "type": "char", + "output": "6", + "display": "6" + }, + { + "type": "char", + "output": "7", + "display": "7" + }, + { + "type": "char", + "output": "8", + "display": "8" + }, + { + "type": "char", + "output": "9", + "display": "9" + }, + { + "type": "char", + "output": "0", + "display": "0" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "@", + "display": "@" + }, + { + "type": "char", + "output": "#", + "display": "#" + }, + { + "type": "char", + "output": "$", + "display": "$" + }, + { + "type": "char", + "output": "%", + "display": "%" + }, + { + "type": "char", + "output": "&", + "display": "&" + }, + { + "type": "char", + "output": "-", + "display": "-" + }, + { + "type": "char", + "output": "+", + "display": "+" + }, + { + "type": "char", + "output": "=", + "display": "=" + }, + { + "type": "char", + "output": "~", + "display": "~" + }, + { + "type": "char", + "output": "(", + "display": "(" + }, + { + "type": "char", + "output": ")", + "display": ")" + }, + { + "type": "special", + "output": "Return", + "display-icon": "PREDEFINED:ENTER", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "*", + "display": "*" + }, + { + "type": "char", + "output": "\"", + "display": "\"" + }, + { + "type": "char", + "output": "'", + "display": "'" + }, + { + "type": "char", + "output": ":", + "display": ":" + }, + { + "type": "char", + "output": ";", + "display": ";" + }, + { + "type": "char", + "output": "!", + "display": "!" + }, + { + "type": "char", + "output": "?", + "display": "?" + }, + { + "type": "char", + "output": "<", + "display": "<" + }, + { + "type": "char", + "output": ">", + "display": ">" + }, + { + "type": "char", + "output": "{", + "display": "{" + }, + { + "type": "char", + "output": "}", + "display": "}" + }, + { + "type": "char", + "output": "[", + "display": "[" + }, + { + "type": "char", + "output": "]", + "display": "]" + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "standart-characters", + "display": "ABC", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "_", + "display": "_" + }, + { + "type": "char", + "output": "/", + "display": "/" + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 5 + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 2 + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_fr.json b/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_fr.json new file mode 100644 index 0000000..fffc0aa --- /dev/null +++ b/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_fr.json @@ -0,0 +1,503 @@ +{ + "debug": false, + "layouts": [ + { + "name": "standart-characters", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "Q", + "display": "q", + "display-uppercase": "Q" + }, + { + "type": "char", + "output": "W", + "display": "w", + "display-uppercase": "W" + }, + { + "type": "char", + "output": "E", + "display": "e", + "display-uppercase": "E" + }, + { + "type": "char", + "output": "R", + "display": "r", + "display-uppercase": "R" + }, + { + "type": "char", + "output": "T", + "display": "t", + "display-uppercase": "T" + }, + { + "type": "char", + "output": "Z", + "display": "z", + "display-uppercase": "Z" + }, + { + "type": "char", + "output": "U", + "display": "u", + "display-uppercase": "U" + }, + { + "type": "char", + "output": "I", + "display": "i", + "display-uppercase": "I" + }, + { + "type": "char", + "output": "O", + "display": "o", + "display-uppercase": "O" + }, + { + "type": "char", + "output": "P", + "display": "p", + "display-uppercase": "P" + }, + { + "type": "char", + "output": "è", + "display": "è", + "display-uppercase": "È" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "A", + "display": "a", + "display-uppercase": "A" + }, + { + "type": "char", + "output": "S", + "display": "s", + "display-uppercase": "S" + }, + { + "type": "char", + "output": "D", + "display": "d", + "display-uppercase": "D" + }, + { + "type": "char", + "output": "F", + "display": "f", + "display-uppercase": "F" + }, + { + "type": "char", + "output": "G", + "display": "g", + "display-uppercase": "G" + }, + { + "type": "char", + "output": "H", + "display": "h", + "display-uppercase": "H" + }, + { + "type": "char", + "output": "J", + "display": "j", + "display-uppercase": "J" + }, + { + "type": "char", + "output": "K", + "display": "k", + "display-uppercase": "K" + }, + { + "type": "char", + "output": "L", + "display": "l", + "display-uppercase": "L" + }, + { + "type": "char", + "output": "é", + "display": "é", + "display-uppercase": "É" + }, + { + "type": "char", + "output": "à", + "display": "à", + "display-uppercase": "À" + }, + { + "type": "special", + "output": "Return", + "display-icon": "PREDEFINED:ENTER", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "Y", + "display": "y", + "display-uppercase": "Y" + }, + { + "type": "char", + "output": "X", + "display": "x", + "display-uppercase": "X" + }, + { + "type": "char", + "output": "C", + "display": "c", + "display-uppercase": "C" + }, + { + "type": "char", + "output": "V", + "display": "v", + "display-uppercase": "V" + }, + { + "type": "char", + "output": "B", + "display": "b", + "display-uppercase": "B" + }, + { + "type": "char", + "output": "N", + "display": "n", + "display-uppercase": "N" + }, + { + "type": "char", + "output": "M", + "display": "m", + "display-uppercase": "M" + }, + { + "type": "char", + "output": "@", + "display": "@", + "display-uppercase": "@" + }, + { + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "special-characters", + "display": "&123", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": ",", + "display": "," + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 5 + }, + { + "type": "char", + "output": ".", + "display": "." + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 2 + } + ] + } + ] + }, + { + "name": "special-characters", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "1", + "display": "1" + }, + { + "type": "char", + "output": "2", + "display": "2" + }, + { + "type": "char", + "output": "3", + "display": "3" + }, + { + "type": "char", + "output": "4", + "display": "4" + }, + { + "type": "char", + "output": "5", + "display": "5" + }, + { + "type": "char", + "output": "6", + "display": "6" + }, + { + "type": "char", + "output": "7", + "display": "7" + }, + { + "type": "char", + "output": "8", + "display": "8" + }, + { + "type": "char", + "output": "9", + "display": "9" + }, + { + "type": "char", + "output": "0", + "display": "0" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "@", + "display": "@" + }, + { + "type": "char", + "output": "#", + "display": "#" + }, + { + "type": "char", + "output": "$", + "display": "$" + }, + { + "type": "char", + "output": "%", + "display": "%" + }, + { + "type": "char", + "output": "&", + "display": "&" + }, + { + "type": "char", + "output": "-", + "display": "-" + }, + { + "type": "char", + "output": "+", + "display": "+" + }, + { + "type": "char", + "output": "=", + "display": "=" + }, + { + "type": "char", + "output": "~", + "display": "~" + }, + { + "type": "char", + "output": "(", + "display": "(" + }, + { + "type": "char", + "output": ")", + "display": ")" + }, + { + "type": "special", + "output": "Return", + "display-icon": "PREDEFINED:ENTER", + "stretch-ratio": 2 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "*", + "display": "*" + }, + { + "type": "char", + "output": "\"", + "display": "\"" + }, + { + "type": "char", + "output": "'", + "display": "'" + }, + { + "type": "char", + "output": ":", + "display": ":" + }, + { + "type": "char", + "output": ";", + "display": ";" + }, + { + "type": "char", + "output": "!", + "display": "!" + }, + { + "type": "char", + "output": "?", + "display": "?" + }, + { + "type": "char", + "output": "<", + "display": "<" + }, + { + "type": "char", + "output": ">", + "display": ">" + }, + { + "type": "char", + "output": "{", + "display": "{" + }, + { + "type": "char", + "output": "}", + "display": "}" + }, + { + "type": "char", + "output": "[", + "display": "[" + }, + { + "type": "char", + "output": "]", + "display": "]" + } + ] + }, + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "standart-characters", + "display": "ABC", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": "_", + "display": "_" + }, + { + "type": "char", + "output": "/", + "display": "/" + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 5 + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 2 + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_num.json b/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_num.json new file mode 100644 index 0000000..dc307bd --- /dev/null +++ b/addons/onscreenkeyboard/customize/keyboardLayouts/keyboard_layout_num.json @@ -0,0 +1,103 @@ +{ + "debug": false, + "layouts": [ + { + "name": "special-characters", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "7", + "display": "7" + }, + { + "type": "char", + "output": "8", + "display": "8" + }, + { + "type": "char", + "output": "9", + "display": "9" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE" + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "4", + "display": "4" + }, + { + "type": "char", + "output": "5", + "display": "5" + }, + { + "type": "char", + "output": "6", + "display": "6" + }, + { + "type": "special", + "output": "Return", + "display-icon": "PREDEFINED:ENTER" + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "1", + "display": "1" + }, + { + "type": "char", + "output": "2", + "display": "2" + }, + { + "type": "char", + "output": "3", + "display": "3" + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT", + "stretch-ratio": 0.5 + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT", + "stretch-ratio": 0.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "0", + "display": "0", + "stretch-ratio": 3 + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE" + } + ] + } + ] + } + ] +} diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/LICENSE.txt b/addons/onscreenkeyboard/customize/styles/Roboto/LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/Roboto/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Black.ttf b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Black.ttf new file mode 100644 index 0000000..689fe5c Binary files /dev/null and b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Black.ttf differ diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Black.ttf.import b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Black.ttf.import new file mode 100644 index 0000000..33e20fa --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Black.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://dkf54c5tfeq3k" +path="res://.godot/imported/Roboto-Black.ttf-3a6d23129386c63e405f432555863239.fontdata" + +[deps] + +source_file="res://addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Black.ttf" +dest_files=["res://.godot/imported/Roboto-Black.ttf-3a6d23129386c63e405f432555863239.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-BlackItalic.ttf b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-BlackItalic.ttf new file mode 100644 index 0000000..0b4e0ee Binary files /dev/null and b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-BlackItalic.ttf differ diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-BlackItalic.ttf.import b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-BlackItalic.ttf.import new file mode 100644 index 0000000..9e28cbd --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-BlackItalic.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://ci2f1xov7agyf" +path="res://.godot/imported/Roboto-BlackItalic.ttf-936da28d87aadc879dfcb940800f101c.fontdata" + +[deps] + +source_file="res://addons/onscreenkeyboard/customize/styles/Roboto/Roboto-BlackItalic.ttf" +dest_files=["res://.godot/imported/Roboto-BlackItalic.ttf-936da28d87aadc879dfcb940800f101c.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Bold.ttf b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Bold.ttf new file mode 100644 index 0000000..d3f01ad Binary files /dev/null and b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Bold.ttf differ diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Bold.ttf.import b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Bold.ttf.import new file mode 100644 index 0000000..f66f850 --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Bold.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://bklcb8n1gxh3g" +path="res://.godot/imported/Roboto-Bold.ttf-954b76472f748217715da476df245179.fontdata" + +[deps] + +source_file="res://addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Bold.ttf" +dest_files=["res://.godot/imported/Roboto-Bold.ttf-954b76472f748217715da476df245179.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-BoldItalic.ttf b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-BoldItalic.ttf new file mode 100644 index 0000000..41cc1e7 Binary files /dev/null and b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-BoldItalic.ttf differ diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-BoldItalic.ttf.import b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-BoldItalic.ttf.import new file mode 100644 index 0000000..af22225 --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-BoldItalic.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://cvn8o52hldb2t" +path="res://.godot/imported/Roboto-BoldItalic.ttf-0a60b877d73eb184f621154654b7c39f.fontdata" + +[deps] + +source_file="res://addons/onscreenkeyboard/customize/styles/Roboto/Roboto-BoldItalic.ttf" +dest_files=["res://.godot/imported/Roboto-BoldItalic.ttf-0a60b877d73eb184f621154654b7c39f.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Italic.ttf b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Italic.ttf new file mode 100644 index 0000000..6a1cee5 Binary files /dev/null and b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Italic.ttf differ diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Italic.ttf.import b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Italic.ttf.import new file mode 100644 index 0000000..efdd0d1 --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Italic.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://pafyrbyfkt2" +path="res://.godot/imported/Roboto-Italic.ttf-2b59c8d82a1cdf52d8bdeb53c078071a.fontdata" + +[deps] + +source_file="res://addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Italic.ttf" +dest_files=["res://.godot/imported/Roboto-Italic.ttf-2b59c8d82a1cdf52d8bdeb53c078071a.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Light.ttf b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Light.ttf new file mode 100644 index 0000000..219063a Binary files /dev/null and b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Light.ttf differ diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Light.ttf.import b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Light.ttf.import new file mode 100644 index 0000000..8b6bd28 --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Light.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://di801warnlprs" +path="res://.godot/imported/Roboto-Light.ttf-edc04cc2498312e3cc4e0b143b523785.fontdata" + +[deps] + +source_file="res://addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Light.ttf" +dest_files=["res://.godot/imported/Roboto-Light.ttf-edc04cc2498312e3cc4e0b143b523785.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-LightItalic.ttf b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-LightItalic.ttf new file mode 100644 index 0000000..0e81e87 Binary files /dev/null and b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-LightItalic.ttf differ diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-LightItalic.ttf.import b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-LightItalic.ttf.import new file mode 100644 index 0000000..aac34ed --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-LightItalic.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://dd1iqnwb2lrbe" +path="res://.godot/imported/Roboto-LightItalic.ttf-a63677b9eb5bd1be06bd746031e05f60.fontdata" + +[deps] + +source_file="res://addons/onscreenkeyboard/customize/styles/Roboto/Roboto-LightItalic.ttf" +dest_files=["res://.godot/imported/Roboto-LightItalic.ttf-a63677b9eb5bd1be06bd746031e05f60.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Medium.ttf b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Medium.ttf new file mode 100644 index 0000000..1a7f3b0 Binary files /dev/null and b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Medium.ttf differ diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Medium.ttf.import b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Medium.ttf.import new file mode 100644 index 0000000..2276127 --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Medium.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://bfb3kn4gv1qmu" +path="res://.godot/imported/Roboto-Medium.ttf-0f924a451ced4814f3a105b116e43327.fontdata" + +[deps] + +source_file="res://addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Medium.ttf" +dest_files=["res://.godot/imported/Roboto-Medium.ttf-0f924a451ced4814f3a105b116e43327.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-MediumItalic.ttf b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-MediumItalic.ttf new file mode 100644 index 0000000..0030295 Binary files /dev/null and b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-MediumItalic.ttf differ diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-MediumItalic.ttf.import b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-MediumItalic.ttf.import new file mode 100644 index 0000000..25b8ff7 --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-MediumItalic.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://bpk2rmnk01euk" +path="res://.godot/imported/Roboto-MediumItalic.ttf-743d1eb483a26229609e0e229f26d44f.fontdata" + +[deps] + +source_file="res://addons/onscreenkeyboard/customize/styles/Roboto/Roboto-MediumItalic.ttf" +dest_files=["res://.godot/imported/Roboto-MediumItalic.ttf-743d1eb483a26229609e0e229f26d44f.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Regular.ttf b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Regular.ttf new file mode 100644 index 0000000..2c97eea Binary files /dev/null and b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Regular.ttf differ diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Regular.ttf.import b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Regular.ttf.import new file mode 100644 index 0000000..5444e62 --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Regular.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://bybpu41sfha6q" +path="res://.godot/imported/Roboto-Regular.ttf-317ae00b13e20e427fb68c7e751997fd.fontdata" + +[deps] + +source_file="res://addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Regular.ttf" +dest_files=["res://.godot/imported/Roboto-Regular.ttf-317ae00b13e20e427fb68c7e751997fd.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Thin.ttf b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Thin.ttf new file mode 100644 index 0000000..b74a4fd Binary files /dev/null and b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Thin.ttf differ diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Thin.ttf.import b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Thin.ttf.import new file mode 100644 index 0000000..e5b5fea --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Thin.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://cfvgrvwahpg6c" +path="res://.godot/imported/Roboto-Thin.ttf-116bf0b55b8b810dc526d18a47965c0e.fontdata" + +[deps] + +source_file="res://addons/onscreenkeyboard/customize/styles/Roboto/Roboto-Thin.ttf" +dest_files=["res://.godot/imported/Roboto-Thin.ttf-116bf0b55b8b810dc526d18a47965c0e.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-ThinItalic.ttf b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-ThinItalic.ttf new file mode 100644 index 0000000..dd0ddb8 Binary files /dev/null and b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-ThinItalic.ttf differ diff --git a/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-ThinItalic.ttf.import b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-ThinItalic.ttf.import new file mode 100644 index 0000000..5f98654 --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/Roboto/Roboto-ThinItalic.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://dr2taaayxl07h" +path="res://.godot/imported/Roboto-ThinItalic.ttf-6096d6e7d19228df21ba963af2d824dd.fontdata" + +[deps] + +source_file="res://addons/onscreenkeyboard/customize/styles/Roboto/Roboto-ThinItalic.ttf" +dest_files=["res://.godot/imported/Roboto-ThinItalic.ttf-6096d6e7d19228df21ba963af2d824dd.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/addons/onscreenkeyboard/customize/styles/defaultBackgroundStyle.tres b/addons/onscreenkeyboard/customize/styles/defaultBackgroundStyle.tres new file mode 100644 index 0000000..75624fa --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/defaultBackgroundStyle.tres @@ -0,0 +1,9 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +bg_color = Color( 0.137255, 0.137255, 0.137255, 1 ) +border_width_left = 5 +border_width_top = 5 +border_width_right = 5 +border_width_bottom = 5 +border_color = Color( 0.137255, 0.137255, 0.137255, 1 ) diff --git a/addons/onscreenkeyboard/customize/styles/defaultHoverStlyle.tres b/addons/onscreenkeyboard/customize/styles/defaultHoverStlyle.tres new file mode 100644 index 0000000..1610efc --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/defaultHoverStlyle.tres @@ -0,0 +1,4 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +bg_color = Color( 0.396078, 0.396078, 0.396078, 1 ) diff --git a/addons/onscreenkeyboard/customize/styles/defaultNormalSpecialKeysStyle.tres b/addons/onscreenkeyboard/customize/styles/defaultNormalSpecialKeysStyle.tres new file mode 100644 index 0000000..da82be1 --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/defaultNormalSpecialKeysStyle.tres @@ -0,0 +1,4 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +bg_color = Color( 0.168627, 0.168627, 0.168627, 1 ) diff --git a/addons/onscreenkeyboard/customize/styles/defaultNormalStyle.tres b/addons/onscreenkeyboard/customize/styles/defaultNormalStyle.tres new file mode 100644 index 0000000..4d15632 --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/defaultNormalStyle.tres @@ -0,0 +1,4 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +bg_color = Color( 0.196078, 0.196078, 0.196078, 1 ) diff --git a/addons/onscreenkeyboard/customize/styles/defaultPressedStyle.tres b/addons/onscreenkeyboard/customize/styles/defaultPressedStyle.tres new file mode 100644 index 0000000..64146b3 --- /dev/null +++ b/addons/onscreenkeyboard/customize/styles/defaultPressedStyle.tres @@ -0,0 +1,4 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +bg_color = Color( 0.352941, 0.352941, 0.352941, 1 ) diff --git a/addons/onscreenkeyboard/default_layout.gd b/addons/onscreenkeyboard/default_layout.gd new file mode 100644 index 0000000..6ab0c26 --- /dev/null +++ b/addons/onscreenkeyboard/default_layout.gd @@ -0,0 +1,159 @@ +extends "keyboard_layout.gd" + +func _init(): + data = { + "debug": false, + "layouts": [ + { + "name": "standart-characters", + "rows": [ + make_row( + [], + "qwertyuiop", + [ + { + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + ), + make_row( + [], + "asdfghjkl", + [{ + "output": "Return", + "display": "Enter", + "stretch-ratio": 1.5 + }] + ), + make_row( + [{ + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 1.5 + }], + "zxcvbnm", + [{ + "type": "special-shift", + "display-icon": "PREDEFINED:SHIFT", + "stretch-ratio": 2 + }] + ), + { + "keys": [ + { + "type": "switch-layout", + "layout-name": "special-characters", + "display": "&123", + "stretch-ratio": 1.5 + }, + { + "type": "char", + "output": ",", + "display": "," + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 5 + }, + { + "type": "char", + "output": ".", + "display": "." + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 2 + } + ] + } + ] + }, + { + "name": "special-characters", + "rows": [ + make_row( + [], + "1234567890", + [ + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE", + "stretch-ratio": 1.5 + } + ] + ), + make_row( + [], + "@#$%&-+=~()", + [{ + "type": "special", + "output": "Return", + "display": "Enter", + "stretch-ratio": 2 + }] + ), + make_row( + [], + "*\"':;!?<>{}[]", + [] + ), + make_row( + [{ + "type": "switch-layout", + "layout-name": "standart-characters", + "display": "ABC", + "stretch-ratio": 1.5 + }], + "", + [ + { + "type": "char", + "output": "_", + "display": "_" + }, + { + "type": "char", + "output": "/", + "display": "/" + }, + { + "type": "char", + "output": "Space", + "stretch-ratio": 5 + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT" + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT" + }, + { + "type": "special-hide-keyboard", + "display-icon": "PREDEFINED:HIDE", + "stretch-ratio": 2 + } + ] + ) + ] + } + ] + } diff --git a/addons/onscreenkeyboard/default_layout.gd.uid b/addons/onscreenkeyboard/default_layout.gd.uid new file mode 100644 index 0000000..5433085 --- /dev/null +++ b/addons/onscreenkeyboard/default_layout.gd.uid @@ -0,0 +1 @@ +uid://c2nxm6n3j1yyc diff --git a/addons/onscreenkeyboard/icon.png b/addons/onscreenkeyboard/icon.png new file mode 100644 index 0000000..a08ff3a Binary files /dev/null and b/addons/onscreenkeyboard/icon.png differ diff --git a/addons/onscreenkeyboard/icon.png.import b/addons/onscreenkeyboard/icon.png.import new file mode 100644 index 0000000..75a4df3 --- /dev/null +++ b/addons/onscreenkeyboard/icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cbw5cxngaegs2" +path="res://.godot/imported/icon.png-1820cabf3154c9de149e7c7384ae75c8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/onscreenkeyboard/icon.png" +dest_files=["res://.godot/imported/icon.png-1820cabf3154c9de149e7c7384ae75c8.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/onscreenkeyboard/icons/delete.png b/addons/onscreenkeyboard/icons/delete.png new file mode 100644 index 0000000..debcda2 Binary files /dev/null and b/addons/onscreenkeyboard/icons/delete.png differ diff --git a/addons/onscreenkeyboard/icons/delete.png.import b/addons/onscreenkeyboard/icons/delete.png.import new file mode 100644 index 0000000..fb2a95e --- /dev/null +++ b/addons/onscreenkeyboard/icons/delete.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bpbbpi6i7awge" +path="res://.godot/imported/delete.png-b01e572d8ec8710e1daa5534c18cc37b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/onscreenkeyboard/icons/delete.png" +dest_files=["res://.godot/imported/delete.png-b01e572d8ec8710e1daa5534c18cc37b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/onscreenkeyboard/icons/enter.png b/addons/onscreenkeyboard/icons/enter.png new file mode 100644 index 0000000..0f9c0d2 Binary files /dev/null and b/addons/onscreenkeyboard/icons/enter.png differ diff --git a/addons/onscreenkeyboard/icons/enter.png.import b/addons/onscreenkeyboard/icons/enter.png.import new file mode 100644 index 0000000..8b0c96c --- /dev/null +++ b/addons/onscreenkeyboard/icons/enter.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ckka5a46w64vo" +path="res://.godot/imported/enter.png-497f062a48973d07409910c473b115bd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/onscreenkeyboard/icons/enter.png" +dest_files=["res://.godot/imported/enter.png-497f062a48973d07409910c473b115bd.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/onscreenkeyboard/icons/hide.png b/addons/onscreenkeyboard/icons/hide.png new file mode 100644 index 0000000..d36104e Binary files /dev/null and b/addons/onscreenkeyboard/icons/hide.png differ diff --git a/addons/onscreenkeyboard/icons/hide.png.import b/addons/onscreenkeyboard/icons/hide.png.import new file mode 100644 index 0000000..b110faf --- /dev/null +++ b/addons/onscreenkeyboard/icons/hide.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dtxe3f0k8nplr" +path="res://.godot/imported/hide.png-f9d90aaab875bd6c25846aaabff43d46.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/onscreenkeyboard/icons/hide.png" +dest_files=["res://.godot/imported/hide.png-f9d90aaab875bd6c25846aaabff43d46.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/onscreenkeyboard/icons/left.png b/addons/onscreenkeyboard/icons/left.png new file mode 100644 index 0000000..6ac6519 Binary files /dev/null and b/addons/onscreenkeyboard/icons/left.png differ diff --git a/addons/onscreenkeyboard/icons/left.png.import b/addons/onscreenkeyboard/icons/left.png.import new file mode 100644 index 0000000..4773c87 --- /dev/null +++ b/addons/onscreenkeyboard/icons/left.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ljqr1fd0oj04" +path="res://.godot/imported/left.png-58fef998906dfee2cc9d22147e12661d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/onscreenkeyboard/icons/left.png" +dest_files=["res://.godot/imported/left.png-58fef998906dfee2cc9d22147e12661d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/onscreenkeyboard/icons/right.png b/addons/onscreenkeyboard/icons/right.png new file mode 100644 index 0000000..3928101 Binary files /dev/null and b/addons/onscreenkeyboard/icons/right.png differ diff --git a/addons/onscreenkeyboard/icons/right.png.import b/addons/onscreenkeyboard/icons/right.png.import new file mode 100644 index 0000000..7acdb6d --- /dev/null +++ b/addons/onscreenkeyboard/icons/right.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c76pllnsybmwp" +path="res://.godot/imported/right.png-6c4325eee1d17697ef0ca71f15443116.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/onscreenkeyboard/icons/right.png" +dest_files=["res://.godot/imported/right.png-6c4325eee1d17697ef0ca71f15443116.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/onscreenkeyboard/icons/shift.png b/addons/onscreenkeyboard/icons/shift.png new file mode 100644 index 0000000..37399b3 Binary files /dev/null and b/addons/onscreenkeyboard/icons/shift.png differ diff --git a/addons/onscreenkeyboard/icons/shift.png.import b/addons/onscreenkeyboard/icons/shift.png.import new file mode 100644 index 0000000..150992b --- /dev/null +++ b/addons/onscreenkeyboard/icons/shift.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dfw3kibnurabp" +path="res://.godot/imported/shift.png-2155a58070add20917502fe6933338ef.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/onscreenkeyboard/icons/shift.png" +dest_files=["res://.godot/imported/shift.png-2155a58070add20917502fe6933338ef.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/onscreenkeyboard/keyboard_button.gd b/addons/onscreenkeyboard/keyboard_button.gd new file mode 100644 index 0000000..e607300 --- /dev/null +++ b/addons/onscreenkeyboard/keyboard_button.gd @@ -0,0 +1,67 @@ +extends Button + +var key_data + +signal released +signal down + +var icon_tex_rect + +func _enter_tree(): + pass + +func _ready(): + pass # Replace with function body. + +func _init(_key_data): + key_data = _key_data + button_down.connect(_on_button_down) + button_up.connect(_on_button_up) + item_rect_changed.connect(_on_item_rect_changed) + + size_flags_horizontal = SIZE_EXPAND_FILL + size_flags_vertical = SIZE_EXPAND_FILL + + focus_mode = FOCUS_NONE + + if key_data.has("display"): + text = key_data.get("display") + + if key_data.has("stretch-ratio"): + size_flags_stretch_ratio = key_data.get("stretch-ratio") + + +func set_icon_color(color): + if icon_tex_rect != null: + icon_tex_rect.modulate = color + + +func set_icon(texture): + icon_tex_rect = TextureRect.new() + icon_tex_rect.ignore_texture_size = true + icon_tex_rect.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED + icon_tex_rect.texture = texture + add_child(icon_tex_rect) + + +func change_uppercase(value): + if value: + if key_data.has("display-uppercase"): + text = key_data.get("display-uppercase") + else: + if key_data.has("display"): + text = key_data.get("display") + + +func _on_item_rect_changed(): + if icon_tex_rect != null: + icon_tex_rect.size = size + + +func _on_button_up(): + released.emit(key_data) + release_focus() + + +func _on_button_down(): + down.emit(key_data) diff --git a/addons/onscreenkeyboard/keyboard_button.gd.uid b/addons/onscreenkeyboard/keyboard_button.gd.uid new file mode 100644 index 0000000..e00587e --- /dev/null +++ b/addons/onscreenkeyboard/keyboard_button.gd.uid @@ -0,0 +1 @@ +uid://dn1uh0qsyvc8d diff --git a/addons/onscreenkeyboard/keyboard_layout.gd b/addons/onscreenkeyboard/keyboard_layout.gd new file mode 100644 index 0000000..f820764 --- /dev/null +++ b/addons/onscreenkeyboard/keyboard_layout.gd @@ -0,0 +1,51 @@ +class_name KeyboardLayout + +extends Node + +var data:Dictionary = {} + + +func generate_character_data(char:String) -> Dictionary: + if char == "": + return {} + char = char.to_upper() + + data = { + "type": "char", + "output": char, + "display": char.to_lower(), + } + # if uppercase != lowercase + if char != char.to_lower(): + data["display-uppercase"] = char + return data + + +func generate_characters_data(chars:String) -> Array: + var keys = [] + for char in chars.split(""): + var data = generate_character_data(char) + if data != {}: + keys.append(data) + return keys + + +func set_special(keys): + for key in keys: + if !("type" in key): + key["type"] = "special" + + +func make_row(left_special_keys: Array, chars: String, right_special_keys: Array): + set_special(left_special_keys) + set_special(right_special_keys) + + var keys = left_special_keys + var data = generate_characters_data(chars) + if data != []: + keys.append_array(data) + if right_special_keys != []: + keys.append_array(right_special_keys) + return { + "keys": keys + } diff --git a/addons/onscreenkeyboard/keyboard_layout.gd.uid b/addons/onscreenkeyboard/keyboard_layout.gd.uid new file mode 100644 index 0000000..a2f05dd --- /dev/null +++ b/addons/onscreenkeyboard/keyboard_layout.gd.uid @@ -0,0 +1 @@ +uid://c7pe43iyhddlw diff --git a/addons/onscreenkeyboard/keylist.gd b/addons/onscreenkeyboard/keylist.gd new file mode 100644 index 0000000..74dfb7c --- /dev/null +++ b/addons/onscreenkeyboard/keylist.gd @@ -0,0 +1,337 @@ +extends Node + + +# ########## +# map strings from keyboard layout to godot global defined keys +# https://docs.godotengine.org/en/stable/classes/class_@globalscope.html +# Keys that are not available in the global scope of godot are represented by their decimal ASCII code +# ADD NEW KEY: +# extract new decimal ASCII codes from here: https://www.ascii-code.com/ISO-8859-1 +# create entry with new name and reuse this name in your keyboard layout .json +# ########## + +var key_list = { + "Escape":KEY_ESCAPE, + "Tab":KEY_TAB, + #"Shift-Tab":16777219, + "Backspace":KEY_BACKSPACE, + "Return":KEY_ENTER, + "Enter":KEY_KP_ENTER, + "Insert":KEY_INSERT, + "Delete":KEY_DELETE, + "Pause":KEY_PAUSE, + "Printscreen":KEY_PRINT, + "SystemRequest":KEY_SYSREQ, + "Clear":KEY_CLEAR, + "Home":KEY_HOME, + "End":KEY_END, + "LeftArrow":KEY_LEFT, + "UpArrow":KEY_UP, + "RightArrow":KEY_RIGHT, + "DownArrow":KEY_DOWN, + "Pageup":KEY_PAGEUP, + "Pagedown":KEY_PAGEDOWN, + "Shift":KEY_SHIFT, + "Control":KEY_CTRL, + "Meta":KEY_META, + "Alt":KEY_ALT, + "Capslock":KEY_CAPSLOCK, + "Numlock":KEY_NUMLOCK, + "Scrolllock":KEY_SCROLLLOCK, + "F1":KEY_F1, + "F2":KEY_F2, + "F3":KEY_F3, + "F4":KEY_F4, + "F5":KEY_F5, + "F6":KEY_F6, + "F7":KEY_F7, + "F8":KEY_F8, + "F9":KEY_F9, + "F10":KEY_F10, + "F11":KEY_F11, + "F12":KEY_F12, + "F13":KEY_F13, + "F14":KEY_F14, + "F15":KEY_F15, + "F16":KEY_F16, + "MultiplyonNumpad":KEY_KP_MULTIPLY, + "DivideonNumpad":KEY_KP_DIVIDE, + "SubtractonNumpad":KEY_KP_SUBTRACT, + "PeriodonNumpad":KEY_KP_PERIOD, + "AddonNumpad":KEY_KP_ADD, + "Number0onNumpad":KEY_KP_0, + "Number1onNumpad":KEY_KP_1, + "Number2onNumpad":KEY_KP_2, + "Number3onNumpad":KEY_KP_3, + "Number4onNumpad":KEY_KP_4, + "Number5onNumpad":KEY_KP_5, + "Number6onNumpad":KEY_KP_6, + "Number7onNumpad":KEY_KP_7, + "Number8onNumpad":KEY_KP_8, + "Number9onNumpad":KEY_KP_9, + #"LeftSuper(Windows)":16777260, + #"RightSuper(Windows)":16777261, + "Contextmenu":KEY_MENU, + "LeftHyper":KEY_HYPER, + "RightHyper":KEY_HYPER, + "Help":KEY_HELP, + #"LeftDirection":16777266, + #"RightDirection":16777267, + "Back":KEY_BACK, + "Forward":KEY_FORWARD, + "Stop":KEY_STOP, + "Refresh":KEY_REFRESH, + "Volumedown":KEY_VOLUMEDOWN, + "Mutevolume":KEY_VOLUMEMUTE, + "Volumeup":KEY_VOLUMEUP, + #"BassBoost":16777287, + #"BassUp":16777288, + #"BassDown":16777289, + #"TrebleUp":16777290, + #"TrebleDown":16777291, + "Mediaplay":KEY_MEDIAPLAY, + "Mediastop":KEY_MEDIASTOP, + "Previoussong":KEY_MEDIAPREVIOUS, + "Nextsong":KEY_MEDIANEXT, + "Mediarecord":KEY_MEDIARECORD, + "Homepage":KEY_HOMEPAGE, + "Favorites":KEY_FAVORITES, + "Search":KEY_SEARCH, + "Standby":KEY_STANDBY, + "OpenURL/LaunchBrowser":KEY_OPENURL, + "LaunchMail":KEY_LAUNCHMAIL, + "LaunchMedia":KEY_LAUNCHMEDIA, + "LaunchShortcut0":KEY_LAUNCH0, + "LaunchShortcut1":KEY_LAUNCH1, + "LaunchShortcut2":KEY_LAUNCH2, + "LaunchShortcut3":KEY_LAUNCH3, + "LaunchShortcut4":KEY_LAUNCH4, + "LaunchShortcut5":KEY_LAUNCH5, + "LaunchShortcut6":KEY_LAUNCH6, + "LaunchShortcut7":KEY_LAUNCH7, + "LaunchShortcut8":KEY_LAUNCH8, + "LaunchShortcut9":KEY_LAUNCH9, + "LaunchShortcutA":KEY_LAUNCHA, + "LaunchShortcutB":KEY_LAUNCHB, + "LaunchShortcutC":KEY_LAUNCHC, + "LaunchShortcutD":KEY_LAUNCHD, + "LaunchShortcutE":KEY_LAUNCHE, + "LaunchShortcutF":KEY_LAUNCHF, + "Unknown":KEY_UNKNOWN, + "Space":KEY_SPACE, + "!":KEY_EXCLAM, + "\"":KEY_QUOTEDBL, + "#":KEY_NUMBERSIGN, + "$":KEY_DOLLAR, + "%":KEY_PERCENT, + "&":KEY_AMPERSAND, + "'":KEY_APOSTROPHE, + "(":KEY_PARENLEFT, + ")":KEY_PARENRIGHT, + "*":KEY_ASTERISK, + "+":KEY_PLUS, + ",":KEY_COMMA, + "-":KEY_MINUS, + ".":KEY_PERIOD, + "/":KEY_SLASH, + "0":KEY_0, + "1":KEY_1, + "2":KEY_2, + "3":KEY_3, + "4":KEY_4, + "5":KEY_5, + "6":KEY_6, + "7":KEY_7, + "8":KEY_8, + "9":KEY_9, + ":":KEY_COLON, + ";":KEY_SEMICOLON, + "<":KEY_LESS, + "=":KEY_EQUAL, + ">":KEY_GREATER, + "?":KEY_QUESTION, + "@":KEY_AT, + "A":KEY_A, + "B":KEY_B, + "C":KEY_C, + "D":KEY_D, + "E":KEY_E, + "F":KEY_F, + "G":KEY_G, + "H":KEY_H, + "I":KEY_I, + "J":KEY_J, + "K":KEY_K, + "L":KEY_L, + "M":KEY_M, + "N":KEY_N, + "O":KEY_O, + "P":KEY_P, + "Q":KEY_Q, + "R":KEY_R, + "S":KEY_S, + "T":KEY_T, + "U":KEY_U, + "V":KEY_V, + "W":KEY_W, + "X":KEY_X, + "Y":KEY_Y, + "Z":KEY_Z, + "[":KEY_BRACKETLEFT, + "\\":KEY_BACKSLASH, + "]":KEY_BRACKETRIGHT, + "^":KEY_ASCIICIRCUM, + "_":KEY_UNDERSCORE, + "LeftQuote":KEY_QUOTELEFT, + "{":KEY_BRACELEFT, + "|":KEY_BAR, + "}":KEY_BRACERIGHT, + "~":KEY_ASCIITILDE, + #"NoBreakSpace":160, + #"ExcalmDown":161, + #"¢":162, + #"Sterling":163, + #"Currency":164, + "Yen":KEY_YEN, + #"¦":166, + "§":KEY_SECTION, + "¨":168, + "©":169, + "Feminine":170, + "«":171, + "»":172, + "‐":173, + "®":174, + "Macron":175, + "°":176, + "±":177, + "²":178, + "³":179, + "´":180, + "µ":181, + "Paragraph":182, + "·":183, + "¬":184, + "¹":185, + "♂":186, + "GuillemotRight":187, + "¼":188, + "½":189, + "¾":190, + "¿":191, + "à":192, + "á":193, + "â":194, + "ã":195, + "ä":196, + "å":197, + "æ":198, + "ç":199, + "è":200, + "é":201, + "ê":202, + "ë":203, + "ì":204, + "í":205, + "î":206, + "Idiaeresis":207, + "ð":208, + "ñ":209, + "ò":210, + "ó":211, + "ô":212, + "õ":213, + "ö":214, + "×":215, + "ø":216, + "ù":217, + "ú":218, + "û":219, + "ü":220, + "ý":221, + "þ":222, + "ß":223, + "÷":247, + "ÿ":255, +} + +# ########## +# lowercase characters are represented by an offset of +=32 from the original "uppercase" code +# this list defines all lowercase-valid characters +# ########## + +var key_array_lowercase = [ + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + "à", + "á", + "â", + "ã", + "ä", + "å", + "æ", + "ç", + "è", + "é", + "ê", + "ë", + "ì", + "í", + "î", + "ð", + "ñ", + "ò", + "ó", + "ô", + "õ", + "ö", + "ø", + "ù", + "ú", + "û", + "ü", + "ý", + "ÿ" +] + + +func has_lowercase(name): + for key in key_array_lowercase: + if key == name: + return true + return false + + +func get_key_from_string(name, debug=false): + if key_list.has(str(name)): + if debug: + print("Scancode OK:"+name) + return key_list.get(str(name)) + else: + if debug: + print("Scancode Key not found:"+ name) + return 0 diff --git a/addons/onscreenkeyboard/keylist.gd.uid b/addons/onscreenkeyboard/keylist.gd.uid new file mode 100644 index 0000000..8c8d262 --- /dev/null +++ b/addons/onscreenkeyboard/keylist.gd.uid @@ -0,0 +1 @@ +uid://dv77n0ej8igqd diff --git a/addons/onscreenkeyboard/onscreen_keyboard.gd b/addons/onscreenkeyboard/onscreen_keyboard.gd new file mode 100644 index 0000000..e8713fc --- /dev/null +++ b/addons/onscreenkeyboard/onscreen_keyboard.gd @@ -0,0 +1,470 @@ +@tool +extends PanelContainer + +########################### +## SETTINGS +########################### + +@export var auto_show:bool = true +@export var animate:bool = true + +@export_file var custom_layout_file +@export var set_tool_tip := true +@export_group("Style") +@export var separation:Vector2i = Vector2i(0,0) +var style_background:StyleBoxFlat = null +@export var background:StyleBoxFlat = null: + set(new_val): + style_background = new_val + background = new_val + get: + return style_background +var style_normal:StyleBoxFlat = null +@export var normal:StyleBoxFlat = null: + set(new_val): + style_normal = new_val + normal = new_val + get: + return style_normal +var style_hover:StyleBoxFlat = null +@export var hover:StyleBoxFlat = null: + set(new_val): + style_hover = new_val + hover = new_val + get: + return style_hover +var style_pressed:StyleBoxFlat = null +@export var pressed:StyleBoxFlat = null: + set(new_val): + style_pressed = new_val + pressed = new_val + get: + return style_pressed +var style_special_keys:StyleBoxFlat = null +@export var special_keys:StyleBoxFlat = null: + set(new_val): + style_special_keys = new_val + special_keys = new_val + get: + return style_special_keys +@export_group("Font") +@export var font:FontFile +@export var font_size:int = 20 +@export var font_color_normal:Color = Color(1,1,1) +@export var font_color_hover:Color = Color(1,1,1) +@export var font_color_pressed:Color = Color(1,1,1) + +########################### +## SIGNALS +########################### + +signal layout_changed + +########################### +## PANEL +########################### + +func _enter_tree(): + if not get_tree().get_root().size_changed.is_connected(size_changed): + get_tree().get_root().size_changed.connect(size_changed) + _init_keyboard() + +#func _exit_tree(): +# pass + +#func _process(delta): +# pass + +func _input(event): + _update_auto_display_on_input(event) + + +func size_changed(): + if auto_show and visible: + _hide_keyboard() + + +########################### +## INIT +########################### +var KeyboardButton +var KeyListHandler + +var layouts = [] +var keys = [] +var capslock_keys = [] +var uppercase = false + +var tween_position +var tween_speed = .2 + +var hide_position = Vector2() + +func _init_keyboard(): + if custom_layout_file == null: + var default_layout = preload("default_layout.gd").new() + _create_keyboard(default_layout.data) + else: + _create_keyboard(_load_json(custom_layout_file)) + + # init positioning without animation + var tmp_anim = animate + animate = false + if visible: + _hide_keyboard() + elif visible: + _show_keyboard() + animate = tmp_anim + + +########################### +## HIDE/SHOW +########################### + +var focus_object = null + +func show(): + _show_keyboard() + +func hide(): + _hide_keyboard() + +var released = true +func _update_auto_display_on_input(event): + if auto_show == false: + return + + if event is InputEventMouseButton: + released = !released + if released == false: + return + + var focus_object = get_viewport().gui_get_focus_owner() + if focus_object != null: + var click_on_input = Rect2(focus_object.global_position, focus_object.size).has_point(get_global_mouse_position()) + var click_on_keyboard = Rect2(global_position, size).has_point(get_global_mouse_position()) + + if click_on_input: + if is_keyboard_focus_object(focus_object): + _show_keyboard() + elif click_on_keyboard: + _show_keyboard() + else: + _hide_keyboard() + + if event is InputEventKey: + var focus_object = get_viewport().gui_get_focus_owner() + if focus_object != null: + if event.keycode == KEY_ENTER: + if is_keyboard_focus_object_complete_on_enter(focus_object): + focus_object.release_focus() + _hide_keyboard() + + +func _hide_keyboard(key_data=null): + if animate: + var new_y_pos = get_viewport().get_visible_rect().size.y + 10 + animate_position(Vector2(position.x, new_y_pos), true) + else: + change_visibility(false) + + +func _show_keyboard(key_data=null): + change_visibility(true) + if animate: + var new_y_pos = get_viewport().get_visible_rect().size.y - size.y + animate_position(Vector2(position.x, new_y_pos)) + + +func animate_position(new_position, trigger_visibility:bool=false): + var tween = get_tree().create_tween() + if trigger_visibility: + tween.finished.connect(change_visibility.bind(!visible)) + tween.tween_property( + self,"position", + Vector2(new_position), + tween_speed + ).set_trans(Tween.TRANS_SINE) + + +func change_visibility(value): + if value: + super.show() + else: + _set_caps_lock(false) + super.hide() + visibility_changed.emit() + + +########################### +## KEY LAYOUT +########################### + +var prev_prev_layout = null +var previous_layout = null +var current_layout = null + +func set_active_layout_by_name(name): + for layout in layouts: + if layout.get_meta("layout_name") == str(name): + _show_layout(layout) + else: + _hide_layout(layout) + + +func _show_layout(layout): + layout.show() + current_layout = layout + + +func _hide_layout(layout): + layout.hide() + + +func _switch_layout(key_data): + prev_prev_layout = previous_layout + previous_layout = current_layout + layout_changed.emit(key_data.get("layout-name")) + + for layout in layouts: + _hide_layout(layout) + + if key_data.get("layout-name") == "PREVIOUS-LAYOUT": + if prev_prev_layout != null: + _show_layout(prev_prev_layout) + return + + for layout in layouts: + if layout.get_meta("layout_name") == key_data.get("layout-name"): + _show_layout(layout) + return + + _set_caps_lock(false) + + +########################### +## KEY EVENTS +########################### + +func _set_caps_lock(value: bool): + uppercase = value + for key in capslock_keys: + if value: + if key.get_draw_mode() != BaseButton.DRAW_PRESSED: + key.button_pressed = !key.button_pressed + else: + if key.get_draw_mode() == BaseButton.DRAW_PRESSED: + key.button_pressed = !key.button_pressed + + for key in keys: + key.change_uppercase(value) + + +func _trigger_uppercase(key_data): + uppercase = !uppercase + _set_caps_lock(uppercase) + + +func _key_released(key_data): + if key_data.has("output"): + var key_value = key_data.get("output") + + ########################### + ## DISPATCH InputEvent + ########################### + + var input_event_key = InputEventKey.new() + input_event_key.shift_pressed = uppercase + input_event_key.alt_pressed = false + input_event_key.meta_pressed = false + input_event_key.ctrl_pressed = false + input_event_key.pressed = true + + var key = KeyListHandler.get_key_from_string(key_value) + if !uppercase && KeyListHandler.has_lowercase(key_value): + key +=32 + + input_event_key.keycode = key + input_event_key.unicode = key + + Input.parse_input_event(input_event_key) + + ########################### + ## DISABLE CAPSLOCK AFTER + ########################### + _set_caps_lock(false) + + +########################### +## CONSTRUCT KEYBOARD +########################### + +func _set_key_style(style_name:String, key: Control, style:StyleBoxFlat): + if style != null: + key.add_theme_stylebox_override(style_name, style) + + +func _create_keyboard(layout_data): + if layout_data == null: + print("ERROR. No layout file found") + return + + KeyListHandler = preload("keylist.gd").new() + KeyboardButton = preload("keyboard_button.gd") + + var ICON_DELETE = preload("icons/delete.png") + var ICON_SHIFT = preload("icons/shift.png") + var ICON_LEFT = preload("icons/left.png") + var ICON_RIGHT = preload("icons/right.png") + var ICON_HIDE = preload("icons/hide.png") + var ICON_ENTER = preload("icons/enter.png") + + var data = layout_data + + if style_background != null: + add_theme_stylebox_override('panel', style_background) + + var index = 0 + for layout in data.get("layouts"): + + var layout_container = PanelContainer.new() + + if style_background != null: + layout_container.add_theme_stylebox_override('panel', style_background) + + # SHOW FIRST LAYOUT ON DEFAULT + if index > 0: + layout_container.hide() + else: + current_layout = layout_container + + var layout_name = layout.get("name") + layout_container.set_meta("layout_name", layout_name) + if set_tool_tip: + layout_container.tooltip_text = layout_name + layouts.push_back(layout_container) + add_child(layout_container) + + var base_vbox = VBoxContainer.new() + base_vbox.size_flags_horizontal = SIZE_EXPAND_FILL + base_vbox.size_flags_vertical = SIZE_EXPAND_FILL + # theme override for spacing + base_vbox.add_theme_constant_override("separation", separation.y) + + for row in layout.get("rows"): + + var key_row = HBoxContainer.new() + key_row.size_flags_horizontal = SIZE_EXPAND_FILL + key_row.size_flags_vertical = SIZE_EXPAND_FILL + key_row.add_theme_constant_override("separation", separation.x) + + for key in row.get("keys"): + var new_key = KeyboardButton.new(key) + + _set_key_style("normal",new_key, style_normal) + _set_key_style("hover",new_key, style_hover) + _set_key_style("pressed",new_key, style_pressed) + + new_key.set('theme_override_font_sizes/font_size', font_size) + if font != null: + new_key.set('theme_override_fonts/font', font) + if font_color_normal != null: + new_key.set('theme_override_colors/font_color', font_color_normal) + new_key.set('theme_override_colors/font_hover_color', font_color_hover) + new_key.set('theme_override_colors/font_pressed_color', font_color_pressed) + new_key.set('theme_override_colors/font_disabled_color', font_color_normal) + + new_key.released.connect(_key_released) + + if key.has("type"): + if key.get("type") == "switch-layout": + new_key.released.connect(_switch_layout) + _set_key_style("normal",new_key, style_special_keys) + elif key.get("type") == "special": + _set_key_style("normal",new_key, style_special_keys) + elif key.get("type") == "special-shift": + new_key.released.connect(_trigger_uppercase) + new_key.toggle_mode = true + capslock_keys.push_back(new_key) + _set_key_style("normal",new_key, style_special_keys) + elif key.get("type") == "special-hide-keyboard": + new_key.released.connect(_hide_keyboard) + _set_key_style("normal",new_key, style_special_keys) + + # SET ICONS + if key.has("display-icon"): + var icon_data = str(key.get("display-icon")).split(":") + # PREDEFINED + if str(icon_data[0])=="PREDEFINED": + if str(icon_data[1])=="DELETE": + new_key.set_icon(ICON_DELETE) + elif str(icon_data[1])=="SHIFT": + new_key.set_icon(ICON_SHIFT) + elif str(icon_data[1])=="LEFT": + new_key.set_icon(ICON_LEFT) + elif str(icon_data[1])=="RIGHT": + new_key.set_icon(ICON_RIGHT) + elif str(icon_data[1])=="HIDE": + new_key.set_icon(ICON_HIDE) + elif str(icon_data[1])=="ENTER": + new_key.set_icon(ICON_ENTER) + # CUSTOM + if str(icon_data[0])=="res": + var texture = load(key.get("display-icon")) + new_key.set_icon(texture) + + if font_color_normal != null: + new_key.set_icon_color(font_color_normal) + + key_row.add_child(new_key) + keys.push_back(new_key) + + base_vbox.add_child(key_row) + + layout_container.add_child(base_vbox) + index+=1 + + +########################### +## LOAD SETTINGS +########################### + +func _load_json(file_path) -> Variant: + var json = JSON.new() + var json_string = _load_file(file_path) + var error = json.parse(json_string) + if error == OK: + var data_received = json.data + # print(data_received) + if typeof(data_received) == TYPE_DICTIONARY: + return data_received + else: + return {"msg": "unexpected data => expected DICTIONARY"} + else: + print("JSON Parse Error: ", json.get_error_message(), " in ", json_string, " at line ", json.get_error_line()) + return {"msg":json.get_error_message()} + + +func _load_file(file_path): + var file = FileAccess.open(file_path, FileAccess.READ) + if not file: + print("Error loading File. Error: ") + + var content = file.get_as_text() + file.close() + return content + + +########################### +## HELPER +########################### + +func is_keyboard_focus_object_complete_on_enter(focus_object): + if focus_object is LineEdit: + return true + return false + +func is_keyboard_focus_object(focus_object): + if focus_object is LineEdit or focus_object is TextEdit: + return true + return false diff --git a/addons/onscreenkeyboard/onscreen_keyboard.gd.uid b/addons/onscreenkeyboard/onscreen_keyboard.gd.uid new file mode 100644 index 0000000..cd32c38 --- /dev/null +++ b/addons/onscreenkeyboard/onscreen_keyboard.gd.uid @@ -0,0 +1 @@ +uid://ddxnad3eeveng diff --git a/addons/onscreenkeyboard/plugin.cfg b/addons/onscreenkeyboard/plugin.cfg new file mode 100644 index 0000000..6fa21fd --- /dev/null +++ b/addons/onscreenkeyboard/plugin.cfg @@ -0,0 +1,7 @@ +[plugin] + +name="Onscreen Keyboard" +description="Display a custom onscreen keyboard (Godot 4)" +author="Tweaklab AG" +version="2.0.0" +script="plugin_node.gd" diff --git a/addons/onscreenkeyboard/plugin_node.gd b/addons/onscreenkeyboard/plugin_node.gd new file mode 100644 index 0000000..1cfb266 --- /dev/null +++ b/addons/onscreenkeyboard/plugin_node.gd @@ -0,0 +1,17 @@ +@tool +extends EditorPlugin + +func _enter_tree(): + # Initialization of the plugin goes here + # Add the new type with a name, a parent type, a script and an icon + add_custom_type( + "OnscreenKeyboard", + "PanelContainer", + preload("onscreen_keyboard.gd"), + preload("icon.png") + ) + +func _exit_tree(): + # Clean-up of the plugin goes here + # Always remember to remove it from the engine when deactivated + remove_custom_type("OnscreenKeyboard") diff --git a/addons/onscreenkeyboard/plugin_node.gd.uid b/addons/onscreenkeyboard/plugin_node.gd.uid new file mode 100644 index 0000000..1ec2778 --- /dev/null +++ b/addons/onscreenkeyboard/plugin_node.gd.uid @@ -0,0 +1 @@ +uid://bafmf1ppjtx58 diff --git a/article_select.gd b/article_select.gd new file mode 100644 index 0000000..67650a9 --- /dev/null +++ b/article_select.gd @@ -0,0 +1,17 @@ +extends Container +class_name ArticleSelection + +const button_scene = preload("res://article_select_button.tscn") + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + var button + var info: ArticleInfo + for id in Global.article_infos: + button = button_scene.instantiate() + button.info = Global.article_infos[id] + add_child(button) + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass diff --git a/article_select.gd.uid b/article_select.gd.uid new file mode 100644 index 0000000..df1bd68 --- /dev/null +++ b/article_select.gd.uid @@ -0,0 +1 @@ +uid://cebhhly88e50v diff --git a/article_select_button.gd b/article_select_button.gd new file mode 100644 index 0000000..adfb62e --- /dev/null +++ b/article_select_button.gd @@ -0,0 +1,21 @@ +extends Node + +@export var info: ArticleInfo + +signal product_selected(id: String) + +func _on_button_pressed() -> void: + product_selected.emit(info.id) + +func update_info(): + $VBoxContainer/Label.text = info.text + $VBoxContainer/TextureRect.texture = info.icon + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + update_info() + product_selected.connect(Global._on_product_selected) + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass diff --git a/article_select_button.gd.uid b/article_select_button.gd.uid new file mode 100644 index 0000000..4f6e23b --- /dev/null +++ b/article_select_button.gd.uid @@ -0,0 +1 @@ +uid://qecur7vo5gdl diff --git a/article_select_button.tscn b/article_select_button.tscn new file mode 100644 index 0000000..c5db095 --- /dev/null +++ b/article_select_button.tscn @@ -0,0 +1,32 @@ +[gd_scene load_steps=4 format=3 uid="uid://cno5j6i0xl53b"] + +[ext_resource type="Texture2D" uid="uid://ckwwdmfbfdeqk" path="res://icon.svg" id="1_8tiw3"] +[ext_resource type="Script" uid="uid://qecur7vo5gdl" path="res://article_select_button.gd" id="1_kkgi8"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_uprnd"] + +[node name="PanelContainer" type="PanelContainer"] +offset_right = 128.0 +offset_bottom = 155.0 +script = ExtResource("1_kkgi8") + +[node name="Button" type="Button" parent="."] +layout_mode = 2 +theme_override_styles/normal = SubResource("StyleBoxEmpty_uprnd") + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 2 +mouse_filter = 2 + +[node name="TextureRect" type="TextureRect" parent="VBoxContainer"] +layout_mode = 2 +mouse_filter = 2 +texture = ExtResource("1_8tiw3") +stretch_mode = 3 + +[node name="Label" type="Label" parent="VBoxContainer"] +layout_mode = 2 +text = "Artikelname" +horizontal_alignment = 1 + +[connection signal="pressed" from="Button" to="." method="_on_button_pressed"] diff --git a/cart_list.gd b/cart_list.gd new file mode 100644 index 0000000..bec4035 --- /dev/null +++ b/cart_list.gd @@ -0,0 +1,18 @@ +extends VBoxContainer + +const list_entry_scene = preload("res://cart_list_entry.tscn") + +func _ready() -> void: + Global.cart_updated.connect(_on_cart_updated) + _on_cart_updated() + +func _on_cart_updated(): + for c in get_children(): + remove_child(c) + c.queue_free() + + var list_entry + for entry in Global.cart: + list_entry = list_entry_scene.instantiate() + list_entry.entry = entry + add_child(list_entry) diff --git a/cart_list.gd.uid b/cart_list.gd.uid new file mode 100644 index 0000000..2fa8c66 --- /dev/null +++ b/cart_list.gd.uid @@ -0,0 +1 @@ +uid://chkrb3v7tqg3b diff --git a/cart_list_entry.gd b/cart_list_entry.gd new file mode 100644 index 0000000..e204b68 --- /dev/null +++ b/cart_list_entry.gd @@ -0,0 +1,17 @@ +extends Container + +@export var entry: CartEntry + +func _ready() -> void: + update_info() + +func update_info(): + %Label.text = "%s (%sg / %.2f€)" % [ + entry.article_info.text, + entry.weight_grams, + entry.price_cents / 100.0 + ] + +func _on_delete_button(): + Global.cart.pop_at(entry.cart_index) + Global.cart_updated.emit() diff --git a/cart_list_entry.gd.uid b/cart_list_entry.gd.uid new file mode 100644 index 0000000..6b03abf --- /dev/null +++ b/cart_list_entry.gd.uid @@ -0,0 +1 @@ +uid://fqmbfgwbwxyr diff --git a/cart_list_entry.tscn b/cart_list_entry.tscn new file mode 100644 index 0000000..6c7821a --- /dev/null +++ b/cart_list_entry.tscn @@ -0,0 +1,28 @@ +[gd_scene load_steps=2 format=3 uid="uid://bhbwvjxkc7wnm"] + +[ext_resource type="Script" uid="uid://fqmbfgwbwxyr" path="res://cart_list_entry.gd" id="1_on5si"] + +[node name="CartListEntry" type="PanelContainer"] +offset_right = 40.0 +offset_bottom = 40.0 +size_flags_horizontal = 3 +script = ExtResource("1_on5si") + +[node name="HBoxContainer" type="HBoxContainer" parent="."] +layout_mode = 2 + +[node name="Label" type="Label" parent="HBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="DeleteButton" type="Button" parent="HBoxContainer"] +layout_mode = 2 +theme_override_colors/font_hover_pressed_color = Color(1, 0, 0, 1) +theme_override_colors/font_hover_color = Color(1, 0, 0, 1) +theme_override_colors/font_color = Color(1, 0, 0, 1) +theme_override_colors/font_focus_color = Color(1, 0, 0, 1) +theme_override_colors/font_pressed_color = Color(1, 0, 0, 1) +text = "X" + +[connection signal="pressed" from="HBoxContainer/DeleteButton" to="." method="_on_delete_button"] diff --git a/data_resources/article_info.gd b/data_resources/article_info.gd new file mode 100644 index 0000000..35197d9 --- /dev/null +++ b/data_resources/article_info.gd @@ -0,0 +1,13 @@ +extends Resource +class_name ArticleInfo + +var id: String +var text: String +var icon: Texture +var price_cents_per_gram: float + +func _init(p_id: String, p_text: String, p_icon: Texture, p_price_cents_per_gram: float) -> void: + id = p_id + text = p_text + icon = p_icon + price_cents_per_gram = p_price_cents_per_gram diff --git a/data_resources/article_info.gd.uid b/data_resources/article_info.gd.uid new file mode 100644 index 0000000..759f2a0 --- /dev/null +++ b/data_resources/article_info.gd.uid @@ -0,0 +1 @@ +uid://2qj0o01450m0 diff --git a/data_resources/cart_entry.gd b/data_resources/cart_entry.gd new file mode 100644 index 0000000..32cf9f6 --- /dev/null +++ b/data_resources/cart_entry.gd @@ -0,0 +1,10 @@ +extends Resource +class_name CartEntry + +var cart_index: int = -1 +var article_info: ArticleInfo +var weight_grams: int +var price_cents: int + +func _init(p_article_info: ArticleInfo) -> void: + article_info = p_article_info diff --git a/data_resources/cart_entry.gd.uid b/data_resources/cart_entry.gd.uid new file mode 100644 index 0000000..f0bf172 --- /dev/null +++ b/data_resources/cart_entry.gd.uid @@ -0,0 +1 @@ +uid://bfu2qt8ra16d1 diff --git a/finish_popup.gd b/finish_popup.gd new file mode 100644 index 0000000..a953e87 --- /dev/null +++ b/finish_popup.gd @@ -0,0 +1,11 @@ +extends PopupPanel + +func _ready(): + # TODO: Kontostand vorher/nachher anzeigen + %Label.text = """\ + Stimmt alles? + + %s Produkte + %.2f€ Gesamtpreis + """ % [Global.cart.size(), Global.cart_total_cents] + diff --git a/finish_popup.gd.uid b/finish_popup.gd.uid new file mode 100644 index 0000000..cf4a6ec --- /dev/null +++ b/finish_popup.gd.uid @@ -0,0 +1 @@ +uid://d4l3hgcl53ls2 diff --git a/finish_popup.tscn b/finish_popup.tscn new file mode 100644 index 0000000..0c9780d --- /dev/null +++ b/finish_popup.tscn @@ -0,0 +1,35 @@ +[gd_scene load_steps=2 format=3 uid="uid://u2fkywsdb6tk"] + +[ext_resource type="Script" uid="uid://d4l3hgcl53ls2" path="res://finish_popup.gd" id="1_00li5"] + +[node name="PopupPanel" type="PopupPanel"] +transparent_bg = false +size = Vector2i(332, 214) +visible = true +transparent = false +script = ExtResource("1_00li5") + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +offset_left = 4.0 +offset_top = 4.0 +offset_right = 328.0 +offset_bottom = 210.0 + +[node name="Label" type="Label" parent="VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "Stimmt alles? +x Produkte +x.yz€ Gesamtpreis +Konto Bla: x.yz€ -> x.yz€" + +[node name="ConfirmButton" type="Button" parent="VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "Ja, Einkauf speichern und beenden" +expand_icon = true + +[node name="CancelButton" type="Button" parent="VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "Weiter bearbeiten" diff --git a/global.gd b/global.gd new file mode 100644 index 0000000..f51051d --- /dev/null +++ b/global.gd @@ -0,0 +1,57 @@ +extends Node + +var data_provider = preload("res://providers/debug_data.gd").new() +var scale_provider = preload("res://providers/debug_scale.gd").new() + +var article_infos: Dictionary[String, ArticleInfo] = {} + +var cart: Array[CartEntry] = [] +var current_entry: CartEntry = null +var cart_total_cents = 0 + +var scale_grams: int = 120 +var tara_grams: int = 20 + +signal weights_updated +signal cart_updated + +func _ready() -> void: + article_infos = data_provider.load_articles() + + cart_updated.connect(_on_cart_updated) + + current_entry = CartEntry.new(article_infos['default_0']) + update_weights() + +func _on_product_selected(id): + current_entry = CartEntry.new(article_infos[id]) + update_weights() + +func _on_cart_updated(): + # Make sure all cart entries have the correct list index + for i in range(len(cart)): + cart[i].cart_index = i + + # Update the total + cart_total_cents = 0 + for entry in Global.cart: + cart_total_cents += entry.price_cents + +func update_weights(): + current_entry.weight_grams = scale_grams - tara_grams + current_entry.price_cents = current_entry.weight_grams * current_entry.article_info.price_cents_per_gram + weights_updated.emit() + +func set_scale(grams): + scale_grams = int(grams) + update_weights() + +func set_tara(grams): + tara_grams = int(grams) + update_weights() + +func confirm_entry(): + cart.append(current_entry) + current_entry = CartEntry.new(current_entry.article_info) + update_weights() + cart_updated.emit() diff --git a/global.gd.uid b/global.gd.uid new file mode 100644 index 0000000..c46b6dc --- /dev/null +++ b/global.gd.uid @@ -0,0 +1 @@ +uid://dy0u6n6a6he11 diff --git a/gui.gd b/gui.gd new file mode 100644 index 0000000..a9a2802 --- /dev/null +++ b/gui.gd @@ -0,0 +1,26 @@ +extends Container + +func _ready() -> void: + %DebugScaleSlider.value_changed.connect(Global.set_scale) + + %TaraButton.pressed.connect(_on_tara_button) + %OkayButton.pressed.connect(Global.confirm_entry) + %FinishButton.pressed.connect(_on_finish_button) + + Global.cart_updated.connect(_on_cart_updated) + + Global.weights_updated.emit() # Replace placeholder texts + +func _on_tara_button(): + var popup = load("res://tara_popup.tscn").instantiate() + add_child(popup) + popup.popup_centered() + +func _on_finish_button(): + var popup = load("res://finish_popup.tscn").instantiate() + add_child(popup) + popup.popup_centered() + + +func _on_cart_updated(): + %CartTotal.text = "Summe: %.2f€" % (Global.cart_total_cents / 100.0) diff --git a/gui.gd.uid b/gui.gd.uid new file mode 100644 index 0000000..56af51f --- /dev/null +++ b/gui.gd.uid @@ -0,0 +1 @@ +uid://boq5jwxrt860j diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..9d8b7fa --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icon.svg.import b/icon.svg.import new file mode 100644 index 0000000..b9a2110 --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ckwwdmfbfdeqk" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/item_list.gd b/item_list.gd new file mode 100644 index 0000000..1d65bfa --- /dev/null +++ b/item_list.gd @@ -0,0 +1,4 @@ +extends ItemList + +func _ready() -> void: + add_item("aa") diff --git a/item_list.gd.uid b/item_list.gd.uid new file mode 100644 index 0000000..63692bb --- /dev/null +++ b/item_list.gd.uid @@ -0,0 +1 @@ +uid://25joog7exb5p diff --git a/keyboard_layout_num_custom.json b/keyboard_layout_num_custom.json new file mode 100644 index 0000000..762b95a --- /dev/null +++ b/keyboard_layout_num_custom.json @@ -0,0 +1,104 @@ +{ + "debug": false, + "layouts": [ + { + "name": "special-characters", + "rows": [ + { + "keys": [ + { + "type": "char", + "output": "7", + "display": "7" + }, + { + "type": "char", + "output": "8", + "display": "8" + }, + { + "type": "char", + "output": "9", + "display": "9" + }, + { + "type": "special", + "output": "Backspace", + "display-icon": "PREDEFINED:DELETE" + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "4", + "display": "4" + }, + { + "type": "char", + "output": "5", + "display": "5" + }, + { + "type": "char", + "output": "6", + "display": "6" + }, + { + "type": "special", + "output": "Return", + "display-icon": "PREDEFINED:ENTER" + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "1", + "display": "1" + }, + { + "type": "char", + "output": "2", + "display": "2" + }, + { + "type": "char", + "output": "3", + "display": "3" + }, + { + "type": "special", + "output": "LeftArrow", + "display-icon": "PREDEFINED:LEFT", + "stretch-ratio": 0.5 + }, + { + "type": "special", + "output": "RightArrow", + "display-icon": "PREDEFINED:RIGHT", + "stretch-ratio": 0.5 + } + ] + }, + { + "keys": [ + { + "type": "char", + "output": "0", + "display": "0", + "stretch-ratio": 3 + }, + { + "type": "char", + "output": "Clear", + "display": "C" + } + ] + } + ] + } + ] +} diff --git a/main.tscn b/main.tscn new file mode 100644 index 0000000..f24b761 --- /dev/null +++ b/main.tscn @@ -0,0 +1,149 @@ +[gd_scene load_steps=7 format=3 uid="uid://dhyi4tg4wm6ag"] + +[ext_resource type="Script" uid="uid://cebhhly88e50v" path="res://article_select.gd" id="1_0b4wh"] +[ext_resource type="Script" uid="uid://boq5jwxrt860j" path="res://gui.gd" id="1_7mycd"] +[ext_resource type="Script" uid="uid://chkrb3v7tqg3b" path="res://cart_list.gd" id="2_1bvp3"] +[ext_resource type="Script" uid="uid://cxrgb02tjyvp2" path="res://weight_info.gd" id="2_h2yge"] +[ext_resource type="Script" uid="uid://nax86b8p2aee" path="res://option_button.gd" id="2_lquwl"] + +[sub_resource type="Theme" id="Theme_gm4o7"] +default_font_size = 24 +Control/font_sizes/font_size_ = 28 + +[node name="Main" type="VBoxContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme = SubResource("Theme_gm4o7") +script = ExtResource("1_7mycd") + +[node name="HSplitContainer" type="HSplitContainer" parent="."] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="HSplitContainer/VBoxContainer"] +layout_mode = 2 +text = "nn" + +[node name="OptionButton" type="OptionButton" parent="HSplitContainer/VBoxContainer"] +layout_mode = 2 +script = ExtResource("2_lquwl") + +[node name="ScrollContainer2" type="ScrollContainer" parent="HSplitContainer/VBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="CartList" type="VBoxContainer" parent="HSplitContainer/VBoxContainer/ScrollContainer2"] +layout_mode = 2 +size_flags_horizontal = 3 +script = ExtResource("2_1bvp3") + +[node name="CartTotal" type="Label" parent="HSplitContainer/VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "Summe: 0.00€" + +[node name="FinishButton" type="Button" parent="HSplitContainer/VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "Einkauf beenden" + +[node name="VSplitContainer" type="VSplitContainer" parent="HSplitContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="ScrollContainer" type="ScrollContainer" parent="HSplitContainer/VSplitContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +size_flags_stretch_ratio = 2.0 + +[node name="ArticleSelect" type="HFlowContainer" parent="HSplitContainer/VSplitContainer/ScrollContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +script = ExtResource("1_0b4wh") + +[node name="HBoxContainer" type="HBoxContainer" parent="HSplitContainer/VSplitContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="TaraButton" type="Button" parent="HSplitContainer/VSplitContainer/HBoxContainer"] +unique_name_in_owner = true +custom_minimum_size = Vector2(100, 100) +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 4 +text = "Tara" + +[node name="WeightInfo" type="GridContainer" parent="HSplitContainer/VSplitContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_stretch_ratio = 4.0 +columns = 2 +script = ExtResource("2_h2yge") + +[node name="Label" type="Label" parent="HSplitContainer/VSplitContainer/HBoxContainer/WeightInfo"] +layout_mode = 2 +size_flags_horizontal = 3 +text = "Waage" + +[node name="Label2" type="Label" parent="HSplitContainer/VSplitContainer/HBoxContainer/WeightInfo"] +layout_mode = 2 +size_flags_horizontal = 3 +text = "100g" +horizontal_alignment = 2 + +[node name="Label3" type="Label" parent="HSplitContainer/VSplitContainer/HBoxContainer/WeightInfo"] +layout_mode = 2 +size_flags_horizontal = 3 +text = "Tara" + +[node name="Label4" type="Label" parent="HSplitContainer/VSplitContainer/HBoxContainer/WeightInfo"] +layout_mode = 2 +size_flags_horizontal = 3 +text = "100g" +horizontal_alignment = 2 + +[node name="Label5" type="Label" parent="HSplitContainer/VSplitContainer/HBoxContainer/WeightInfo"] +layout_mode = 2 +size_flags_horizontal = 3 +text = "Produkt" + +[node name="Label6" type="Label" parent="HSplitContainer/VSplitContainer/HBoxContainer/WeightInfo"] +layout_mode = 2 +size_flags_horizontal = 3 +text = "100g" +horizontal_alignment = 2 + +[node name="Label7" type="Label" parent="HSplitContainer/VSplitContainer/HBoxContainer/WeightInfo"] +layout_mode = 2 +size_flags_horizontal = 3 +text = "Preis" + +[node name="Label8" type="Label" parent="HSplitContainer/VSplitContainer/HBoxContainer/WeightInfo"] +layout_mode = 2 +size_flags_horizontal = 3 +text = "1.00€" +horizontal_alignment = 2 + +[node name="OkayButton" type="Button" parent="HSplitContainer/VSplitContainer/HBoxContainer"] +unique_name_in_owner = true +custom_minimum_size = Vector2(100, 100) +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 4 +text = "Okay" + +[node name="DebugScaleSlider" type="HSlider" parent="."] +unique_name_in_owner = true +layout_mode = 2 +max_value = 1000.0 diff --git a/option_button.gd b/option_button.gd new file mode 100644 index 0000000..db872b1 --- /dev/null +++ b/option_button.gd @@ -0,0 +1,5 @@ +extends OptionButton + +func _ready() -> void: + for i in range(100): + add_item(str(i)) diff --git a/option_button.gd.uid b/option_button.gd.uid new file mode 100644 index 0000000..d7bd180 --- /dev/null +++ b/option_button.gd.uid @@ -0,0 +1 @@ +uid://nax86b8p2aee diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..fafd1e1 --- /dev/null +++ b/project.godot @@ -0,0 +1,38 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="Food-Coop Kasse" +run/main_scene="res://main.tscn" +config/features=PackedStringArray("4.4", "GL Compatibility") +run/low_processor_mode=true +config/icon="res://icon.svg" + +[autoload] + +Global="*res://global.gd" + +[editor_plugins] + +enabled=PackedStringArray("res://addons/onscreenkeyboard/plugin.cfg") + +[input] + +ui_text_backspace_all_to_left={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194316,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} + +[rendering] + +renderer/rendering_method="gl_compatibility" +renderer/rendering_method.mobile="gl_compatibility" diff --git a/providers/debug_data.gd b/providers/debug_data.gd new file mode 100644 index 0000000..7707ef6 --- /dev/null +++ b/providers/debug_data.gd @@ -0,0 +1,16 @@ +extends Node + +func load_articles() -> Dictionary[String, ArticleInfo]: + var article_infos: Dictionary[String, ArticleInfo] = {} + + for i in range(10): + var id = "default_" + var_to_str(i) + var info = ArticleInfo.new( + id, + "Artikel " + var_to_str(i), + load("res://icon.svg"), + 0.1 * i + ) + article_infos[id] = info + + return article_infos diff --git a/providers/debug_data.gd.uid b/providers/debug_data.gd.uid new file mode 100644 index 0000000..55fdb39 --- /dev/null +++ b/providers/debug_data.gd.uid @@ -0,0 +1 @@ +uid://bdhsniaj50y82 diff --git a/providers/debug_scale.gd b/providers/debug_scale.gd new file mode 100644 index 0000000..ac09ac2 --- /dev/null +++ b/providers/debug_scale.gd @@ -0,0 +1,8 @@ +extends Node + +# This function should eventually set up the connection to the scale +# and make the updates flow accordingly +# For now, the DebugScaleSlider does that + +func start(): + pass diff --git a/providers/debug_scale.gd.uid b/providers/debug_scale.gd.uid new file mode 100644 index 0000000..4026785 --- /dev/null +++ b/providers/debug_scale.gd.uid @@ -0,0 +1 @@ +uid://d31aicu0r3gob diff --git a/tara_popup.gd b/tara_popup.gd new file mode 100644 index 0000000..dec610d --- /dev/null +++ b/tara_popup.gd @@ -0,0 +1,19 @@ +extends PopupPanel + +func _ready(): + %OnscreenKeyboard.show() + %LineEdit.grab_focus() + + %LineEdit.text_submitted.connect(Global.set_tara) + %LineEdit.text_submitted.connect(hide.unbind(1)) + + %Button.pressed.connect(_on_button_pressed) + Global.weights_updated.connect(_on_weight_update) + _on_weight_update() + +func _on_button_pressed(): + Global.set_tara(Global.scale_grams) + hide() + +func _on_weight_update(): + %Button.text = "%sg (Waage)" % Global.scale_grams diff --git a/tara_popup.gd.uid b/tara_popup.gd.uid new file mode 100644 index 0000000..0a0d26e --- /dev/null +++ b/tara_popup.gd.uid @@ -0,0 +1 @@ +uid://brc0hdgbpm3dt diff --git a/tara_popup.tscn b/tara_popup.tscn new file mode 100644 index 0000000..38ab2b5 --- /dev/null +++ b/tara_popup.tscn @@ -0,0 +1,52 @@ +[gd_scene load_steps=4 format=3 uid="uid://y8m21s8i3e6s"] + +[ext_resource type="Script" uid="uid://brc0hdgbpm3dt" path="res://tara_popup.gd" id="1_fdrm8"] +[ext_resource type="Script" uid="uid://ddxnad3eeveng" path="res://addons/onscreenkeyboard/onscreen_keyboard.gd" id="1_u4877"] +[ext_resource type="Texture2D" uid="uid://ckwwdmfbfdeqk" path="res://icon.svg" id="3_huwoq"] + +[node name="PopupPanel" type="PopupPanel"] +transparent_bg = false +size = Vector2i(332, 214) +visible = true +transparent = false +script = ExtResource("1_fdrm8") + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +offset_left = 4.0 +offset_top = 4.0 +offset_right = 328.0 +offset_bottom = 210.0 + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] +layout_mode = 2 + +[node name="LineEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +alignment = 2 +virtual_keyboard_type = 2 +select_all_on_focus = true + +[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 8 +text = "g" + +[node name="OnscreenKeyboard" type="PanelContainer" parent="VBoxContainer"] +unique_name_in_owner = true +visible = false +layout_mode = 2 +script = ExtResource("1_u4877") +auto_show = false +animate = false +custom_layout_file = "res://keyboard_layout_num_custom.json" +font_size = 40 +metadata/_custom_type_script = "uid://ddxnad3eeveng" + +[node name="Button" type="Button" parent="VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "Waage" +icon = ExtResource("3_huwoq") +expand_icon = true diff --git a/weight_info.gd b/weight_info.gd new file mode 100644 index 0000000..fad8567 --- /dev/null +++ b/weight_info.gd @@ -0,0 +1,10 @@ +extends GridContainer + +func _on_entry_updated(): + $Label2.text = str(Global.scale_grams) + "g" + $Label4.text = str(Global.tara_grams) + "g" + $Label6.text = str(Global.current_entry.weight_grams) + "g" + $Label8.text = "%.2f€" % (Global.current_entry.price_cents / 100.0) + +func _ready() -> void: + Global.weights_updated.connect(_on_entry_updated) diff --git a/weight_info.gd.uid b/weight_info.gd.uid new file mode 100644 index 0000000..bf341cc --- /dev/null +++ b/weight_info.gd.uid @@ -0,0 +1 @@ +uid://cxrgb02tjyvp2