From 2a086a41d8ace2c94a9c86d536ff466619d82fee Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Sun, 8 Dec 2019 03:32:58 +0200 Subject: [PATCH] Custom canvas images for all tools --- Assets/Graphics/Tools/Brush.png | Bin 803 -> 0 bytes Assets/Graphics/Tools/Brush_l.png | Bin 852 -> 0 bytes Assets/Graphics/Tools/Brush_l_r.png | Bin 867 -> 0 bytes Assets/Graphics/Tools/Brush_r.png | Bin 859 -> 0 bytes Assets/Graphics/Tools/Bucket_Cursor.png | Bin 900 -> 311 bytes Assets/Graphics/Tools/ColorPicker_Cursor.png | Bin 746 -> 253 bytes Assets/Graphics/Tools/Eraser_Cursor.png | Bin 0 -> 268 bytes ..._l_r.png.import => Eraser_Cursor.png.import} | 6 +++--- Assets/Graphics/Tools/LightenDarken_Cursor.png | Bin 0 -> 289 bytes ...g.import => LightenDarken_Cursor.png.import} | 6 +++--- Assets/Graphics/Tools/Pencil_Cursor.png | Bin 0 -> 259 bytes ...rush.png.import => Pencil_Cursor.png.import} | 6 +++--- Assets/Graphics/Tools/RectSelect_Cursor.png | Bin 0 -> 132 bytes ....png.import => RectSelect_Cursor.png.import} | 6 +++--- Scripts/Canvas.gd | 5 +---- 15 files changed, 13 insertions(+), 16 deletions(-) delete mode 100644 Assets/Graphics/Tools/Brush.png delete mode 100644 Assets/Graphics/Tools/Brush_l.png delete mode 100644 Assets/Graphics/Tools/Brush_l_r.png delete mode 100644 Assets/Graphics/Tools/Brush_r.png create mode 100644 Assets/Graphics/Tools/Eraser_Cursor.png rename Assets/Graphics/Tools/{Brush_l_r.png.import => Eraser_Cursor.png.import} (67%) create mode 100644 Assets/Graphics/Tools/LightenDarken_Cursor.png rename Assets/Graphics/Tools/{Brush_l.png.import => LightenDarken_Cursor.png.import} (65%) create mode 100644 Assets/Graphics/Tools/Pencil_Cursor.png rename Assets/Graphics/Tools/{Brush.png.import => Pencil_Cursor.png.import} (67%) create mode 100644 Assets/Graphics/Tools/RectSelect_Cursor.png rename Assets/Graphics/Tools/{Brush_r.png.import => RectSelect_Cursor.png.import} (66%) diff --git a/Assets/Graphics/Tools/Brush.png b/Assets/Graphics/Tools/Brush.png deleted file mode 100644 index bbe69ea1519d4eb2f5835ce75349ca22845925f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 803 zcmV+;1Kj+HP)EX>4Tx04R}tkv&MmKp2MKrbs5OiS}bq^ok?_xa5yYA01s1!^F_(bA4rW+RV2Jy_M zrE}gV4zseP5T6r|8+1Y9N3P2*zi}=(Ebz>*kxkDNhl#~f7t3AD%7#ijO&n2Fjq-(@ z%L?Z$&T6&J+V|uy3>LJN4A*ImB7r3&k%9;rbyQG=g&6G`DJIf%9{2E%IQ|s5WO7x& z$gzMLR7j2={11Nj)+|mDYDGy0}HFmwy_uep6|pX2la$WpJCZ-9eC zV5~&h>mKj!>+ajXHSPZW05l$Qj=J7lV*mgE24YJ`L;x@VFaR)G(ALEO000SaNLh0L z04^f{04^f|c%?sf00007bV*G`2jdG51P~U=sO=X3000?uMObu0Z*6U5Zgc=ca%Ew3 zWn>_CX>@2HM@dakSAh-}0002`Nkl4$i77(z@1)q6=$2u;(3EH?BFN;g&!oO1{Oj57QpVzp@A`(qtKIJIEY0s}yd@l*w? z1<$}o7;X5nEd2#)GVdl(g6G+b3p|C33UJ_J0$jL=KnuKCpcUREAOU9!NWobGlJLg@ z((vl*_|J{ThF4XfC%n1>DbzW4>|5ciLl|R(b4~|5Xfu&(Q!6w!A$ePc8O05ZQO hRxNmb2I!6P`~#<_j~&hQGC=?U002ovPDHLkV1lMuRjvR4 diff --git a/Assets/Graphics/Tools/Brush_l.png b/Assets/Graphics/Tools/Brush_l.png deleted file mode 100644 index 56025b2f9f10c6cc22f99be63b6d5ba1ffa4027c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 852 zcmV-a1FQUrP)EX>4Tx04R}tkv&MmKp2MKrbmEM7-$i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ovPDHLkV1n_Rdwu`_ diff --git a/Assets/Graphics/Tools/Brush_r.png b/Assets/Graphics/Tools/Brush_r.png deleted file mode 100644 index 046d7f7f47a1f08e591cd38aebe5c9c76601c19b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 859 zcmV-h1ElEX>4Tx04R}tkv&MmKp2MKrbmEM7-$i+rcio?(U&)&c@QK88OgAjz4dR(i zOXs{#9A+g+AwDM_H|T=Ik6f2se&bwpSm2pqBa@mZ4ik&T4wgHZl?;`5nmD4U8s!UF zmle)ioYhK=weHDZ7|d%cX|B^6K^#j+APEsNYAB-u3sKrNQcR@iJm%pacKk_l$>b`7 zkz)Z>sE`~#_#gc4ty!3wbd!QHp!>zPKSqJTF3_yo_V=-EH%|cnGjOG~{nZ9A`$>Ae ztwoN2&^B;!-PYti;Bp5TdeS9BawI=3p-=$c&*+&F#_v000SaNLh0L z04^f{04^f|c%?sf00007bV*G`2jdG55CJy1Fy&(a000?uMObu0Z*6U5Zgc=ca%Ew3 zWn>_CX>@2HM@dakSAh-}0003pNklNF&^Vr| z!4@fU!ly*aT)?l-_49bMJ-@VI$OQ%fBErV1LYWIrM3ZZZ-0=P3mR`Um^JD@`@NxF+ z0={rofe<*GKq#C=AO;>SptX*IM+tDig9W(YK?0m`Zvk$&^XJ$GbHbe}kP_}(0UIi% ze4h7x51@(?@ZN+(1S#boJU+^Ir8mZ)ZQI2*uvftDyVm+&wp`hJJq5;?B!5mt$U7jZ zKq^pF3jm<&y2X1^@s6FWx?20002~Nkl&j(9iRc(1K&N%baoj~P^P~4xqzlbpvxxWJ4PS;9WEX>4Tx04R}tkv&MmKpe$i(~2S$2aAX}WT+0sf~bh2RIvyaN?V~-2a`*`ph-iL z;^HW{799LotU9+0Yt2!bCVF0M|BE>hzEl0u6Z503ls?%w0>9UwF+Of>@&fT~$W zDjpNFxmB_I6+r|rhzKGQGxbDzF$2%>bq^n3@1i`*``n+SPsy7M@QK88OgAjz4dR(i zOXs{#9AY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nGjOG~{nZ9A`$>Ae zt%Z+({%zpmx~<83z~v4w^rTCMpV2qvfPq_}cg^jswU5&WAVXa(-v9@P zz*v#8*FE0d)7jgy{D4^000SaNLh0L z04^f{04^f|c%?sf00007bV*G`2jdI`7B46%l=hDR000?uMObu0Z*6U5Zgc=ca%Ew3 zWn>_CX>@2HM@dakSAh-}0002NNkl!41P83`JumVioq`g2X;vg^kivD;G7X zG5&CgPm!YNJ)3Wl<9KRw5gJfyJ>SncXIds8!LoV@S_%Ip5q4)Fcyuc}{@1;`z$h4! zfsw9ZA=F5~){vRcloDxI&sBh#KhR#{4(uWz;Z_Oqgj*y60^Ag<4+%(k zDdp>3Yt5V`)rT?0%g$%uDgh*X>N4_xn+3e!CIL_QRQTW%SOLG>f*y_>`}UvG+w)&_ c3{P#X7hO7S$J!#d5&!@I07*qoM6N<$f~g`r0RR91 diff --git a/Assets/Graphics/Tools/Eraser_Cursor.png b/Assets/Graphics/Tools/Eraser_Cursor.png new file mode 100644 index 0000000000000000000000000000000000000000..a1504949af554009c7f94d546eda00113fac0292 GIT binary patch literal 268 zcmV+n0rUQeP)Yr<8&;M(kXHuImC| z-}l$t%a{a})Zh}G+5GV^o%FMMGmcAGC!ZhG41m81@F%JKHs}R5zW4zDv3?pzA0{8%0O{EC- SXz_Xg00001lZY literal 0 HcmV?d00001 diff --git a/Assets/Graphics/Tools/Brush_l_r.png.import b/Assets/Graphics/Tools/Eraser_Cursor.png.import similarity index 67% rename from Assets/Graphics/Tools/Brush_l_r.png.import rename to Assets/Graphics/Tools/Eraser_Cursor.png.import index daffc1dbd..94ad7eb9d 100644 --- a/Assets/Graphics/Tools/Brush_l_r.png.import +++ b/Assets/Graphics/Tools/Eraser_Cursor.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/Brush_l_r.png-5b0b2b1d5aaa3b4883404b24ddd63152.stex" +path="res://.import/Eraser_Cursor.png-f692572693acb37ec2194276528a81d8.stex" metadata={ "vram_texture": false } [deps] -source_file="res://Assets/Graphics/Tools/Brush_l_r.png" -dest_files=[ "res://.import/Brush_l_r.png-5b0b2b1d5aaa3b4883404b24ddd63152.stex" ] +source_file="res://Assets/Graphics/Tools/Eraser_Cursor.png" +dest_files=[ "res://.import/Eraser_Cursor.png-f692572693acb37ec2194276528a81d8.stex" ] [params] diff --git a/Assets/Graphics/Tools/LightenDarken_Cursor.png b/Assets/Graphics/Tools/LightenDarken_Cursor.png new file mode 100644 index 0000000000000000000000000000000000000000..219b9fbdee5617024c0f34b56749085065188ecb GIT binary patch literal 289 zcmV++0p9+JP)m?HSwP|WhlC}#ha2J!J%VQBj(0oG|L^KzGzPcPvl|MiDBzUT=Vc_?k`>ITZU&T`^w{$q`Y5Fp05oItE;v5K_SHS!2* zLAs$1oDg^dK>$(m_0GQ{w#JNi*g@yrpy#ZTzrFTs0`I`U$002ov JPDHLkV1gErYRLcq literal 0 HcmV?d00001 diff --git a/Assets/Graphics/Tools/Brush.png.import b/Assets/Graphics/Tools/Pencil_Cursor.png.import similarity index 67% rename from Assets/Graphics/Tools/Brush.png.import rename to Assets/Graphics/Tools/Pencil_Cursor.png.import index 1d4fc0f67..5cb830596 100644 --- a/Assets/Graphics/Tools/Brush.png.import +++ b/Assets/Graphics/Tools/Pencil_Cursor.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/Brush.png-be161d4821aadbd04edeb9bfd3d48744.stex" +path="res://.import/Pencil_Cursor.png-835e48cc824d523278a13c95a3b3ec6e.stex" metadata={ "vram_texture": false } [deps] -source_file="res://Assets/Graphics/Tools/Brush.png" -dest_files=[ "res://.import/Brush.png-be161d4821aadbd04edeb9bfd3d48744.stex" ] +source_file="res://Assets/Graphics/Tools/Pencil_Cursor.png" +dest_files=[ "res://.import/Pencil_Cursor.png-835e48cc824d523278a13c95a3b3ec6e.stex" ] [params] diff --git a/Assets/Graphics/Tools/RectSelect_Cursor.png b/Assets/Graphics/Tools/RectSelect_Cursor.png new file mode 100644 index 0000000000000000000000000000000000000000..d7d2a1ee274dfcf3864b686202cb573fca5d10ce GIT binary patch literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^QXtI11|(N{`J4k%-kvUwAs(H{G5hQO*0Zs(wH-L% z;0C1GB<8>ToC#L`a literal 0 HcmV?d00001 diff --git a/Assets/Graphics/Tools/Brush_r.png.import b/Assets/Graphics/Tools/RectSelect_Cursor.png.import similarity index 66% rename from Assets/Graphics/Tools/Brush_r.png.import rename to Assets/Graphics/Tools/RectSelect_Cursor.png.import index c8fe90d31..dba1fb732 100644 --- a/Assets/Graphics/Tools/Brush_r.png.import +++ b/Assets/Graphics/Tools/RectSelect_Cursor.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/Brush_r.png-2dd42e7ea71b8fd6ecbfc2c28079712f.stex" +path="res://.import/RectSelect_Cursor.png-a7675c7d3d9b92992266b4bedca7e03f.stex" metadata={ "vram_texture": false } [deps] -source_file="res://Assets/Graphics/Tools/Brush_r.png" -dest_files=[ "res://.import/Brush_r.png-2dd42e7ea71b8fd6ecbfc2c28079712f.stex" ] +source_file="res://Assets/Graphics/Tools/RectSelect_Cursor.png" +dest_files=[ "res://.import/RectSelect_Cursor.png-a7675c7d3d9b92992266b4bedca7e03f.stex" ] [params] diff --git a/Scripts/Canvas.gd b/Scripts/Canvas.gd index 68cc71510..bd9747780 100644 --- a/Scripts/Canvas.gd +++ b/Scripts/Canvas.gd @@ -108,10 +108,7 @@ func _process(delta : float) -> void: Global.cursor_position_label.text = "[%s×%s] %s, %s" % [size.x, size.y, mouse_pos_floored.x, mouse_pos_floored.y] if !cursor_inside_canvas: cursor_inside_canvas = true - if Global.current_left_tool == "Bucket": - Input.set_custom_mouse_cursor(preload("res://Assets/Graphics/Tools/Bucket_Cursor.png"), 0, Vector2(6, 27)) - elif Global.current_left_tool == "ColorPicker": - Input.set_custom_mouse_cursor(preload("res://Assets/Graphics/Tools/ColorPicker_Cursor.png"), 0, Vector2(5, 28)) + Input.set_custom_mouse_cursor(load("res://Assets/Graphics/Tools/%s_Cursor.png" % Global.current_left_tool), 0, Vector2(3, 24)) else: if !Input.is_mouse_button_pressed(BUTTON_LEFT) && !Input.is_mouse_button_pressed(BUTTON_RIGHT): if mouse_inside_canvas: