aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-06-03 15:44:46 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2023-06-03 15:44:46 +0200
commit8b37da88aad90475f666ac27de5027843281cd22 (patch)
tree51d203bbddfe998b216eabd1c5a11ec55fe0b7ce /tools
parent9bc06b941a1499543a51c2c2032042d18596badd (diff)
Improve ui icons
Diffstat (limited to 'tools')
-rw-r--r--tools/assets/icons/cburnett.pngbin47660 -> 0 bytes
-rw-r--r--tools/assets/icons/chesscom_8bits.pngbin4828 -> 0 bytes
-rw-r--r--tools/assets/icons/hide.pngbin1572 -> 0 bytes
-rw-r--r--tools/assets/icons/swap.pngbin9593 -> 0 bytes
-rw-r--r--tools/assets/icons/ui/README.md4
-rw-r--r--tools/assets/icons/ui/coins-swap.svg1
-rw-r--r--tools/assets/icons/ui/eye-close.svg1
-rw-r--r--tools/assets/icons/ui/zoom-in.svg1
-rw-r--r--tools/assets/icons/ui/zoom-out.svg1
-rw-r--r--tools/assets/icons/visible.pngbin6126 -> 0 bytes
-rw-r--r--tools/assets/icons/zoomin.pngbin10138 -> 0 bytes
-rw-r--r--tools/assets/icons/zoomout.pngbin9323 -> 0 bytes
-rwxr-xr-xtools/embedded.sh19
13 files changed, 20 insertions, 7 deletions
diff --git a/tools/assets/icons/cburnett.png b/tools/assets/icons/cburnett.png
deleted file mode 100644
index 171e994..0000000
--- a/tools/assets/icons/cburnett.png
+++ /dev/null
Binary files differ
diff --git a/tools/assets/icons/chesscom_8bits.png b/tools/assets/icons/chesscom_8bits.png
deleted file mode 100644
index 7e52a97..0000000
--- a/tools/assets/icons/chesscom_8bits.png
+++ /dev/null
Binary files differ
diff --git a/tools/assets/icons/hide.png b/tools/assets/icons/hide.png
deleted file mode 100644
index 55a91f7..0000000
--- a/tools/assets/icons/hide.png
+++ /dev/null
Binary files differ
diff --git a/tools/assets/icons/swap.png b/tools/assets/icons/swap.png
deleted file mode 100644
index 02cf137..0000000
--- a/tools/assets/icons/swap.png
+++ /dev/null
Binary files differ
diff --git a/tools/assets/icons/ui/README.md b/tools/assets/icons/ui/README.md
new file mode 100644
index 0000000..81ec480
--- /dev/null
+++ b/tools/assets/icons/ui/README.md
@@ -0,0 +1,4 @@
+UI icons sources
+=====
+
+Icons used in UI mainly come from [iconoir](https://iconoir.com/) \ No newline at end of file
diff --git a/tools/assets/icons/ui/coins-swap.svg b/tools/assets/icons/ui/coins-swap.svg
new file mode 100644
index 0000000..64418d8
--- /dev/null
+++ b/tools/assets/icons/ui/coins-swap.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="#000000"><path d="M9.019 9A6.5 6.5 0 1115 14.981M8.5 22a6.5 6.5 0 110-13 6.5 6.5 0 010 13zM22 17a3 3 0 01-3 3h-2m0 0l2-2m-2 2l2 2M2 7a3 3 0 013-3h2m0 0L5 6m2-2L5 2" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg> \ No newline at end of file
diff --git a/tools/assets/icons/ui/eye-close.svg b/tools/assets/icons/ui/eye-close.svg
new file mode 100644
index 0000000..7014d38
--- /dev/null
+++ b/tools/assets/icons/ui/eye-close.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="#000000"><path d="M19.5 16l-2.475-3.396M12 17.5V14M4.5 16l2.469-3.388M3 8c3.6 8 14.4 8 18 0" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg> \ No newline at end of file
diff --git a/tools/assets/icons/ui/zoom-in.svg b/tools/assets/icons/ui/zoom-in.svg
new file mode 100644
index 0000000..48187cf
--- /dev/null
+++ b/tools/assets/icons/ui/zoom-in.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="#000000"><path d="M8 11h3m3 0h-3m0 0V8m0 3v3M17 17l4 4M3 11a8 8 0 1016 0 8 8 0 00-16 0z" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg> \ No newline at end of file
diff --git a/tools/assets/icons/ui/zoom-out.svg b/tools/assets/icons/ui/zoom-out.svg
new file mode 100644
index 0000000..d71bedc
--- /dev/null
+++ b/tools/assets/icons/ui/zoom-out.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="#000000"><path d="M17 17l4 4M3 11a8 8 0 1016 0 8 8 0 00-16 0zM8 11h6" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg> \ No newline at end of file
diff --git a/tools/assets/icons/visible.png b/tools/assets/icons/visible.png
deleted file mode 100644
index af047cf..0000000
--- a/tools/assets/icons/visible.png
+++ /dev/null
Binary files differ
diff --git a/tools/assets/icons/zoomin.png b/tools/assets/icons/zoomin.png
deleted file mode 100644
index 38d7af7..0000000
--- a/tools/assets/icons/zoomin.png
+++ /dev/null
Binary files differ
diff --git a/tools/assets/icons/zoomout.png b/tools/assets/icons/zoomout.png
deleted file mode 100644
index b0bd0f1..0000000
--- a/tools/assets/icons/zoomout.png
+++ /dev/null
Binary files differ
diff --git a/tools/embedded.sh b/tools/embedded.sh
index ca70127..2f2ca8d 100755
--- a/tools/embedded.sh
+++ b/tools/embedded.sh
@@ -5,12 +5,6 @@
ressources=$(cat <<-EndOfResources
assets/boards/chesscom_8bits.png
assets/pieces/cburnett.png
-assets/icons/hide.png
-assets/icons/mat.png
-assets/icons/ochess.png
-assets/icons/swap.png
-assets/icons/zoomin.png
-assets/icons/zoomout.png
EndOfResources
)
###############################
@@ -18,6 +12,7 @@ EndOfResources
set -e
wai=$(dirname $(readlink -f "$0")) # Current script directory
dst="${wai}/../src/binres/binary_data.hpp"
+ui_icons_width=24
# Binary to C headers
# $1 is the resource file and $2 the variable name to use in the C code
@@ -25,9 +20,19 @@ bin2c () {
xxd -n "$2" -i "$1"
}
+# Generate ui icons png from svg
+rm -f "${wai}"/assets/icons/ui/*.png # Clear previous data
+for svg in $(find ${wai}/assets/icons/ui -name "*.svg")
+do
+ ext="${svg##*.}"
+ name="$(basename $svg .${ext})"
+ echo "Generating png for ${name}.${ext}..."
+ inkscape --export-type png --export-filename "${wai}/assets/icons/ui/ui-${name}.png" -w "${ui_icons_width}" "${svg}"
+done
+
# Generate headers
echo -n > "$dst"
-for res in $ressources
+for res in $ressources $(find ${wai}/assets/icons/ -name "*.png")
do
ext="${res##*.}"
name="$(basename $res .${ext})"