Réparation de bug, paufinnage du rayon tracteur et insert de l'outil dans l'histoire
This commit is contained in:
68
gui/pointer/assets/cursors/pointer-grab.svg
Normal file
68
gui/pointer/assets/cursors/pointer-grab.svg
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="31.51301"
|
||||
height="31.618402"
|
||||
viewBox="0 0 31.51301 31.618402"
|
||||
fill="#ffffff"
|
||||
class="icon icon-tabler icons-tabler-filled icon-tabler-pointer"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
sodipodi:docname="pointer-grab.svg"
|
||||
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||
xml:space="preserve"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||
id="defs2" /><sodipodi:namedview
|
||||
id="namedview2"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#ffffff"
|
||||
borderopacity="1"
|
||||
inkscape:showpageshadow="0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="1"
|
||||
inkscape:deskcolor="#505050"
|
||||
inkscape:zoom="11.313709"
|
||||
inkscape:cx="16.83798"
|
||||
inkscape:cy="12.993087"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1009"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2" /><g
|
||||
id="g15"
|
||||
transform="matrix(0.9885228,0,0,0.99150555,6.1801905,2.5439475)"
|
||||
style="stroke-width:1.01009"><path
|
||||
stroke="none"
|
||||
d="M 0,0 H 24 V 24 H 0 Z"
|
||||
fill="none"
|
||||
id="path1"
|
||||
style="stroke-width:1.01009" /><g
|
||||
style="fill:none;stroke:#000000;stroke-width:1.52089;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.286275"
|
||||
id="g14"
|
||||
transform="matrix(1.3282871,0,0,1.3282871,-6.2519453,1.4283269)"><path
|
||||
id="path11"
|
||||
style="color:#000000;fill:#000000;fill-opacity:0.286275;stroke:none;stroke-width:1.52089;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;-inkscape-stroke:none"
|
||||
d="m 12.5,4.0008929 c -0.597221,0 -1.207882,0.1936814 -1.695312,0.6269531 C 10.639844,4.774373 10.495228,4.9497692 10.375,5.1473773 10.090773,5.0480128 9.7940211,5.0008929 9.5000001,5.0008929 8.9027792,5.0008929 8.2921185,5.1945743 7.8046876,5.627846 7.3172567,6.0611178 7.0000001,6.7508945 7.0000001,7.5008929 V 8.6141742 C 6.0755349,7.8752923 4.7685924,7.7740909 3.7363282,8.393471 2.5845019,9.0840318 2.1832949,10.592162 2.841797,11.762612 c 1.8805606,3.342773 2.9291437,5.182658 3.3203125,5.783203 a 1.0001,1.0001 0 0 0 0,0.002 l 0.1972656,0.300781 a 1.0001,1.0001 0 0 0 0.00195,0.002 c 1.2404681,1.883628 3.3285347,2.986304 5.5703129,3.080078 A 1.0001,1.0001 0 0 0 12,21.000893 h 0.207031 0.002 H 14 c 3.854141,0 7,-3.145859 7,-7 V 9.5008929 C 21,8.7508945 20.682744,8.0611178 20.195313,7.627846 19.707882,7.1945743 19.097222,7.0008929 18.5,7.0008929 c -0.179726,0 -0.360627,0.020309 -0.539062,0.056641 C 17.863969,6.4834828 17.585038,5.9742681 17.195313,5.627846 16.707882,5.1945743 16.097222,5.0008929 15.5,5.0008929 c -0.294021,0 -0.590773,0.04712 -0.875,0.1464844 C 14.504772,4.9497692 14.360155,4.774373 14.195313,4.627846 13.707881,4.1945743 13.097222,4.0008929 12.5,4.0008929 Z m 0,2 c 0.152778,0 0.292119,0.05632 0.367188,0.1230469 C 12.942256,6.1906668 13,6.2508937 13,6.5008929 v 1 2.5000001 a 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 V 7.5008929 C 15,7.2508937 15.05774,7.1906668 15.132813,7.1239398 15.207883,7.0572128 15.347222,7.0008929 15.5,7.0008929 c 0.152778,0 0.292119,0.05632 0.367188,0.1230469 C 15.942256,7.1906668 16,7.2508937 16,7.5008929 v 2.5000001 a 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 V 9.5008929 C 18,9.2508937 18.05775,9.1906668 18.132813,9.1239398 18.207883,9.0572128 18.347222,9.0008929 18.5,9.0008929 c 0.152778,0 0.29212,0.05632 0.367188,0.1230469 C 18.942257,9.1906668 19,9.2508937 19,9.5008929 v 4.5000001 c 0,2.773263 -2.226737,5 -5,5 h -1.792969 c -1.683258,2.84e-4 -3.2499888,-0.844203 -4.1757809,-2.25 L 7.8378907,16.455971 v -0.002 C 7.60465,16.095864 6.4628829,14.118491 4.5859376,10.782143 4.4478483,10.536697 4.5221315,10.253127 4.763672,10.108315 5.1090604,9.9010744 5.5392385,9.9545203 5.8242188,10.239174 l 1.46875,1.46875 a 1,1 0 0 0 0.2851563,0.191406 1,1 0 0 0 0.083984,0.0332 1,1 0 0 0 0.3378906,0.06836 1,1 0 0 0 0.3378906,-0.06836 1,1 0 0 0 0.083984,-0.0332 1,1 0 0 0 0.2851562,-0.191406 1,1 0 0 0 0.1464844,-0.191406 1,1 0 0 0 0.015625,-0.02539 1,1 0 0 0 0.085937,-0.205078 1,1 0 0 0 0.015625,-0.05078 1,1 0 0 0 0.027344,-0.21875 1,1 0 0 0 0.00195,-0.01563 V 7.5008929 c 0,-0.2499992 0.057745,-0.3102261 0.1328125,-0.3769531 0.075068,-0.066727 0.21441,-0.1230469 0.3671875,-0.1230469 0.1527775,0 0.2921196,0.05632 0.3671875,0.1230469 C 9.9422555,7.1906668 10,7.2508937 10,7.5008929 v 2 0.5000001 a 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 v -0.5000001 -2 -1 C 12,6.2508937 12.057744,6.1906668 12.132813,6.1239398 12.207881,6.0572127 12.347222,6.0008929 12.5,6.0008929 Z" /></g><g
|
||||
style="fill:none;stroke:#ffffff;stroke-width:1.52089;stroke-linecap:round;stroke-linejoin:round"
|
||||
id="g10"
|
||||
transform="matrix(1.3282871,0,0,1.3282871,-6.2519453,-2.5657421)"><path
|
||||
stroke="none"
|
||||
d="M 0,0 H 24 V 24 H 0 Z"
|
||||
fill="none"
|
||||
id="path1-4"
|
||||
style="stroke-width:1.52089" /><path
|
||||
d="M 8,11 V 7.5 a 1.5,1.5 0 0 1 3,0 V 10"
|
||||
id="path2"
|
||||
style="stroke-width:1.52089" /><path
|
||||
d="m 11,9.5 v -3 a 1.5,1.5 0 0 1 3,0 V 10"
|
||||
id="path3-2"
|
||||
style="stroke-width:1.52089" /><path
|
||||
d="m 14,7.5 a 1.5,1.5 0 0 1 3,0 V 10"
|
||||
id="path4"
|
||||
style="stroke-width:1.52089" /><path
|
||||
d="m 17,9.5 a 1.5,1.5 0 0 1 3,0 V 14 a 6,6 0 0 1 -6,6 h -2 0.208 A 6,6 0 0 1 7.196,17.3 L 7,17 C 6.688,16.521 5.593,14.612 3.714,11.272 A 1.5,1.5 0 0 1 4.25,9.25 1.867,1.867 0 0 1 6.53,9.53 L 8,11"
|
||||
id="path5-5"
|
||||
style="stroke-width:1.52089" /></g></g></svg>
|
||||
|
After Width: | Height: | Size: 5.6 KiB |
43
gui/pointer/assets/cursors/pointer-grab.svg.import
Normal file
43
gui/pointer/assets/cursors/pointer-grab.svg.import
Normal file
@@ -0,0 +1,43 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cxgeop0b0avku"
|
||||
path="res://.godot/imported/pointer-grab.svg-34d4526b795f58b917fc46fb088c5706.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://gui/pointer/assets/cursors/pointer-grab.svg"
|
||||
dest_files=["res://.godot/imported/pointer-grab.svg-34d4526b795f58b917fc46fb088c5706.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
68
gui/pointer/assets/cursors/pointer-hand.svg
Normal file
68
gui/pointer/assets/cursors/pointer-hand.svg
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="31.51301"
|
||||
height="31.618402"
|
||||
viewBox="0 0 31.51301 31.618402"
|
||||
fill="#ffffff"
|
||||
class="icon icon-tabler icons-tabler-filled icon-tabler-pointer"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
sodipodi:docname="pointer-hand.svg"
|
||||
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||
xml:space="preserve"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||
id="defs2" /><sodipodi:namedview
|
||||
id="namedview2"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#ffffff"
|
||||
borderopacity="1"
|
||||
inkscape:showpageshadow="0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="1"
|
||||
inkscape:deskcolor="#505050"
|
||||
inkscape:zoom="16"
|
||||
inkscape:cx="15.09375"
|
||||
inkscape:cy="14.3125"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1009"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2" /><g
|
||||
id="g2"
|
||||
transform="matrix(1.1976441,0,0,1.1976441,2.7695521,1.2281839)"
|
||||
style="stroke-width:0.834973"><path
|
||||
stroke="none"
|
||||
d="M 0,0 H 24 V 24 H 0 Z"
|
||||
fill="none"
|
||||
id="path1"
|
||||
style="stroke-width:0.834973" /><g
|
||||
style="fill:none;stroke:#000000;stroke-width:1.66995;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.286275"
|
||||
id="g9"
|
||||
transform="translate(-2.3125001,2.3749876)"><path
|
||||
id="path6"
|
||||
style="color:#000000;fill:#000000;fill-opacity:0.286275;stroke:none;stroke-width:1.66995;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;-inkscape-stroke:none"
|
||||
d="m 12.5,1.0000124 c -0.597221,0 -1.207882,0.1936814 -1.695312,0.6269531 C 10.415301,1.9730861 10.136266,2.4832127 10.039063,3.056653 9.8606276,3.020321 9.6797259,3.000012 9.5000001,3.000012 8.9027792,3.000012 8.2921185,3.1936934 7.8046876,3.6269651 7.3172567,4.0602373 7.0000001,4.750014 7.0000001,5.5000124 V 10.615247 C 6.0755194,9.8761636 4.7686953,9.7731488 3.7363282,10.392591 c -1.1518263,0.690561 -1.5530333,2.19869 -0.8945312,3.36914 1.8805606,3.342774 2.9291437,5.182659 3.3203125,5.783203 0.066009,0.101604 0.1307351,0.203425 0.1972656,0.304688 a 1.0001,1.0001 0 0 0 0.00195,0 C 7.6017963,21.73325 9.6898629,22.835926 11.931641,22.9297 A 1.0001,1.0001 0 0 0 12,23.000012 h 0.207031 0.002 H 14 c 3.854141,0 7,-3.145858 7,-7 V 7.5000124 C 21,6.750014 20.682744,6.0602373 20.195313,5.6269655 19.707882,5.1936938 19.097222,5.0000124 18.5,5.0000124 c -0.179726,0 -0.360627,0.020309 -0.539062,0.056641 C 17.863734,4.4832127 17.584699,3.9730861 17.195313,3.6269655 16.707882,3.1936938 16.097222,3.0000124 15.5,3.0000124 c -0.179726,0 -0.360627,0.020309 -0.539062,0.056641 C 14.863734,2.4832127 14.584698,1.9730861 14.195313,1.6269655 13.707881,1.1936938 13.097222,1.0000124 12.5,1.0000124 Z m 0,2 c 0.152778,0 0.292119,0.05632 0.367188,0.1230469 C 12.942256,3.1897863 13,3.2500132 13,3.5000124 v 8.4999996 a 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 V 5.5000124 C 15,5.2500132 15.05774,5.1897863 15.132813,5.1230593 15.207883,5.0563323 15.347222,5.0000124 15.5,5.0000124 c 0.152778,0 0.292119,0.05632 0.367188,0.1230469 C 15.942256,5.1897863 16,5.2500132 16,5.5000124 v 2 4.4999996 a 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 V 7.5000124 C 18,7.2500132 18.05775,7.1897863 18.132813,7.1230593 18.207883,7.0563323 18.347222,7.0000124 18.5,7.0000124 c 0.152778,0 0.29212,0.05632 0.367188,0.1230469 C 18.942257,7.1897863 19,7.2500132 19,7.5000124 v 8.4999996 c 0,2.773264 -2.226737,5 -5,5 h -1.792969 c -1.683258,2.84e-4 -3.2499888,-0.844202 -4.1757809,-2.25 C 7.9666006,18.651612 7.9020338,18.553821 7.8378907,18.455091 7.6050608,18.097637 6.4633694,16.118475 4.5859376,12.781262 4.4478483,12.535817 4.5221315,12.252246 4.763672,12.107434 5.1090604,11.900193 5.5392385,11.95364 5.8242188,12.238294 l 1.46875,1.46875 a 1,1 0 0 0 0.2871094,0.191406 1,1 0 0 0 0.078125,0.0332 1,1 0 0 0 0.3417969,0.06836 1,1 0 0 0 0.3417969,-0.06836 1,1 0 0 0 0.078125,-0.0332 1,1 0 0 0 0.2871093,-0.191406 1,1 0 0 0 0.1484375,-0.19336 1,1 0 0 0 0.013672,-0.02148 1,1 0 0 0 0.085937,-0.205078 1,1 0 0 0 0.015625,-0.05078 1,1 0 0 0 0.027344,-0.220704 1,1 0 0 0 0.00195,-0.01563 V 5.5000124 c 0,-0.2499992 0.057745,-0.3102261 0.1328125,-0.3769531 0.075068,-0.066727 0.21441,-0.1230469 0.3671875,-0.1230469 0.1527775,0 0.2921196,0.05632 0.3671875,0.1230469 C 9.9422555,5.1897863 10,5.2500132 10,5.5000124 v 6.4999996 a 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 v -6.4999996 -2 C 12,3.2500132 12.057744,3.1897863 12.132813,3.1230593 12.207881,3.0563322 12.347222,3.0000124 12.5,3.0000124 Z" /></g><g
|
||||
style="fill:none;stroke:#ffffff;stroke-width:1.66995;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="g1"
|
||||
transform="translate(-2.3125001,-0.8750124)"><path
|
||||
stroke="none"
|
||||
d="M 0,0 H 24 V 24 H 0 Z"
|
||||
fill="none"
|
||||
id="path1-6"
|
||||
style="stroke-width:1.66995" /><path
|
||||
d="M 8,13 V 5.5 a 1.5,1.5 0 0 1 3,0 V 12"
|
||||
id="path2-5"
|
||||
style="stroke-width:1.66995" /><path
|
||||
d="m 11,5.5 v -2 a 1.5,1.5 0 1 1 3,0 V 12"
|
||||
id="path3"
|
||||
style="stroke-width:1.66995" /><path
|
||||
d="m 14,5.5 a 1.5,1.5 0 0 1 3,0 V 12"
|
||||
id="path4-0"
|
||||
style="stroke-width:1.66995" /><path
|
||||
d="m 17,7.5 a 1.5,1.5 0 0 1 3,0 V 16 a 6,6 0 0 1 -6,6 h -2 0.208 A 6,6 0 0 1 7.196,19.3 69.74,69.74 0 0 1 7,19 C 6.688,18.521 5.593,16.612 3.714,13.272 A 1.5,1.5 0 0 1 4.25,11.25 1.867,1.867 0 0 1 6.53,11.53 L 8,13"
|
||||
id="path5"
|
||||
style="stroke-width:1.66995" /></g></g></svg>
|
||||
|
After Width: | Height: | Size: 5.6 KiB |
43
gui/pointer/assets/cursors/pointer-hand.svg.import
Normal file
43
gui/pointer/assets/cursors/pointer-hand.svg.import
Normal file
@@ -0,0 +1,43 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dvhdx85dspbnp"
|
||||
path="res://.godot/imported/pointer-hand.svg-e8ceb5416e6a6ffce06ddb266901a3e8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://gui/pointer/assets/cursors/pointer-hand.svg"
|
||||
dest_files=["res://.godot/imported/pointer-hand.svg-e8ceb5416e6a6ffce06ddb266901a3e8.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
@@ -77,13 +77,7 @@ func _process(delta):
|
||||
|
||||
update_inspector(get_current_inspected())
|
||||
|
||||
var cursor := default_cursor
|
||||
if not Pause.pause and player and not action_disabled:
|
||||
if can_interact:
|
||||
cursor = action_cursor
|
||||
elif current_selected_item and current_selected_item.get_pointer():
|
||||
cursor = current_selected_item.get_pointer()
|
||||
Input.set_custom_mouse_cursor(cursor)
|
||||
update_cursor()
|
||||
|
||||
if player:
|
||||
if dragging_inspected:
|
||||
@@ -157,7 +151,7 @@ func process_player_actions(delta: float):
|
||||
if Input.is_action_just_pressed("action"):
|
||||
if inspected is InventoryGuiItemMouseDetector:
|
||||
GameInfo.game_data.player_data.inventory.set_current_item(inspected.index)
|
||||
elif can_use_item and not current_selected_item.is_action_need_press_time() and current_selected_item.get_action_is_hold():
|
||||
elif can_use_item and not current_selected_item.is_action_need_press_time() and current_selected_item.deactivate_interactable():
|
||||
player.try_use_item(current_selected_item, player.get_global_mouse_position())
|
||||
elif can_interact:
|
||||
var interactable = inspected as Interactable
|
||||
@@ -171,7 +165,7 @@ func process_player_actions(delta: float):
|
||||
if (
|
||||
Input.is_action_just_released("action")
|
||||
and can_use_item
|
||||
and current_selected_item.get_action_is_hold()
|
||||
and current_selected_item.deactivate_interactable()
|
||||
):
|
||||
if dragging_inspected:
|
||||
player.try_use_item(current_selected_item, player.get_global_mouse_position())
|
||||
@@ -247,11 +241,7 @@ func update_inspector(current_inspected):
|
||||
%ActionText.text = item.name
|
||||
else:
|
||||
%Action.visible = false
|
||||
elif current_selected_item and current_selected_item.use_text() != "" and current_selected_item.get_action_is_hold():
|
||||
%Action.visible = true
|
||||
%ActionText.text = current_selected_item.use_text()
|
||||
%Action.modulate = DEFAULT_ACTION_COLOR
|
||||
elif can_interact and inspected and inspected is Interactable:
|
||||
elif can_interact and inspected and inspected is Interactable and (not current_selected_item or not current_selected_item.deactivate_interactable()):
|
||||
%Action.visible = true
|
||||
%ActionText.text = inspected.interact_text()
|
||||
%Action.modulate = DEFAULT_ACTION_COLOR if inspected.interaction_cost(player) == 0 else ENERGY_ACTION_COLOR
|
||||
@@ -269,6 +259,22 @@ func update_inspector(current_inspected):
|
||||
else:
|
||||
%Action.visible = false
|
||||
|
||||
func update_cursor():
|
||||
var cursor := default_cursor
|
||||
var hotspot : = Vector2(0.,0.)
|
||||
if not Pause.pause and player and not action_disabled:
|
||||
if current_selected_item and current_selected_item.get_pointer():
|
||||
cursor = current_selected_item.get_pointer()
|
||||
|
||||
if Input.is_action_pressed("action") and current_selected_item.get_clicked_pointer():
|
||||
cursor = current_selected_item.get_clicked_pointer()
|
||||
|
||||
if current_selected_item.is_pointer_center():
|
||||
hotspot = Vector2(cursor.get_width()/2., cursor.get_height()/2.)
|
||||
elif can_interact:
|
||||
cursor = action_cursor
|
||||
Input.set_custom_mouse_cursor(cursor,0,hotspot)
|
||||
|
||||
func stop_inspect(node: Node):
|
||||
if not dragging_inspected:
|
||||
all_inspected.erase(node)
|
||||
|
||||
Reference in New Issue
Block a user