From 8b37da88aad90475f666ac27de5027843281cd22 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Sat, 3 Jun 2023 15:44:46 +0200 Subject: Improve ui icons --- tools/assets/icons/cburnett.png | Bin 47660 -> 0 bytes tools/assets/icons/chesscom_8bits.png | Bin 4828 -> 0 bytes tools/assets/icons/hide.png | Bin 1572 -> 0 bytes tools/assets/icons/swap.png | Bin 9593 -> 0 bytes tools/assets/icons/ui/README.md | 4 ++++ tools/assets/icons/ui/coins-swap.svg | 1 + tools/assets/icons/ui/eye-close.svg | 1 + tools/assets/icons/ui/zoom-in.svg | 1 + tools/assets/icons/ui/zoom-out.svg | 1 + tools/assets/icons/visible.png | Bin 6126 -> 0 bytes tools/assets/icons/zoomin.png | Bin 10138 -> 0 bytes tools/assets/icons/zoomout.png | Bin 9323 -> 0 bytes tools/embedded.sh | 19 ++++++++++++------- 13 files changed, 20 insertions(+), 7 deletions(-) delete mode 100644 tools/assets/icons/cburnett.png delete mode 100644 tools/assets/icons/chesscom_8bits.png delete mode 100644 tools/assets/icons/hide.png delete mode 100644 tools/assets/icons/swap.png create mode 100644 tools/assets/icons/ui/README.md create mode 100644 tools/assets/icons/ui/coins-swap.svg create mode 100644 tools/assets/icons/ui/eye-close.svg create mode 100644 tools/assets/icons/ui/zoom-in.svg create mode 100644 tools/assets/icons/ui/zoom-out.svg delete mode 100644 tools/assets/icons/visible.png delete mode 100644 tools/assets/icons/zoomin.png delete mode 100644 tools/assets/icons/zoomout.png (limited to 'tools') diff --git a/tools/assets/icons/cburnett.png b/tools/assets/icons/cburnett.png deleted file mode 100644 index 171e994..0000000 Binary files a/tools/assets/icons/cburnett.png and /dev/null differ diff --git a/tools/assets/icons/chesscom_8bits.png b/tools/assets/icons/chesscom_8bits.png deleted file mode 100644 index 7e52a97..0000000 Binary files a/tools/assets/icons/chesscom_8bits.png and /dev/null differ diff --git a/tools/assets/icons/hide.png b/tools/assets/icons/hide.png deleted file mode 100644 index 55a91f7..0000000 Binary files a/tools/assets/icons/hide.png and /dev/null differ diff --git a/tools/assets/icons/swap.png b/tools/assets/icons/swap.png deleted file mode 100644 index 02cf137..0000000 Binary files a/tools/assets/icons/swap.png and /dev/null 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 Binary files a/tools/assets/icons/visible.png and /dev/null differ diff --git a/tools/assets/icons/zoomin.png b/tools/assets/icons/zoomin.png deleted file mode 100644 index 38d7af7..0000000 Binary files a/tools/assets/icons/zoomin.png and /dev/null differ diff --git a/tools/assets/icons/zoomout.png b/tools/assets/icons/zoomout.png deleted file mode 100644 index b0bd0f1..0000000 Binary files a/tools/assets/icons/zoomout.png and /dev/null 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})" -- cgit v1.2.3