Compare commits
4 Commits
784236fe5c
...
d1c5d159a5
| Author | SHA1 | Date | |
|---|---|---|---|
| d1c5d159a5 | |||
| eddd73036e | |||
| 2e5895a36f | |||
| 2a15b5466d |
@@ -1,13 +1,18 @@
|
||||
# A dialog GUI showing a dialog box and character portraits
|
||||
extends Window
|
||||
|
||||
|
||||
# Signal emitted when text has been said
|
||||
signal say_finished
|
||||
|
||||
# Signal emitted when text has just become fully visible
|
||||
signal say_visible
|
||||
|
||||
const SLOW_TEXT_MODE_MULTIPLIER: float = 2
|
||||
|
||||
# Progress bar feature flag
|
||||
const PROGRESS_BAR_ENABLED: bool = false
|
||||
|
||||
@export var centered_text: bool
|
||||
|
||||
# The text speed per character for normal display
|
||||
var _text_time_per_character: float
|
||||
@@ -37,17 +42,11 @@ var _talking_timer
|
||||
# Timer for clearing the dialog
|
||||
var _clearing_timer
|
||||
|
||||
# Whether the dialog manager is paused
|
||||
@onready var is_paused: bool = true
|
||||
|
||||
var dialog_location_node = null
|
||||
var _x_position_offset: int = -10
|
||||
var _y_position_offset: int = -20
|
||||
|
||||
@export var centered_text: bool
|
||||
|
||||
var X_POSITION_OFFSET: int = -10
|
||||
var Y_POSITION_OFFSET: int = -20
|
||||
|
||||
const SLOW_TEXT_MODE_MULTIPLIER: float = 2
|
||||
var _dialog_location_node = null
|
||||
|
||||
# Click to continue flag from settings.
|
||||
var _click_to_continue: bool = false
|
||||
@@ -58,13 +57,20 @@ var _slow_text_mode: bool = false
|
||||
# Progress var Tween reference
|
||||
var _progress_tween: Tween
|
||||
|
||||
# Progress bar feature flag
|
||||
const PROGRESS_BAR_ENABLED: bool = true
|
||||
|
||||
# Whether the dialog manager is paused
|
||||
@onready var is_paused: bool = true
|
||||
|
||||
# Build up the UI
|
||||
func _ready():
|
||||
_click_to_continue = escoria.settings_manager.get_custom_setting(RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_KEY, RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_DEFAULT_VALUE)
|
||||
_slow_text_mode = escoria.settings_manager.get_custom_setting(RTMISimpleDialogSettings.SLOW_TEXT_MODE_KEY, RTMISimpleDialogSettings.SLOW_TEXT_MODE_DEFAULT_VALUE)
|
||||
_click_to_continue = escoria.settings_manager.get_custom_setting(
|
||||
RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_KEY,
|
||||
RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_DEFAULT_VALUE
|
||||
)
|
||||
_slow_text_mode = escoria.settings_manager.get_custom_setting(
|
||||
RTMISimpleDialogSettings.SLOW_TEXT_MODE_KEY,
|
||||
RTMISimpleDialogSettings.SLOW_TEXT_MODE_DEFAULT_VALUE
|
||||
)
|
||||
|
||||
_text_time_per_character = ProjectSettings.get_setting(
|
||||
RTMISimpleDialogSettings.TEXT_TIME_PER_LETTER_MS
|
||||
@@ -73,11 +79,13 @@ func _ready():
|
||||
if _text_time_per_character < 0:
|
||||
escoria.logger.warn(
|
||||
self,
|
||||
"%s setting must be a non-negative number. Will use default value of %s." %
|
||||
[
|
||||
(
|
||||
"%s setting must be a non-negative number. Will use default value of %s."
|
||||
% [
|
||||
RTMISimpleDialogSettings.TEXT_TIME_PER_LETTER_MS,
|
||||
escoria.TEXT_TIME_PER_LETTER_MS_DEFAULT_VALUE
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
_text_time_per_character = escoria.TEXT_TIME_PER_LETTER_MS_DEFAULT_VALUE
|
||||
@@ -89,11 +97,13 @@ func _ready():
|
||||
if _fast_text_time_per_character < 0:
|
||||
escoria.logger.warn(
|
||||
self,
|
||||
"%s setting must be a non-negative number. Will use default value of %s." %
|
||||
[
|
||||
(
|
||||
"%s setting must be a non-negative number. Will use default value of %s."
|
||||
% [
|
||||
RTMISimpleDialogSettings.TEXT_TIME_PER_LETTER_MS_FAST,
|
||||
escoria.TEXT_TIME_PER_LETTER_MS_FAST_DEFAULT_VALUE
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
_fast_text_time_per_character = escoria.TEXT_TIME_PER_LETTER_MS_FAST_DEFAULT_VALUE
|
||||
@@ -105,11 +115,13 @@ func _ready():
|
||||
if _reading_speed_in_wpm <= 0:
|
||||
escoria.logger.warn(
|
||||
self,
|
||||
"%s setting must be a positive number. Will use default value of %s." %
|
||||
[
|
||||
(
|
||||
"%s setting must be a positive number. Will use default value of %s."
|
||||
% [
|
||||
RTMISimpleDialogSettings.READING_SPEED_IN_WPM,
|
||||
escoria.READING_SPEED_IN_WPM_DEFAULT_VALUE
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
_reading_speed_in_wpm = escoria.READING_SPEED_IN_WPM_DEFAULT_VALUE
|
||||
@@ -141,7 +153,7 @@ func _ready():
|
||||
# #### Parameters
|
||||
# - character: The global id of the character speaking
|
||||
# - line: Line to say
|
||||
func say(character: String, line: String) :
|
||||
func say(character: String, line: String):
|
||||
_current_line = line
|
||||
|
||||
show()
|
||||
@@ -153,32 +165,35 @@ func say(character: String, line: String) :
|
||||
# Position the RichTextLabel on the character's dialog position, if any.
|
||||
_current_character = escoria.object_manager.get_object(character).node
|
||||
|
||||
var dialog_location_count:int = 0
|
||||
var dialog_location_count: int = 0
|
||||
|
||||
for c in escoria.object_manager.get_object(character).node.get_children():
|
||||
if c is Marker2D:
|
||||
# Identify any Postion2D nodes
|
||||
if c is ESCDialogLocation:
|
||||
dialog_location_count += 1
|
||||
dialog_location_node = c
|
||||
_dialog_location_node = c
|
||||
|
||||
if dialog_location_count > 1:
|
||||
escoria.logger.warn(
|
||||
self,
|
||||
"Multiple ESCDialogLocation nodes found " +
|
||||
"object %s. Last one will be used." % _current_character)
|
||||
(
|
||||
"Multiple ESCDialogLocation nodes found "
|
||||
+ "object %s. Last one will be used." % _current_character
|
||||
)
|
||||
)
|
||||
|
||||
# Set text color to color set in the actor
|
||||
var text_color = _current_character.dialog_color
|
||||
var text_color_html = text_color.to_html(false)
|
||||
|
||||
%text_node.text = "[color=#" + text_color_html + "]" \
|
||||
.format([text_color_html]) + tr(line) + "[/color]"
|
||||
%text_node.text = (
|
||||
"[color=#" + text_color_html + "]".format([text_color_html]) + tr(line) + "[/color]"
|
||||
)
|
||||
if centered_text:
|
||||
%text_node.text = "[center]" + %text_node.text + "[/center]"
|
||||
if _current_character.is_inside_tree() and \
|
||||
is_instance_valid(dialog_location_node):
|
||||
position = dialog_location_node.get_global_transform_with_canvas().origin
|
||||
if _current_character.is_inside_tree() and is_instance_valid(_dialog_location_node):
|
||||
position = _dialog_location_node.get_global_transform_with_canvas().origin
|
||||
|
||||
position.x -= size.x / 2
|
||||
else:
|
||||
@@ -191,17 +206,15 @@ func say(character: String, line: String) :
|
||||
|
||||
_current_character.start_talking()
|
||||
|
||||
var _slow_text_mode = ProjectSettings.get_setting(
|
||||
RTMISimpleDialogSettings.SLOW_TEXT_MODE
|
||||
)
|
||||
var slow_text_mode = ProjectSettings.get_setting(RTMISimpleDialogSettings.SLOW_TEXT_MODE)
|
||||
|
||||
var time_show_full_text = _calculate_talking_time()
|
||||
|
||||
# We keep the timer as a way to simulate reading time.
|
||||
_talking_timer.start(time_show_full_text)
|
||||
|
||||
|
||||
if PROGRESS_BAR_ENABLED:
|
||||
var _total_time: float = _calculate_total_time()
|
||||
var total_time: float = _calculate_total_time()
|
||||
%ProgressBar.visible = true
|
||||
%ProgressBar.value = 0
|
||||
_progress_tween.tween_property(%ProgressBar, "value", 100, _total_time)
|
||||
@@ -214,6 +227,7 @@ func speedup():
|
||||
say_visible.emit()
|
||||
say_finished.emit()
|
||||
|
||||
|
||||
# Called by the dialog player when user wants to finish dialogue immediately.
|
||||
func finish():
|
||||
say_visible.emit()
|
||||
@@ -224,15 +238,17 @@ func finish():
|
||||
func voice_audio_finished():
|
||||
_stop_character_talking()
|
||||
|
||||
# Handler to deal with this node being removed
|
||||
|
||||
# Handler to deal with this node being removed
|
||||
func _on_tree_exiting() -> void:
|
||||
_stop_character_talking()
|
||||
|
||||
|
||||
# The dialog line was printed, start the waiting time and then finish
|
||||
# the dialog
|
||||
func _on_dialog_line_typed():
|
||||
_stop_character_talking()
|
||||
|
||||
|
||||
# This signal is for the core.
|
||||
say_visible.emit()
|
||||
|
||||
@@ -240,16 +256,17 @@ func _on_dialog_line_typed():
|
||||
var time_to_disappear: float = _calculate_time_to_disappear()
|
||||
_clearing_timer.start(time_to_disappear)
|
||||
|
||||
|
||||
func _calculate_talking_time() -> float:
|
||||
if _slow_text_mode:
|
||||
escoria.logger.info(self, "Text in Slow mode")
|
||||
_text_time_per_character = _text_time_per_character * SLOW_TEXT_MODE_MULTIPLIER
|
||||
|
||||
return _text_time_per_character / 1000 * len(_current_line)
|
||||
return _text_time_per_character / 1000 * len(_current_line)
|
||||
|
||||
|
||||
func _calculate_time_to_disappear() -> float:
|
||||
return (_get_number_of_words() as float / _reading_speed_in_wpm as float)
|
||||
return _get_number_of_words() as float / _reading_speed_in_wpm as float
|
||||
|
||||
|
||||
func _calculate_total_time() -> float:
|
||||
@@ -275,12 +292,14 @@ func _on_paused():
|
||||
# Handler managing resume notification from Escoria
|
||||
func _on_resumed():
|
||||
_talking_timer.set_paused(false)
|
||||
|
||||
|
||||
|
||||
func _stop_character_talking():
|
||||
# Make the speaking item animation stop talking, if it is still alive
|
||||
if is_instance_valid(_current_character) and _current_character != null:
|
||||
_current_character.stop_talking()
|
||||
|
||||
|
||||
func _on_tree_exited():
|
||||
_stop_character_talking()
|
||||
|
||||
@@ -289,19 +308,21 @@ func _account_for_margin_x() -> void:
|
||||
if position.x < 0:
|
||||
position.x = 0
|
||||
|
||||
var screen_margin_x = position.x + size.x - \
|
||||
ProjectSettings.get("display/window/size/viewport_width")
|
||||
var screen_margin_x = (
|
||||
position.x + size.x - ProjectSettings.get("display/window/size/viewport_width")
|
||||
)
|
||||
|
||||
if screen_margin_x > 0:
|
||||
position.x -= screen_margin_x + X_POSITION_OFFSET
|
||||
position.x -= screen_margin_x + _x_position_offset
|
||||
|
||||
|
||||
func _account_for_margin_y() -> void:
|
||||
if position.y < 0:
|
||||
position.y = 0
|
||||
|
||||
var screen_margin_y = position.y + size.y - \
|
||||
ProjectSettings.get("display/window/size/viewport_height")
|
||||
var screen_margin_y = (
|
||||
position.y + size.y - ProjectSettings.get("display/window/size/viewport_height")
|
||||
)
|
||||
|
||||
if screen_margin_y > 0:
|
||||
position.y -= screen_margin_y + Y_POSITION_OFFSET
|
||||
position.y -= screen_margin_y + _y_position_offset
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
sodipodi:docname="left_ptr.svg"
|
||||
sodipodi:docname="arrow.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
@@ -21,13 +21,13 @@
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="22.589975"
|
||||
inkscape:cx="-0.68614506"
|
||||
inkscape:cy="8.0788047"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="971"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:zoom="11.294988"
|
||||
inkscape:cx="17.397098"
|
||||
inkscape:cy="20.053143"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" />
|
||||
<g
|
||||
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
79
addons/escoria-ui-return-monkey-island/cursors/blank.svg
Normal file
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
sodipodi:docname="blank.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
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">
|
||||
<sodipodi:namedview
|
||||
id="namedview5"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="11.294988"
|
||||
inkscape:cx="17.485632"
|
||||
inkscape:cy="20.141677"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" />
|
||||
<g
|
||||
id="g5"
|
||||
transform="matrix(0.28239848,0,0,0.28239848,1.1963533e-7,0.36640485)" />
|
||||
<defs
|
||||
id="defs5">
|
||||
<filter
|
||||
id="filter0_d_18_113"
|
||||
x="58.7948"
|
||||
y="28.784901"
|
||||
width="135.694"
|
||||
height="197.15401"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB">
|
||||
<feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood3" />
|
||||
<feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix3" />
|
||||
<feOffset
|
||||
dy="7.68"
|
||||
id="feOffset3" />
|
||||
<feGaussianBlur
|
||||
stdDeviation="2.56"
|
||||
id="feGaussianBlur3" />
|
||||
<feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
||||
id="feColorMatrix4" />
|
||||
<feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_18_113"
|
||||
id="feBlend4" />
|
||||
<feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_18_113"
|
||||
result="shape"
|
||||
id="feBlend5" />
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
81
addons/escoria-ui-return-monkey-island/cursors/east.svg
Normal file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
sodipodi:docname="east.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
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"><sodipodi:namedview
|
||||
id="namedview5"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="3.9933811"
|
||||
inkscape:cx="57.219683"
|
||||
inkscape:cy="60.224655"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" /><g
|
||||
id="g5"
|
||||
transform="matrix(0.28239848,0,0,0.28239848,1.1963533e-7,0.36640485)"><g
|
||||
style="fill:none"
|
||||
id="g1"
|
||||
transform="matrix(-0.82301095,0,0,-0.82301095,182.41215,136.85333)"><path
|
||||
d="m 42.8435,124.893 c -1.433,0.787 -2.3236,2.292 -2.3236,3.927 0,1.635 0.8906,3.14 2.3236,3.927 l 54.7779,30.08 c 0.627191,0.34422 1.302043,0.52288 1.973343,0.54975 1.581207,0.0633 3.142697,-0.71559 4.015257,-2.15675 l -3.8322,-2.32 c 3.8322,2.32 3.8332,2.319 3.8332,2.319 l 10e-4,-0.002 0.002,-0.003 0.006,-0.01 0.018,-0.03 0.063,-0.106 c 0.054,-0.091 0.131,-0.221 0.228,-0.387 0.194,-0.333 0.469,-0.812 0.807,-1.418 0.675,-1.21 1.601,-2.93 2.619,-4.992 1.631,-3.303 3.548,-7.578 5.037,-12.096 0.307,-0.002 0.635,-0.003 0.982,-0.004 2.728,-0.008 6.629,-0.009 11.318,-0.006 9.291,0.006 21.656,0.029 34.074,0.052 l 0.342,10e-4 c 12.53,0.023 25.088,0.047 34.56,0.052 4.735,0.003 8.704,0.002 11.516,-0.007 1.404,-0.004 2.528,-0.009 3.317,-0.017 0.392,-0.004 0.717,-0.009 0.958,-0.014 0.117,-0.003 0.238,-0.006 0.347,-0.011 0.051,-0.002 0.131,-0.006 0.22,-0.013 0.028,-0.003 0.07,-0.006 0.12,-0.011 0.021,-0.002 0.041,-0.004 0.062,-0.006 0.185,-0.019 0.387,-0.051 0.605,-0.099 0.437,-0.097 0.923,-0.262 1.427,-0.523 1.038,-0.539 1.973,-1.395 2.726,-2.567 1.424,-2.219 2.194,-5.552 2.194,-10.51 0,-4.959 -0.77,-8.292 -2.194,-10.511 -0.753,-1.172 -1.688,-2.028 -2.726,-2.566 -0.504,-0.262 -0.99,-0.427 -1.427,-0.524 -0.218,-0.048 -0.42,-0.08 -0.605,-0.099 -0.015,-0.001 -0.031,-0.003 -0.046,-0.004 -0.047,-0.005 -0.087,-0.009 -0.115,-0.011 -0.092,-0.008 -0.175,-0.012 -0.229,-0.015 -0.114,-0.006 -0.239,-0.009 -0.359,-0.012 -0.247,-0.007 -0.577,-0.012 -0.973,-0.016 -0.797,-0.009 -1.929,-0.015 -3.339,-0.02 -2.825,-0.009 -6.806,-0.01 -11.552,-0.007 -9.476,0.007 -22.022,0.033 -34.545,0.06 h -0.071 c -12.549,0.027 -25.067,0.053 -34.452,0.059 -4.694,0.004 -8.597,0.002 -11.327,-0.007 -0.364,-0.002 -0.706,-0.003 -1.025,-0.004 -1.494,-4.388 -3.363,-8.515 -4.946,-11.701 -0.989,-1.991 -1.884,-3.6474 -2.534,-4.8119 -0.326,-0.5829 -0.591,-1.044 -0.778,-1.3639 -0.093,-0.16 -0.167,-0.2848 -0.219,-0.372 l -0.061,-0.1022 -0.018,-0.0294 -0.005,-0.0092 -0.002,-0.0032 -10e-4,-0.0013 c 0,-5e-4 -0.001,-0.001 -3.8332,2.3188 l 3.8322,-2.3198 c -1.243,-2.0539 -3.8841,-2.7627 -5.9886,-1.607 z"
|
||||
stroke="#0000ff"
|
||||
stroke-width="8.96"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path1-3"
|
||||
sodipodi:nodetypes="csccscccccccccccccsccccsccccccccscccccccccccccccccccsccccccccc"
|
||||
style="stroke:#f2f2f2;stroke-opacity:1" /><path
|
||||
d="M 44.9999,128.82 99.7778,98.7397 c 0,0 6.1412,10.1473 9.0922,20.5063 0.06,0.213 99.974,-0.211 100.842,0 0,0 2.968,0 2.968,9.246 0,9.245 -2.968,9.245 -2.968,9.245 -0.76,0.188 -100.609,-0.186 -100.66,0 -2.87,10.583 -9.2742,21.163 -9.2742,21.163 z"
|
||||
fill="#00ff00"
|
||||
id="path2-6"
|
||||
style="fill:#666666;fill-opacity:1" /></g></g><defs
|
||||
id="defs5"><filter
|
||||
id="filter0_d_18_113"
|
||||
x="58.7948"
|
||||
y="28.784901"
|
||||
width="135.694"
|
||||
height="197.15401"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"><feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood3" /><feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix3" /><feOffset
|
||||
dy="7.68"
|
||||
id="feOffset3" /><feGaussianBlur
|
||||
stdDeviation="2.56"
|
||||
id="feGaussianBlur3" /><feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
||||
id="feColorMatrix4" /><feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_18_113"
|
||||
id="feBlend4" /><feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_18_113"
|
||||
result="shape"
|
||||
id="feBlend5" /></filter></defs></svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
110
addons/escoria-ui-return-monkey-island/cursors/hand.svg
Normal file
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
sodipodi:docname="hand.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
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"><sodipodi:namedview
|
||||
id="namedview5"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="11.294988"
|
||||
inkscape:cx="17.397098"
|
||||
inkscape:cy="20.053143"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" /><g
|
||||
id="g5"
|
||||
transform="matrix(0.28239848,0,0,0.28239848,1.1963533e-7,0.36640485)"><g
|
||||
style="fill:none"
|
||||
id="g3"
|
||||
transform="matrix(0.38020692,0,0,0.38020692,-9.40517,-10.599142)"><g
|
||||
filter="url(#filter0_d_21_2)"
|
||||
id="g1"><path
|
||||
d="m 117.348,35.02 c -6.215,0 -12.306,3.0662 -16.178,8.2326 -3.8717,5.1664 -5.7582,12.2574 -5.7582,20.307 V 125.03 c -4.8514,-3.593 -10.5586,-9.073 -14.807,-10.977 -8.5854,-3.847 -16.4297,-4.602 -22.759,-2.744 -12.6585,3.715 -16.7264,15.916 -16.7264,15.916 l -1.9194,6.312 5.484,3.841 c 12.0713,8.157 24.3061,28.164 35.9208,46.652 5.8073,9.243 11.5325,17.911 18.0975,24.972 6.5647,7.06 14.6697,12.962 24.6787,12.898 l 77.325,-0.274 7.952,-0.274 0.822,-7.684 8.775,-87.814 c 1.302,-12.594 -6.33,-23.323 -16.178,-26.6188 -4.753,-1.5907 -10.207,-0.7745 -15.081,1.3718 -3.201,-4.9067 -7.388,-8.6174 -12.614,-9.8788 -4.451,-1.0743 -9.19,-0.1265 -13.436,1.6465 -3.049,-4.3574 -7.035,-7.5296 -11.791,-9.0558 -3.062,-0.9828 -6.554,-0.2214 -9.871,0.2739 V 63.5602 c 0,-8.0497 -1.886,-15.1407 -5.758,-20.3071 -3.872,-5.1663 -9.963,-8.2325 -16.178,-8.2325 z"
|
||||
fill="#0000ff"
|
||||
id="path1-3"
|
||||
style="fill:#ffffff;fill-opacity:1" /></g><path
|
||||
d="m 123.063,212.94 77.496,-0.503 8.772,-88.175 c 1.84,-17.873 -20.2,-25.3098 -26.318,-8.818 0.079,-19.819 -20.208,-22.2988 -26.318,-8.817 0.765,-16.375 -19.934,-22.7127 -26.318,-8.818 V 62.5394 c 0,-26.4526 -26.318,-26.4526 -26.318,0 V 141.897 C 60.195,97.8095 49.4399,129.489 49.4399,129.489 c 29.8072,20.228 48.039,83.617 73.6231,83.451 z"
|
||||
fill="#00ff00"
|
||||
id="path2-6"
|
||||
style="fill:#666666;fill-opacity:1" /></g></g><defs
|
||||
id="defs5"><filter
|
||||
id="filter0_d_18_113"
|
||||
x="58.7948"
|
||||
y="28.784901"
|
||||
width="135.694"
|
||||
height="197.15401"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"><feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood3" /><feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix3" /><feOffset
|
||||
dy="7.68"
|
||||
id="feOffset3" /><feGaussianBlur
|
||||
stdDeviation="2.56"
|
||||
id="feGaussianBlur3" /><feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
||||
id="feColorMatrix4" /><feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_18_113"
|
||||
id="feBlend4" /><feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_18_113"
|
||||
result="shape"
|
||||
id="feBlend5" /></filter><filter
|
||||
id="filter0_d_21_2"
|
||||
x="34.08"
|
||||
y="35.02"
|
||||
width="189.44"
|
||||
height="199.68"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"><feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood2" /><feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix2" /><feOffset
|
||||
dy="7.68"
|
||||
id="feOffset2" /><feGaussianBlur
|
||||
stdDeviation="2.56"
|
||||
id="feGaussianBlur2" /><feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
||||
id="feColorMatrix3-7" /><feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_21_2"
|
||||
id="feBlend3" /><feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_21_2"
|
||||
result="shape"
|
||||
id="feBlend4-5" /></filter></defs></svg>
|
||||
|
After Width: | Height: | Size: 4.7 KiB |
81
addons/escoria-ui-return-monkey-island/cursors/north.svg
Normal file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
sodipodi:docname="north.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
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"><sodipodi:namedview
|
||||
id="namedview5"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="3.9933811"
|
||||
inkscape:cx="57.720512"
|
||||
inkscape:cy="68.989158"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" /><g
|
||||
id="g5"
|
||||
transform="matrix(0.28239848,0,0,0.28239848,1.1963533e-7,0.36640485)"><g
|
||||
style="fill:none"
|
||||
id="g1"
|
||||
transform="matrix(0,0.82301095,-0.82301095,0,138.15081,-30.958707)"><path
|
||||
d="m 42.8435,124.893 c -1.433,0.787 -2.3236,2.292 -2.3236,3.927 0,1.635 0.8906,3.14 2.3236,3.927 l 54.7779,30.08 c 0.627191,0.34422 1.302043,0.52288 1.973343,0.54975 1.581207,0.0633 3.142697,-0.71559 4.015257,-2.15675 l -3.8322,-2.32 c 3.8322,2.32 3.8332,2.319 3.8332,2.319 l 10e-4,-0.002 0.002,-0.003 0.006,-0.01 0.018,-0.03 0.063,-0.106 c 0.054,-0.091 0.131,-0.221 0.228,-0.387 0.194,-0.333 0.469,-0.812 0.807,-1.418 0.675,-1.21 1.601,-2.93 2.619,-4.992 1.631,-3.303 3.548,-7.578 5.037,-12.096 0.307,-0.002 0.635,-0.003 0.982,-0.004 2.728,-0.008 6.629,-0.009 11.318,-0.006 9.291,0.006 21.656,0.029 34.074,0.052 l 0.342,10e-4 c 12.53,0.023 25.088,0.047 34.56,0.052 4.735,0.003 8.704,0.002 11.516,-0.007 1.404,-0.004 2.528,-0.009 3.317,-0.017 0.392,-0.004 0.717,-0.009 0.958,-0.014 0.117,-0.003 0.238,-0.006 0.347,-0.011 0.051,-0.002 0.131,-0.006 0.22,-0.013 0.028,-0.003 0.07,-0.006 0.12,-0.011 0.021,-0.002 0.041,-0.004 0.062,-0.006 0.185,-0.019 0.387,-0.051 0.605,-0.099 0.437,-0.097 0.923,-0.262 1.427,-0.523 1.038,-0.539 1.973,-1.395 2.726,-2.567 1.424,-2.219 2.194,-5.552 2.194,-10.51 0,-4.959 -0.77,-8.292 -2.194,-10.511 -0.753,-1.172 -1.688,-2.028 -2.726,-2.566 -0.504,-0.262 -0.99,-0.427 -1.427,-0.524 -0.218,-0.048 -0.42,-0.08 -0.605,-0.099 -0.015,-0.001 -0.031,-0.003 -0.046,-0.004 -0.047,-0.005 -0.087,-0.009 -0.115,-0.011 -0.092,-0.008 -0.175,-0.012 -0.229,-0.015 -0.114,-0.006 -0.239,-0.009 -0.359,-0.012 -0.247,-0.007 -0.577,-0.012 -0.973,-0.016 -0.797,-0.009 -1.929,-0.015 -3.339,-0.02 -2.825,-0.009 -6.806,-0.01 -11.552,-0.007 -9.476,0.007 -22.022,0.033 -34.545,0.06 h -0.071 c -12.549,0.027 -25.067,0.053 -34.452,0.059 -4.694,0.004 -8.597,0.002 -11.327,-0.007 -0.364,-0.002 -0.706,-0.003 -1.025,-0.004 -1.494,-4.388 -3.363,-8.515 -4.946,-11.701 -0.989,-1.991 -1.884,-3.6474 -2.534,-4.8119 -0.326,-0.5829 -0.591,-1.044 -0.778,-1.3639 -0.093,-0.16 -0.167,-0.2848 -0.219,-0.372 l -0.061,-0.1022 -0.018,-0.0294 -0.005,-0.0092 -0.002,-0.0032 -10e-4,-0.0013 c 0,-5e-4 -0.001,-0.001 -3.8332,2.3188 l 3.8322,-2.3198 c -1.243,-2.0539 -3.8841,-2.7627 -5.9886,-1.607 z"
|
||||
stroke="#0000ff"
|
||||
stroke-width="8.96"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path1-3"
|
||||
sodipodi:nodetypes="csccscccccccccccccsccccsccccccccscccccccccccccccccccsccccccccc"
|
||||
style="stroke:#f2f2f2;stroke-opacity:1" /><path
|
||||
d="M 44.9999,128.82 99.7778,98.7397 c 0,0 6.1412,10.1473 9.0922,20.5063 0.06,0.213 99.974,-0.211 100.842,0 0,0 2.968,0 2.968,9.246 0,9.245 -2.968,9.245 -2.968,9.245 -0.76,0.188 -100.609,-0.186 -100.66,0 -2.87,10.583 -9.2742,21.163 -9.2742,21.163 z"
|
||||
fill="#00ff00"
|
||||
id="path2-6"
|
||||
style="fill:#666666;fill-opacity:1" /></g></g><defs
|
||||
id="defs5"><filter
|
||||
id="filter0_d_18_113"
|
||||
x="58.7948"
|
||||
y="28.784901"
|
||||
width="135.694"
|
||||
height="197.15401"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"><feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood3" /><feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix3" /><feOffset
|
||||
dy="7.68"
|
||||
id="feOffset3" /><feGaussianBlur
|
||||
stdDeviation="2.56"
|
||||
id="feGaussianBlur3" /><feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
||||
id="feColorMatrix4" /><feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_18_113"
|
||||
id="feBlend4" /><feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_18_113"
|
||||
result="shape"
|
||||
id="feBlend5" /></filter></defs></svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
81
addons/escoria-ui-return-monkey-island/cursors/south.svg
Normal file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
sodipodi:docname="south.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
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"><sodipodi:namedview
|
||||
id="namedview5"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="3.9933811"
|
||||
inkscape:cx="57.219683"
|
||||
inkscape:cy="60.224655"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" /><g
|
||||
id="g5"
|
||||
transform="matrix(0.28239848,0,0,0.28239848,1.1963533e-7,0.36640485)"><g
|
||||
style="fill:none"
|
||||
id="g1"
|
||||
transform="matrix(0,-0.82301095,0.82301095,0,-73.90381,181.97657)"><path
|
||||
d="m 42.8435,124.893 c -1.433,0.787 -2.3236,2.292 -2.3236,3.927 0,1.635 0.8906,3.14 2.3236,3.927 l 54.7779,30.08 c 0.627191,0.34422 1.302043,0.52288 1.973343,0.54975 1.581207,0.0633 3.142697,-0.71559 4.015257,-2.15675 l -3.8322,-2.32 c 3.8322,2.32 3.8332,2.319 3.8332,2.319 l 10e-4,-0.002 0.002,-0.003 0.006,-0.01 0.018,-0.03 0.063,-0.106 c 0.054,-0.091 0.131,-0.221 0.228,-0.387 0.194,-0.333 0.469,-0.812 0.807,-1.418 0.675,-1.21 1.601,-2.93 2.619,-4.992 1.631,-3.303 3.548,-7.578 5.037,-12.096 0.307,-0.002 0.635,-0.003 0.982,-0.004 2.728,-0.008 6.629,-0.009 11.318,-0.006 9.291,0.006 21.656,0.029 34.074,0.052 l 0.342,10e-4 c 12.53,0.023 25.088,0.047 34.56,0.052 4.735,0.003 8.704,0.002 11.516,-0.007 1.404,-0.004 2.528,-0.009 3.317,-0.017 0.392,-0.004 0.717,-0.009 0.958,-0.014 0.117,-0.003 0.238,-0.006 0.347,-0.011 0.051,-0.002 0.131,-0.006 0.22,-0.013 0.028,-0.003 0.07,-0.006 0.12,-0.011 0.021,-0.002 0.041,-0.004 0.062,-0.006 0.185,-0.019 0.387,-0.051 0.605,-0.099 0.437,-0.097 0.923,-0.262 1.427,-0.523 1.038,-0.539 1.973,-1.395 2.726,-2.567 1.424,-2.219 2.194,-5.552 2.194,-10.51 0,-4.959 -0.77,-8.292 -2.194,-10.511 -0.753,-1.172 -1.688,-2.028 -2.726,-2.566 -0.504,-0.262 -0.99,-0.427 -1.427,-0.524 -0.218,-0.048 -0.42,-0.08 -0.605,-0.099 -0.015,-0.001 -0.031,-0.003 -0.046,-0.004 -0.047,-0.005 -0.087,-0.009 -0.115,-0.011 -0.092,-0.008 -0.175,-0.012 -0.229,-0.015 -0.114,-0.006 -0.239,-0.009 -0.359,-0.012 -0.247,-0.007 -0.577,-0.012 -0.973,-0.016 -0.797,-0.009 -1.929,-0.015 -3.339,-0.02 -2.825,-0.009 -6.806,-0.01 -11.552,-0.007 -9.476,0.007 -22.022,0.033 -34.545,0.06 h -0.071 c -12.549,0.027 -25.067,0.053 -34.452,0.059 -4.694,0.004 -8.597,0.002 -11.327,-0.007 -0.364,-0.002 -0.706,-0.003 -1.025,-0.004 -1.494,-4.388 -3.363,-8.515 -4.946,-11.701 -0.989,-1.991 -1.884,-3.6474 -2.534,-4.8119 -0.326,-0.5829 -0.591,-1.044 -0.778,-1.3639 -0.093,-0.16 -0.167,-0.2848 -0.219,-0.372 l -0.061,-0.1022 -0.018,-0.0294 -0.005,-0.0092 -0.002,-0.0032 -10e-4,-0.0013 c 0,-5e-4 -0.001,-0.001 -3.8332,2.3188 l 3.8322,-2.3198 c -1.243,-2.0539 -3.8841,-2.7627 -5.9886,-1.607 z"
|
||||
stroke="#0000ff"
|
||||
stroke-width="8.96"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path1-3"
|
||||
sodipodi:nodetypes="csccscccccccccccccsccccsccccccccscccccccccccccccccccsccccccccc"
|
||||
style="stroke:#f2f2f2;stroke-opacity:1" /><path
|
||||
d="M 44.9999,128.82 99.7778,98.7397 c 0,0 6.1412,10.1473 9.0922,20.5063 0.06,0.213 99.974,-0.211 100.842,0 0,0 2.968,0 2.968,9.246 0,9.245 -2.968,9.245 -2.968,9.245 -0.76,0.188 -100.609,-0.186 -100.66,0 -2.87,10.583 -9.2742,21.163 -9.2742,21.163 z"
|
||||
fill="#00ff00"
|
||||
id="path2-6"
|
||||
style="fill:#666666;fill-opacity:1" /></g></g><defs
|
||||
id="defs5"><filter
|
||||
id="filter0_d_18_113"
|
||||
x="58.7948"
|
||||
y="28.784901"
|
||||
width="135.694"
|
||||
height="197.15401"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"><feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood3" /><feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix3" /><feOffset
|
||||
dy="7.68"
|
||||
id="feOffset3" /><feGaussianBlur
|
||||
stdDeviation="2.56"
|
||||
id="feGaussianBlur3" /><feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
||||
id="feColorMatrix4" /><feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_18_113"
|
||||
id="feBlend4" /><feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_18_113"
|
||||
result="shape"
|
||||
id="feBlend5" /></filter></defs></svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
89
addons/escoria-ui-return-monkey-island/cursors/wait.svg
Normal file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
sodipodi:docname="wait.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
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"><sodipodi:namedview
|
||||
id="namedview5"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="7.9867622"
|
||||
inkscape:cx="50.02027"
|
||||
inkscape:cy="23.851969"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" /><g
|
||||
id="g5"
|
||||
transform="matrix(0.28239848,0,0,0.28239848,1.1963533e-7,0.36640485)"><g
|
||||
id="g1"
|
||||
transform="matrix(0.53317136,0,0,0.53317136,-158.96535,-77.970993)"><path
|
||||
d="m 351.44777,217.73491 c 26.5867,0 48.13939,-21.55277 48.13939,-48.1394 h -96.27879 c 0,26.58663 21.55277,48.1394 48.1394,48.1394 z m 0,0 c 26.5867,0 48.13939,21.55269 48.13939,48.13939 h -96.27879 c 0,-26.5867 21.55277,-48.13939 48.1394,-48.13939 z"
|
||||
stroke="#000000"
|
||||
stroke-width="10.3156"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path1"
|
||||
style="fill:#666666;fill-opacity:1;stroke:#f2f2f2;stroke-opacity:1" /><path
|
||||
d="m 303.30837,148.96433 h 48.1394 48.13939"
|
||||
stroke="#000000"
|
||||
stroke-width="10.3156"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path2"
|
||||
style="stroke:#f2f2f2;stroke-opacity:1" /><path
|
||||
d="m 303.30837,286.50548 h 48.1394 48.13939"
|
||||
stroke="#000000"
|
||||
stroke-width="10.3156"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path3"
|
||||
style="stroke:#f2f2f2;stroke-opacity:1" /></g></g><defs
|
||||
id="defs5"><filter
|
||||
id="filter0_d_18_113"
|
||||
x="58.7948"
|
||||
y="28.784901"
|
||||
width="135.694"
|
||||
height="197.15401"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"><feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood3" /><feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix3" /><feOffset
|
||||
dy="7.68"
|
||||
id="feOffset3" /><feGaussianBlur
|
||||
stdDeviation="2.56"
|
||||
id="feGaussianBlur3" /><feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
||||
id="feColorMatrix4" /><feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_18_113"
|
||||
id="feBlend4" /><feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_18_113"
|
||||
result="shape"
|
||||
id="feBlend5" /></filter></defs></svg>
|
||||
|
After Width: | Height: | Size: 3.2 KiB |
81
addons/escoria-ui-return-monkey-island/cursors/west.svg
Normal file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
sodipodi:docname="west.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
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"><sodipodi:namedview
|
||||
id="namedview5"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="3.9933811"
|
||||
inkscape:cx="57.219683"
|
||||
inkscape:cy="60.224655"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" /><g
|
||||
id="g5"
|
||||
transform="matrix(0.28239848,0,0,0.28239848,1.1963533e-7,0.36640485)"><g
|
||||
style="fill:none"
|
||||
id="g1"
|
||||
transform="matrix(0.82301095,0,0,0.82301095,-29.661233,-75.201285)"><path
|
||||
d="m 42.8435,124.893 c -1.433,0.787 -2.3236,2.292 -2.3236,3.927 0,1.635 0.8906,3.14 2.3236,3.927 l 54.7779,30.08 c 0.627191,0.34422 1.302043,0.52288 1.973343,0.54975 1.581207,0.0633 3.142697,-0.71559 4.015257,-2.15675 l -3.8322,-2.32 c 3.8322,2.32 3.8332,2.319 3.8332,2.319 l 10e-4,-0.002 0.002,-0.003 0.006,-0.01 0.018,-0.03 0.063,-0.106 c 0.054,-0.091 0.131,-0.221 0.228,-0.387 0.194,-0.333 0.469,-0.812 0.807,-1.418 0.675,-1.21 1.601,-2.93 2.619,-4.992 1.631,-3.303 3.548,-7.578 5.037,-12.096 0.307,-0.002 0.635,-0.003 0.982,-0.004 2.728,-0.008 6.629,-0.009 11.318,-0.006 9.291,0.006 21.656,0.029 34.074,0.052 l 0.342,10e-4 c 12.53,0.023 25.088,0.047 34.56,0.052 4.735,0.003 8.704,0.002 11.516,-0.007 1.404,-0.004 2.528,-0.009 3.317,-0.017 0.392,-0.004 0.717,-0.009 0.958,-0.014 0.117,-0.003 0.238,-0.006 0.347,-0.011 0.051,-0.002 0.131,-0.006 0.22,-0.013 0.028,-0.003 0.07,-0.006 0.12,-0.011 0.021,-0.002 0.041,-0.004 0.062,-0.006 0.185,-0.019 0.387,-0.051 0.605,-0.099 0.437,-0.097 0.923,-0.262 1.427,-0.523 1.038,-0.539 1.973,-1.395 2.726,-2.567 1.424,-2.219 2.194,-5.552 2.194,-10.51 0,-4.959 -0.77,-8.292 -2.194,-10.511 -0.753,-1.172 -1.688,-2.028 -2.726,-2.566 -0.504,-0.262 -0.99,-0.427 -1.427,-0.524 -0.218,-0.048 -0.42,-0.08 -0.605,-0.099 -0.015,-0.001 -0.031,-0.003 -0.046,-0.004 -0.047,-0.005 -0.087,-0.009 -0.115,-0.011 -0.092,-0.008 -0.175,-0.012 -0.229,-0.015 -0.114,-0.006 -0.239,-0.009 -0.359,-0.012 -0.247,-0.007 -0.577,-0.012 -0.973,-0.016 -0.797,-0.009 -1.929,-0.015 -3.339,-0.02 -2.825,-0.009 -6.806,-0.01 -11.552,-0.007 -9.476,0.007 -22.022,0.033 -34.545,0.06 h -0.071 c -12.549,0.027 -25.067,0.053 -34.452,0.059 -4.694,0.004 -8.597,0.002 -11.327,-0.007 -0.364,-0.002 -0.706,-0.003 -1.025,-0.004 -1.494,-4.388 -3.363,-8.515 -4.946,-11.701 -0.989,-1.991 -1.884,-3.6474 -2.534,-4.8119 -0.326,-0.5829 -0.591,-1.044 -0.778,-1.3639 -0.093,-0.16 -0.167,-0.2848 -0.219,-0.372 l -0.061,-0.1022 -0.018,-0.0294 -0.005,-0.0092 -0.002,-0.0032 -10e-4,-0.0013 c 0,-5e-4 -0.001,-0.001 -3.8332,2.3188 l 3.8322,-2.3198 c -1.243,-2.0539 -3.8841,-2.7627 -5.9886,-1.607 z"
|
||||
stroke="#0000ff"
|
||||
stroke-width="8.96"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path1-3"
|
||||
sodipodi:nodetypes="csccscccccccccccccsccccsccccccccscccccccccccccccccccsccccccccc"
|
||||
style="stroke:#f2f2f2;stroke-opacity:1" /><path
|
||||
d="M 44.9999,128.82 99.7778,98.7397 c 0,0 6.1412,10.1473 9.0922,20.5063 0.06,0.213 99.974,-0.211 100.842,0 0,0 2.968,0 2.968,9.246 0,9.245 -2.968,9.245 -2.968,9.245 -0.76,0.188 -100.609,-0.186 -100.66,0 -2.87,10.583 -9.2742,21.163 -9.2742,21.163 z"
|
||||
fill="#00ff00"
|
||||
id="path2-6"
|
||||
style="fill:#666666;fill-opacity:1" /></g></g><defs
|
||||
id="defs5"><filter
|
||||
id="filter0_d_18_113"
|
||||
x="58.7948"
|
||||
y="28.784901"
|
||||
width="135.694"
|
||||
height="197.15401"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"><feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood3" /><feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix3" /><feOffset
|
||||
dy="7.68"
|
||||
id="feOffset3" /><feGaussianBlur
|
||||
stdDeviation="2.56"
|
||||
id="feGaussianBlur3" /><feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
||||
id="feColorMatrix4" /><feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_18_113"
|
||||
id="feBlend4" /><feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_18_113"
|
||||
result="shape"
|
||||
id="feBlend5" /></filter></defs></svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
@@ -1,7 +1,7 @@
|
||||
@tool
|
||||
@icon("res://addons/escoria-core/design/esc_item.svg")
|
||||
extends ESCItem
|
||||
class_name ESCItemWithTooltip
|
||||
extends ESCItem
|
||||
|
||||
# custom_data["target_tooltips"]: Dictionary[String, Dictionary]
|
||||
# Tooltip texts if item is target. Dictionary with action as key ("action3" or "action4") and an inner dictionary as value.
|
||||
@@ -10,21 +10,28 @@ class_name ESCItemWithTooltip
|
||||
## Enables automatic ESCItemComponetPickedObserver loading.
|
||||
@export var with_is_picked_component = false
|
||||
|
||||
## Custom cursor
|
||||
@export var custom_cursor: String = ""
|
||||
|
||||
## ESCItemComponents children of this node
|
||||
var components: Dictionary = {}
|
||||
|
||||
var cursor: String:
|
||||
get:
|
||||
return custom_cursor if custom_cursor != "" else "hand"
|
||||
|
||||
|
||||
func _ready():
|
||||
super._ready()
|
||||
register_components()
|
||||
|
||||
|
||||
func has_component(key: String)->bool:
|
||||
func has_component(key: String) -> bool:
|
||||
return components.has(key)
|
||||
|
||||
|
||||
func get_component(key: String):
|
||||
if(has_component(key)):
|
||||
if has_component(key):
|
||||
return components[key]
|
||||
return null
|
||||
|
||||
@@ -32,7 +39,7 @@ func get_component(key: String):
|
||||
func register_components():
|
||||
autoload_components()
|
||||
for child in get_children():
|
||||
if(child is ESCItemComponent):
|
||||
if child is ESCItemComponent:
|
||||
child = child as ESCItemComponent
|
||||
components[child.get_component_type()] = child
|
||||
child.register(custom_data)
|
||||
@@ -40,22 +47,23 @@ func register_components():
|
||||
|
||||
func autoload_components():
|
||||
add_child(ESCItemComponentOutline.new())
|
||||
|
||||
|
||||
# Adds picked observer when configured.
|
||||
if with_is_picked_component:
|
||||
add_child(ESCItemComponentPickedObserver.new())
|
||||
|
||||
|
||||
|
||||
func set_custom_data(data: Dictionary) -> void:
|
||||
super.set_custom_data(data)
|
||||
if custom_data.has("count"):
|
||||
ESCItemCountManager.new().update_sprite(self)
|
||||
|
||||
|
||||
func _get_inventory_texture_hovered() -> Texture2D:
|
||||
if custom_data.has("count"):
|
||||
return inventory_texture
|
||||
elif inventory_texture_hovered == null:
|
||||
|
||||
if inventory_texture_hovered == null:
|
||||
return _get_inventory_texture()
|
||||
else:
|
||||
return inventory_texture_hovered
|
||||
|
||||
return inventory_texture_hovered
|
||||
|
||||
@@ -148,7 +148,9 @@ func _ready():
|
||||
tooltip_node = rtmi_tooltip_node
|
||||
# We need a slightly modified version of Action Manager to combine items with different actions.
|
||||
escoria.action_manager = ESCActionManagerMonkey.new()
|
||||
escoria.action_manager.action_input_state_changed.connect(_on_input_state_changed)
|
||||
|
||||
# We need to connect inside the scene_tree. Cursor manager is in the singelton.
|
||||
escoria.inputs_manager.input_mode_changed.connect(_on_input_mode_changed)
|
||||
|
||||
#escoria.di = RTMIDependencyInjector.new()
|
||||
|
||||
@@ -214,8 +216,9 @@ func click_on_bg(position: Vector2) -> void:
|
||||
escoria.action_manager.action_state
|
||||
== ESCActionManager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM
|
||||
):
|
||||
gymkhana.cursor_manager.clear_cursor()
|
||||
escoria.action_manager.clear_current_tool()
|
||||
gymkhana.cursor_manager.clear_cursor()
|
||||
|
||||
|
||||
if escoria.main.current_scene.player:
|
||||
escoria.action_manager.do(
|
||||
@@ -252,7 +255,7 @@ func element_focused(element_id: String) -> void:
|
||||
if escoria.current_state != escoria.GAME_STATE.DEFAULT:
|
||||
return
|
||||
|
||||
if escoria.inputs_manager.input_mode != escoria.inputs_manager.INPUT_ALL:
|
||||
if not _is_input_all():
|
||||
return
|
||||
|
||||
var target_obj = escoria.object_manager.get_object(element_id).node
|
||||
@@ -267,9 +270,16 @@ func element_focused(element_id: String) -> void:
|
||||
if target_obj is ESCItemWithTooltip:
|
||||
target_obj.get_component("outline").highlight(true)
|
||||
last_target = target_obj
|
||||
if target_obj.is_interactive:
|
||||
gymkhana.cursor_manager.handle_item_cursor(target_obj)
|
||||
|
||||
|
||||
func element_unfocused() -> void:
|
||||
if not _is_input_all():
|
||||
return
|
||||
|
||||
gymkhana.cursor_manager.clear_cursor()
|
||||
|
||||
tooltip_node.set_target("")
|
||||
tooltip_node.set_target_object(null)
|
||||
|
||||
@@ -322,6 +332,9 @@ func left_double_click_on_item(item_global_id: String, event: InputEvent) -> voi
|
||||
|
||||
## INVENTORY ##
|
||||
func click_on_inventory_item(item_global_id: String, event: InputEvent, action: String) -> void:
|
||||
if not _is_input_all():
|
||||
return
|
||||
|
||||
# Skip inventory clicks when eneko_catando
|
||||
if _check_eneko_catando():
|
||||
return
|
||||
@@ -343,8 +356,7 @@ func click_on_inventory_item(item_global_id: String, event: InputEvent, action:
|
||||
action in target_obj.combine_when_selected_action_is_in
|
||||
and escoria.action_manager.current_tool == null
|
||||
):
|
||||
var texture = target_obj.inventory_texture
|
||||
gymkhana.cursor_manager.set_cursor(texture)
|
||||
gymkhana.cursor_manager.set_texture_cursor(target_obj.inventory_texture)
|
||||
|
||||
escoria.action_manager.do(
|
||||
escoria.action_manager.ACTION.ITEM_LEFT_CLICK, [item_global_id, event], true
|
||||
@@ -504,7 +516,9 @@ func update_tooltip_following_mouse_position(tooltip: RTMIRichTooltip):
|
||||
)
|
||||
|
||||
|
||||
func set_tooltip_position(node_id: String, tooltip: RTMIRichTooltip, size: Vector2, offset: Vector2):
|
||||
func set_tooltip_position(
|
||||
node_id: String, tooltip: RTMIRichTooltip, size: Vector2, offset: Vector2
|
||||
):
|
||||
var mouse_position = calculate_mouse_position(size)
|
||||
var corrected_position = correct_position(tooltip, size, mouse_position, offset)
|
||||
tooltip.get_node(node_id).position = corrected_position
|
||||
@@ -543,7 +557,7 @@ func _on_event_done(return_code: int, _event_name: String):
|
||||
escoria.logger.info(self, "EVENT DONE! code= %s" % [return_code])
|
||||
|
||||
# Reset mouse cursor (should be not needed, but avoids not resetting the cursor on bugs)
|
||||
gymkhana.cursor_manager.clear_cursor()
|
||||
#gymkhana.cursor_manager.clear_cursor()
|
||||
|
||||
# Show tooltips, they were hidden while performing action
|
||||
tooltip_node.show()
|
||||
@@ -597,6 +611,10 @@ func _on_say_finished() -> void:
|
||||
update_tooltip_following_mouse_position(tooltip_node)
|
||||
|
||||
|
||||
func _is_input_all():
|
||||
return escoria.inputs_manager.input_mode == ESCInputsManager.INPUT_ALL
|
||||
|
||||
|
||||
func _check_eneko_catando() -> bool:
|
||||
if escoria.globals_manager.has("cocina_delante_catando"):
|
||||
return escoria.globals_manager.get_global("cocina_delante_catando")
|
||||
@@ -625,6 +643,5 @@ func _item_has_event_and_target(item_global_id: String, action: String) -> bool:
|
||||
return target_object.events.has(event_name)
|
||||
|
||||
|
||||
func _on_input_state_changed(new_state: ESCActionManager.ACTION_INPUT_STATE):
|
||||
if new_state == ESCActionManager.ACTION_INPUT_STATE.AWAITING_ITEM:
|
||||
gymkhana.cursor_manager.clear_cursor()
|
||||
func _on_input_mode_changed(new_mode):
|
||||
gymkhana.cursor_manager.handle_input_mode_change(new_mode)
|
||||
|
||||
@@ -1,29 +1,93 @@
|
||||
class_name RTMICursorManager
|
||||
## Valid direction
|
||||
enum DIRECTIONS {
|
||||
NORTH,
|
||||
EAST,
|
||||
SOUTH,
|
||||
WEST,
|
||||
}
|
||||
const RESIZE_RATIO: float = 0.5
|
||||
|
||||
const RESIZE_RATIO: float = 1.0
|
||||
const BASE_CURSOR := "res://addons/escoria-ui-return-monkey-island/cursors/arrow.svg"
|
||||
|
||||
const BASE_CURSOR := "res://addons/escoria-ui-return-monkey-island/cursors/left_ptr.svg"
|
||||
var base_cursor_texture := preload(BASE_CURSOR)
|
||||
const CURSORS: Dictionary = {
|
||||
"arrow": preload(BASE_CURSOR),
|
||||
"blank": preload("res://addons/escoria-ui-return-monkey-island/cursors/blank.svg"),
|
||||
"wait": preload("res://addons/escoria-ui-return-monkey-island/cursors/wait.svg"),
|
||||
"hand": preload("res://addons/escoria-ui-return-monkey-island/cursors/hand.svg"),
|
||||
"north": preload("res://addons/escoria-ui-return-monkey-island/cursors/north.svg"),
|
||||
"east": preload("res://addons/escoria-ui-return-monkey-island/cursors/east.svg"),
|
||||
"south": preload("res://addons/escoria-ui-return-monkey-island/cursors/south.svg"),
|
||||
"west": preload("res://addons/escoria-ui-return-monkey-island/cursors/west.svg"),
|
||||
}
|
||||
|
||||
func set_cursor(cursor_id: String):
|
||||
Input.set_custom_mouse_cursor(CURSORS[cursor_id], Input.CURSOR_ARROW)
|
||||
|
||||
|
||||
func set_cursor(texture: Texture2D) -> void:
|
||||
|
||||
func set_texture_cursor(texture: Texture2D) -> void:
|
||||
var image = texture.get_image()
|
||||
image.resize(image.get_width() * RESIZE_RATIO, image.get_height() * RESIZE_RATIO)
|
||||
|
||||
var rect = Rect2i(Vector2i.ZERO, Vector2i(127,127))
|
||||
var newImage = base_cursor_texture.get_image()
|
||||
|
||||
newImage.blend_rect(image, rect, Vector2i.ZERO)
|
||||
var cursor_width = image.get_width() * RESIZE_RATIO
|
||||
var cursor_height = image.get_height() * RESIZE_RATIO
|
||||
|
||||
image.resize(cursor_width, cursor_height)
|
||||
|
||||
var rect = Rect2i(Vector2i.ZERO, Vector2i(127, 127))
|
||||
var new_image = CURSORS["blank"].get_image()
|
||||
|
||||
new_image.blend_rect(image, rect, Vector2i.ZERO)
|
||||
|
||||
# Hotspot es una coordenada x,y de dentro de la imagen. En este caso (0,0)
|
||||
Input.set_custom_mouse_cursor( newImage, Input.CURSOR_ARROW, Vector2i.ZERO)
|
||||
Input.set_custom_mouse_cursor(
|
||||
new_image, Input.CURSOR_ARROW, Vector2i(cursor_width / 2, cursor_height / 2)
|
||||
)
|
||||
|
||||
|
||||
func clear_cursor():
|
||||
Input.set_custom_mouse_cursor(base_cursor_texture)
|
||||
if escoria.inputs_manager.input_mode == ESCInputsManager.INPUT_NONE:
|
||||
Input.set_custom_mouse_cursor(CURSORS["wait"], Input.CURSOR_ARROW)
|
||||
return
|
||||
if (
|
||||
escoria.action_manager.action_state
|
||||
== ESCActionManager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM
|
||||
):
|
||||
return
|
||||
Input.set_custom_mouse_cursor(CURSORS["arrow"], Input.CURSOR_ARROW)
|
||||
|
||||
|
||||
func hide_cursor():
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||
|
||||
|
||||
func show_cursor():
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
|
||||
|
||||
func set_hand_cursor():
|
||||
Input.set_custom_mouse_cursor(CURSORS["hand"], Input.CURSOR_ARROW, Vector2i.ZERO)
|
||||
Input.set_default_cursor_shape(Input.CURSOR_ARROW)
|
||||
|
||||
|
||||
func set_waiting_cursor():
|
||||
Input.set_custom_mouse_cursor(CURSORS["wait"], Input.CURSOR_ARROW, Vector2i.ZERO)
|
||||
Input.set_default_cursor_shape(Input.CURSOR_ARROW)
|
||||
|
||||
|
||||
func set_direction_cursor(direction: String):
|
||||
Input.set_custom_mouse_cursor(CURSORS[direction], Input.CURSOR_ARROW, Vector2i.ZERO)
|
||||
Input.set_default_cursor_shape(Input.CURSOR_ARROW)
|
||||
|
||||
|
||||
func handle_input_mode_change(_new_mode):
|
||||
clear_cursor()
|
||||
|
||||
|
||||
func handle_item_cursor(item: ESCItemWithTooltip):
|
||||
if (
|
||||
escoria.action_manager.action_state
|
||||
== ESCActionManager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM
|
||||
):
|
||||
return
|
||||
|
||||
gymkhana.cursor_manager.set_cursor(item.cursor)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
uid://50obw3tgp33n
|
||||
@@ -1,17 +1,19 @@
|
||||
class_name RTMIVideoManager
|
||||
|
||||
var _video_player: RTMIVideoPlayer
|
||||
|
||||
var is_playing: bool:
|
||||
get:
|
||||
return _video_player.is_playing()
|
||||
|
||||
var _video_player: RTMIVideoPlayer
|
||||
|
||||
|
||||
func _init(video_player: RTMIVideoPlayer) -> void:
|
||||
_video_player = video_player
|
||||
|
||||
|
||||
# Show inventory when video player finishes playing a video (inventory is hidden when a video starts)
|
||||
_video_player.connect("finished", _on_video_player_finished)
|
||||
|
||||
|
||||
func play_video(video_file: String) -> void:
|
||||
escoria.game_scene.hide_ui()
|
||||
escoria.game_scene.clear_tooltip()
|
||||
@@ -19,12 +21,15 @@ func play_video(video_file: String) -> void:
|
||||
_video_player.visible = true
|
||||
_video_player.play(video_file)
|
||||
|
||||
|
||||
func skip() -> void:
|
||||
_video_player.skip()
|
||||
|
||||
|
||||
func _on_video_player_finished() -> void:
|
||||
escoria.game_scene.show_ui()
|
||||
gymkhana.music_manager.resume()
|
||||
|
||||
|
||||
func get_video_player():
|
||||
return _video_player
|
||||
@@ -0,0 +1 @@
|
||||
uid://de3trrng81u4d
|
||||
@@ -1,12 +1,15 @@
|
||||
@tool
|
||||
extends Node
|
||||
class_name RTMIVideoPlayer
|
||||
extends Node
|
||||
|
||||
|
||||
signal finished
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
%CursorTimer.connect("timeout", _on_cursor_hide_timer_timeout)
|
||||
|
||||
|
||||
func play(video_path: String):
|
||||
# Load subtitles if option enabled
|
||||
if escoria.settings_manager.custom_settings[RTMIUiSettings.VIDEO_SUBTITLES_KEY]:
|
||||
@@ -16,11 +19,12 @@ func play(video_path: String):
|
||||
$VideoStreamPlayer.set_stream(load(video_path))
|
||||
$VideoStreamPlayer.play()
|
||||
|
||||
|
||||
func _on_VideoPlayer_finished():
|
||||
self.visible = false
|
||||
gymkhana.cursor_manager.show_cursor()
|
||||
emit_signal("finished")
|
||||
|
||||
|
||||
|
||||
func skip():
|
||||
$VideoStreamPlayer.stop()
|
||||
@@ -45,15 +49,18 @@ func _get_srt_path(video_path: String):
|
||||
var locale = TranslationServer.get_locale()
|
||||
return video_path.left(-3) + locale + ".srt"
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if not self.visible or Input.mouse_mode == Input.MOUSE_MODE_HIDDEN or not is_playing():
|
||||
return
|
||||
if %CursorTimer.is_stopped():
|
||||
%CursorTimer.start()
|
||||
|
||||
|
||||
func _on_cursor_hide_timer_timeout() -> void:
|
||||
gymkhana.cursor_manager.hide_cursor()
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseMotion:
|
||||
gymkhana.cursor_manager.show_cursor()
|
||||
|
||||
@@ -93,7 +93,9 @@
|
||||
say($player, "Ya me he decidido, voy a hacer lentejas.", "cocina_delante_intro_dialog2_player_decision")
|
||||
say($eneko_smoking, "Vale, pero avísame cuando las tengas listas, quiero asegurarme de que se puedan comer.", "cocina_delante_intro_dialog2_player_decision_res")
|
||||
say($eneko_smoking, "Y si necesitas algún ingrediente y no lo encuentras búscalo mejor. A mí no me molestes, estoy ocupado.", "cocina_delante_intro_dialog2_player_decision_res_2")
|
||||
accept_input("NONE")
|
||||
walk_block($player, $eneko_smoking)
|
||||
accept_input("ALL")
|
||||
set_angle($player, 180)
|
||||
say($player, "Ya tenemos una misión, hacer lentejas!", "cocina_delante_intro_dialog2_player_decision_to_user1")
|
||||
say($player, "Si vuelves a leer el libro de recetas sabrás la lista con los ingredientes necesarios.", "cocina_delante_intro_dialog2_player_decision_to_user2")
|
||||
|
||||
@@ -18,8 +18,9 @@
|
||||
say($player, "Debería pedirle a Eneko que pruebe las lentejas antes de llamar a la gente.", "cocina_cuerno_action4_hint")
|
||||
stop
|
||||
if ESC_CURRENT_SCENE == "cocina_delante":
|
||||
accept_input("SKIP")
|
||||
accept_input("NONE")
|
||||
walk_block($player, $puerta_cocina_start)
|
||||
accept_input("SKIP")
|
||||
set_angle($player, 180)
|
||||
if turno_cocina_eneko_cata_ok:
|
||||
set_gui_visible(false)
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
say($player, "Y además están riquísimas!", "cocina_libro_de_cocina_intro_action3_8")
|
||||
say_to_camera($player, "Voy a contárselo a Eneko.", "cocina_libro_de_cocina_intro_action3_9")
|
||||
end_block_say()
|
||||
accept_input("NONE")
|
||||
walk_block($player, $puerta_delante_start)
|
||||
set_global("intro_dialog2_playing", true)
|
||||
# Go to delante_cocina
|
||||
|
||||
@@ -48,8 +48,10 @@
|
||||
stop
|
||||
|
||||
# Añadimos walk explicito. ToDo: Todo parece correcto pero no lo hace solo.
|
||||
accept_input("NONE")
|
||||
walk_block($player, $turno_cocina_olla_llena)
|
||||
|
||||
accept_input("ALL")
|
||||
|
||||
# Echar las lentejas a la olla y recoger el bol y el peso
|
||||
say($player,"Lentejas pa'entro!", "olla_llena_action3_bol_lentejas_say")
|
||||
inventory_remove($turno_cocina_bol_lentejas)
|
||||
@@ -57,18 +59,23 @@
|
||||
set_global("turno_cocina_ingrediente_lentejas", true)
|
||||
accept_input("SKIP")
|
||||
say($player,"No creo que vaya a necesitar el bol de nuevo, voy a guardarlo.", "olla_llena_action3_bol_lentejas_clear_say_1")
|
||||
accept_input("NONE")
|
||||
walk_block($player, $turno_cocina_bol)
|
||||
accept_input("SKIP")
|
||||
inventory_remove($turno_cocina_bol)
|
||||
say($player,"Tampoco me queda nada por pesar.", "olla_llena_action3_bol_lentejas_clear_say_2")
|
||||
accept_input("NONE")
|
||||
walk_block($player, $turno_cocina_peso)
|
||||
inventory_remove($turno_cocina_peso_usado)
|
||||
set_global("turno_cocina_peso_picked", false)
|
||||
set_active($turno_cocina_peso, true)
|
||||
set_interactive($turno_cocina_peso, false)
|
||||
set_angle($player,180)
|
||||
accept_input("SKIP")
|
||||
say($player,"Reglamento de Uli, artículo 28: devuelve las cosas a su sitio una vez hayas terminado de usarlas.", "olla_llena_action3_bol_lentejas_clear_say_3")
|
||||
|
||||
if turno_cocina_ingrediente_patatas and turno_cocina_economica_encendida:
|
||||
accept_input("NONE")
|
||||
walk_block($player, $turno_cocina_economica)
|
||||
say($player, "Las lentejas ya huelen bien, está cocina es ultra-rápida! Debería decirle a Eneko que la comida está lista.", "eneko_can_taste_say")
|
||||
accept_input("ALL")
|
||||
@@ -83,8 +90,9 @@
|
||||
stop
|
||||
|
||||
# Añadimos walk explicito. ToDo: Todo parece correcto pero no lo hace solo.
|
||||
accept_input("NONE")
|
||||
walk_block($player, $turno_cocina_olla_llena)
|
||||
|
||||
accept_input("SKIP")
|
||||
say($player,"Patatas pa'entro", "olla_llena_action3_patata_enough_say")
|
||||
inventory_remove($turno_cocina_patata)
|
||||
set_global("turno_cocina_ingrediente_patatas", true)
|
||||
@@ -98,7 +106,9 @@
|
||||
stop
|
||||
|
||||
# Añadimos walk explicito. ToDo: Todo parece correcto pero no lo hace solo.
|
||||
accept_input("NONE")
|
||||
walk_block($player, $turno_cocina_olla_llena)
|
||||
accept_input("SKIP")
|
||||
|
||||
say($player,"Con romero estas lentejas van a estar de rechupete!", "olla_llena_action3_romero_say")
|
||||
set_global("turno_cocina_ingrediente_romero", true)
|
||||
@@ -110,8 +120,9 @@
|
||||
stop
|
||||
|
||||
# Añadimos walk explicito. ToDo: Todo parece correcto pero no lo hace solo.
|
||||
accept_input("NONE")
|
||||
walk_block($player, $turno_cocina_olla_llena)
|
||||
|
||||
accept_input("SKIP")
|
||||
say($player,"Con ajo quedará al gusto de Eneko.","olla_llena_action3_ajo_say")
|
||||
set_global("turno_cocina_ingrediente_ajo_en_lentejas", true)
|
||||
inventory_remove($turno_cocina_ajo)
|
||||
|
||||
@@ -95,6 +95,7 @@ process_mode = 1
|
||||
position = Vector2(302.5, 0)
|
||||
script = ExtResource("6")
|
||||
global_id = "cocina_puerta_detras"
|
||||
custom_cursor = "north"
|
||||
esc_script = "res://gymkhana/rooms/turno_cocina/cocina/esc/puerta_detras.esc"
|
||||
combine_when_selected_action_is_in = PackedStringArray()
|
||||
is_exit = true
|
||||
@@ -119,6 +120,7 @@ process_mode = 1
|
||||
position = Vector2(302.5, 0)
|
||||
script = ExtResource("6")
|
||||
global_id = "cocina_puerta_delante"
|
||||
custom_cursor = "east"
|
||||
esc_script = "res://gymkhana/rooms/turno_cocina/cocina/esc/puerta_delante.esc"
|
||||
combine_when_selected_action_is_in = PackedStringArray()
|
||||
is_exit = true
|
||||
|
||||
@@ -13,5 +13,6 @@
|
||||
set_active($turno_cocina_jarra_volcada, true)
|
||||
play_video("res://gymkhana/videos/turno_cocina/oier_moja_el_pan.ogv")
|
||||
say($player, "Voy a avisarle a Eneko, espero que no me eche la bronca.", "cocina_jarra_action2_say")
|
||||
accept_input("NONE")
|
||||
walk_block($player, $puerta_delante_start)
|
||||
queue_event($cocina_puerta_delante, "action1")
|
||||
|
||||
@@ -51,6 +51,7 @@ process_mode = 1
|
||||
script = ExtResource("6")
|
||||
with_is_picked_component = null
|
||||
global_id = "cocina_delante_puerta_cocina"
|
||||
custom_cursor = "north"
|
||||
esc_script = "res://gymkhana/rooms/turno_cocina/cocina_delante/esc/puerta_cocina.esc"
|
||||
combine_when_selected_action_is_in = PackedStringArray()
|
||||
is_exit = true
|
||||
@@ -75,6 +76,7 @@ process_mode = 1
|
||||
script = ExtResource("6")
|
||||
with_is_picked_component = null
|
||||
global_id = "cocina_delante_puerta_despensa"
|
||||
custom_cursor = "west"
|
||||
esc_script = "res://gymkhana/rooms/turno_cocina/cocina_delante/esc/puerta_despensa.esc"
|
||||
combine_when_selected_action_is_in = PackedStringArray()
|
||||
is_exit = true
|
||||
@@ -99,6 +101,7 @@ process_mode = 1
|
||||
script = ExtResource("6")
|
||||
with_is_picked_component = null
|
||||
global_id = "cocina_delante_puerta_detras"
|
||||
custom_cursor = "north"
|
||||
esc_script = "res://gymkhana/rooms/turno_cocina/cocina_delante/esc/puerta_detras.esc"
|
||||
combine_when_selected_action_is_in = PackedStringArray()
|
||||
is_exit = true
|
||||
|
||||
@@ -47,21 +47,25 @@
|
||||
accept_input("SKIP")
|
||||
queue_event($eneko_smoking, "intro_dialog", "intro_dialog_channel", true)
|
||||
set_gui_visible(true)
|
||||
accept_input("NONE")
|
||||
walk_block($player, $puerta_cocina_start)
|
||||
# Go to cocina
|
||||
queue_event($cocina_delante_puerta_cocina, "action1", "intro_dialog_channel", true)
|
||||
accept_input("ALL")
|
||||
|
||||
if intro_dialog2_playing:
|
||||
accept_input("SKIP")
|
||||
accept_input("NONE")
|
||||
walk_block($player, $new_game_start_location)
|
||||
accept_input("SKIP")
|
||||
set_angle($player,90)
|
||||
queue_event($eneko_smoking, "intro_dialog2", "intro_dialog2_channel", true)
|
||||
accept_input("ALL")
|
||||
set_global("intro_dialog2_playing", false)
|
||||
|
||||
if turno_cocina_pan_mojado_playing:
|
||||
accept_input("NONE")
|
||||
walk_block($player,$new_game_start_location)
|
||||
accept_input("SKIP")
|
||||
set_angle($player, 90)
|
||||
queue_event($eneko_smoking, "pan_mojado_dialog", "pan_mojado_dialog_channel", true)
|
||||
accept_input("ALL")
|
||||
|
||||
@@ -46,6 +46,7 @@ navigation_polygon = SubResource("1")
|
||||
process_mode = 1
|
||||
script = ExtResource("6")
|
||||
global_id = "cocina_detras_puerta_cocina"
|
||||
custom_cursor = "north"
|
||||
esc_script = "res://gymkhana/rooms/turno_cocina/cocina_detras/esc/puerta_cocina.esc"
|
||||
combine_when_selected_action_is_in = PackedStringArray()
|
||||
is_exit = true
|
||||
@@ -69,6 +70,7 @@ global_id = "cocina_detras_puerta_cocina_start"
|
||||
process_mode = 1
|
||||
script = ExtResource("6")
|
||||
global_id = "cocina_detras_puerta_delante"
|
||||
custom_cursor = "north"
|
||||
esc_script = "res://gymkhana/rooms/turno_cocina/cocina_detras/esc/puerta_delante.esc"
|
||||
combine_when_selected_action_is_in = PackedStringArray()
|
||||
is_exit = true
|
||||
|
||||
@@ -9,4 +9,5 @@
|
||||
|
||||
:ready
|
||||
play_snd("res://gymkhana/sounds/birds_ambient_loop.ogg", _ambient)
|
||||
debug_time_stop()
|
||||
debug_time_stop()
|
||||
#accept_input("NONE")
|
||||
@@ -6,8 +6,10 @@
|
||||
say($player, "Parece que veo a mikel, voy a saludarle!", "cocina_detra_mikel_action1_say")
|
||||
if turno_cocina_mikel_played_times < 3:
|
||||
set_global("turno_cocina_mikel_playing", true)
|
||||
accept_input("NONE")
|
||||
walk_block($player, $cocina_detras_puerta_cocina_start)
|
||||
queue_event("cocina_detras_puerta_cocina", "open")
|
||||
accept_input("ALL")
|
||||
else:
|
||||
block_say()
|
||||
say_to_camera($player, "Ya lo he intentado varias veces!", "cocina_detra_mikel_action1_say_no_1")
|
||||
|
||||
@@ -43,6 +43,7 @@ process_mode = 1
|
||||
position = Vector2(863, 175)
|
||||
script = ExtResource("6")
|
||||
global_id = "turno_cocina_despensa_puerta_exterior"
|
||||
custom_cursor = "east"
|
||||
esc_script = "res://gymkhana/rooms/turno_cocina/despensa/esc/puerta_exterior.esc"
|
||||
combine_when_selected_action_is_in = PackedStringArray()
|
||||
is_exit = true
|
||||
|
||||
613
patches/input_manager_signal.patch
Normal file
@@ -0,0 +1,613 @@
|
||||
diff --git a/addons/escoria-core/game/esc_inputs_manager.gd b/addons/escoria-core/game/esc_inputs_manager.gd
|
||||
index c24588eb..b4b8a85d 100644
|
||||
--- a/addons/escoria-core/game/esc_inputs_manager.gd
|
||||
+++ b/addons/escoria-core/game/esc_inputs_manager.gd
|
||||
@@ -3,6 +3,9 @@
|
||||
extends Resource
|
||||
class_name ESCInputsManager
|
||||
|
||||
+## Emitted when input mode changes.
|
||||
+signal input_mode_changed(new_mode)
|
||||
+
|
||||
## Valid input flags.[br]
|
||||
## INPUT_ALL: All input is allowed.[br]
|
||||
## INPUT_NONE: No input is allowed at all.[br]
|
||||
@@ -22,7 +25,12 @@ const ESC_SHOW_DEBUG_PROMPT = "esc_show_debug_prompt"
|
||||
const ESC_UI_PRIMARY_ACTION = "esc_ui_primary_action"
|
||||
|
||||
## The current input mode.
|
||||
-var input_mode = INPUT_ALL
|
||||
+var input_mode = INPUT_ALL:
|
||||
+ get:
|
||||
+ return input_mode
|
||||
+ set(new_mode):
|
||||
+ input_mode = new_mode
|
||||
+ input_mode_changed.emit(new_mode)
|
||||
|
||||
## A LIFO stack of hovered items.
|
||||
var hover_stack: HoverStack
|
||||
@@ -46,12 +54,14 @@ var custom_input_handler = null
|
||||
## The currently hovered element. Usually the one on top of the hover stack.
|
||||
var _hovered_element = null
|
||||
|
||||
+
|
||||
## Constructor.
|
||||
func _init():
|
||||
escoria.event_manager.connect("event_finished", Callable(self, "_on_event_finished"))
|
||||
hover_stack = HoverStack.new()
|
||||
hover_stack.connect("hover_stack_changed", Callable(self, "_on_hover_stack_changed"))
|
||||
|
||||
+
|
||||
## Called when an event is finished, so that the current hotspot is reset.[br]
|
||||
## [br]
|
||||
## #### Parameters[br]
|
||||
@@ -62,10 +72,12 @@ func _on_event_finished(return_code: int, event_name: String):
|
||||
if _hovered_element == null:
|
||||
hotspot_focused = ""
|
||||
|
||||
+
|
||||
## Register core signals (from escoria.gd).
|
||||
func register_core():
|
||||
escoria.game_scene.request_pause_menu.connect(_on_pause_menu_requested)
|
||||
|
||||
+
|
||||
## Connect the item signals to the local methods.[br]
|
||||
## [br]
|
||||
## #### Parameters[br]
|
||||
@@ -78,6 +90,7 @@ func register_inventory_item(item: Node):
|
||||
item.inventory_item_focused.connect(_on_mouse_entered_inventory_item)
|
||||
item.inventory_item_unfocused.connect(_on_mouse_exited_inventory_item)
|
||||
|
||||
+
|
||||
## Connect background signals to local methods.[br]
|
||||
## [br]
|
||||
## #### Parameters[br]
|
||||
@@ -103,7 +116,7 @@ func register_background(background: ESCBackground):
|
||||
## - is_default_state: Whether the current state is escoria.GAME_STATE.DEFAULT[br]
|
||||
## - returns whether the function processed the event[br]
|
||||
##[br]
|
||||
-## `callback` is responsible for calling `get_tree().set_input_as_handled()`,
|
||||
+## `callback` is responsible for calling `get_tree().set_input_as_handled()`,
|
||||
## if appropriate.[br]
|
||||
##[br]
|
||||
## #### Parameters[br]
|
||||
@@ -111,6 +124,7 @@ func register_background(background: ESCBackground):
|
||||
func register_custom_input_handler(callback) -> void:
|
||||
custom_input_handler = callback
|
||||
|
||||
+
|
||||
## If a callback was specified via register_custom_input_handler(),[br]
|
||||
## forwards the event to the callback and returns its result; otherwise,[br]
|
||||
## returns false.[br]
|
||||
@@ -127,6 +141,7 @@ func try_custom_input_handler(event: InputEvent, is_default_state: bool) -> bool
|
||||
else:
|
||||
return false
|
||||
|
||||
+
|
||||
## Callback called by hover stack content change.
|
||||
func _on_hover_stack_changed():
|
||||
if hover_stack.is_empty():
|
||||
@@ -134,6 +149,7 @@ func _on_hover_stack_changed():
|
||||
else:
|
||||
set_hovered_node(hover_stack.get_top_item())
|
||||
|
||||
+
|
||||
## Sets the hovered node and calls its mouse_entered() method if it was the top[br]
|
||||
## most item in hover_stack.[br]
|
||||
## [br]
|
||||
@@ -143,17 +159,20 @@ func _on_hover_stack_changed():
|
||||
## [br]
|
||||
## *Returns* True if item is the new top hovered object.[br]
|
||||
func set_hovered_node(item: ESCItem) -> bool:
|
||||
- if _hovered_element != item \
|
||||
- and escoria.action_manager.is_object_actionable(item.global_id) \
|
||||
- or (item is ESCPlayer and not (item as ESCPlayer).selectable):
|
||||
+ if (
|
||||
+ _hovered_element != item and escoria.action_manager.is_object_actionable(item.global_id)
|
||||
+ or (item is ESCPlayer and not (item as ESCPlayer).selectable)
|
||||
+ ):
|
||||
_hovered_element = item
|
||||
_hovered_element.mouse_entered()
|
||||
return true
|
||||
# If tested item was already hovered
|
||||
# or is not actionable (not selectable for ESCPlayer) then do nothing
|
||||
- if _hovered_element == item \
|
||||
- or not escoria.action_manager.is_object_actionable(item.global_id) \
|
||||
- or (item is ESCPlayer and not (item as ESCPlayer).selectable):
|
||||
+ if (
|
||||
+ _hovered_element == item
|
||||
+ or not escoria.action_manager.is_object_actionable(item.global_id)
|
||||
+ or (item is ESCPlayer and not (item as ESCPlayer).selectable)
|
||||
+ ):
|
||||
return true
|
||||
if not is_instance_valid(_hovered_element) or hover_stack.get_top_item() != item:
|
||||
_hovered_element = item
|
||||
@@ -163,6 +182,7 @@ func set_hovered_node(item: ESCItem) -> bool:
|
||||
else:
|
||||
return false
|
||||
|
||||
+
|
||||
## Unsets the hovered node.[br]
|
||||
## [br]
|
||||
## #### Parameters[br]
|
||||
@@ -176,10 +196,12 @@ func unset_hovered_node(item: ESCItem):
|
||||
_hovered_element = null
|
||||
hotspot_focused = ""
|
||||
|
||||
+
|
||||
## Background was hovered.
|
||||
func _on_hover_bg() -> void:
|
||||
escoria.main.current_scene.game.hovered_bg()
|
||||
|
||||
+
|
||||
## The background was clicked with the LMB.[br]
|
||||
## [br]
|
||||
## #### Parameters[br]
|
||||
@@ -188,12 +210,10 @@ func _on_hover_bg() -> void:
|
||||
func _on_left_click_on_bg(position: Vector2) -> void:
|
||||
if input_mode == INPUT_ALL:
|
||||
hotspot_focused = ""
|
||||
- escoria.logger.info(
|
||||
- self,
|
||||
- "Left click on background at %s." % str(position)
|
||||
- )
|
||||
+ escoria.logger.info(self, "Left click on background at %s." % str(position))
|
||||
escoria.main.current_scene.game.left_click_on_bg(position)
|
||||
|
||||
+
|
||||
## The background was double-clicked with the LMB.[br]
|
||||
## [br]
|
||||
## #### Parameters[br]
|
||||
@@ -202,12 +222,10 @@ func _on_left_click_on_bg(position: Vector2) -> void:
|
||||
func _on_double_left_click_on_bg(position: Vector2) -> void:
|
||||
if input_mode == INPUT_ALL:
|
||||
hotspot_focused = ""
|
||||
- escoria.logger.info(
|
||||
- self,
|
||||
- "Double left click on background at %s." % str(position)
|
||||
- )
|
||||
+ escoria.logger.info(self, "Double left click on background at %s." % str(position))
|
||||
escoria.main.current_scene.game.left_double_click_on_bg(position)
|
||||
|
||||
+
|
||||
## The background was clicked with the RMB.[br]
|
||||
## [br]
|
||||
## #### Parameters[br]
|
||||
@@ -215,12 +233,10 @@ func _on_double_left_click_on_bg(position: Vector2) -> void:
|
||||
## - position: Position of the click.
|
||||
func _on_right_click_on_bg(position: Vector2) -> void:
|
||||
if input_mode == INPUT_ALL and hotspot_focused.is_empty():
|
||||
- escoria.logger.info(
|
||||
- self,
|
||||
- "Right click on background at %s." % str(position)
|
||||
- )
|
||||
+ escoria.logger.info(self, "Right click on background at %s." % str(position))
|
||||
escoria.main.current_scene.game.right_click_on_bg(position)
|
||||
|
||||
+
|
||||
## An inventory item was clicked with the LMB.[br]
|
||||
## [br]
|
||||
## #### Parameters[br]
|
||||
@@ -228,17 +244,11 @@ func _on_right_click_on_bg(position: Vector2) -> void:
|
||||
## - inventory_item_global_id: The global id of the clicked inventory item.[br]
|
||||
## - event: The input event received.
|
||||
func _on_mouse_left_click_inventory_item(
|
||||
- inventory_item_global_id: String,
|
||||
- event: InputEvent
|
||||
+ inventory_item_global_id: String, event: InputEvent
|
||||
) -> void:
|
||||
- escoria.logger.info(
|
||||
- self,
|
||||
- "Inventory item %s left clicked." % inventory_item_global_id
|
||||
- )
|
||||
- escoria.main.current_scene.game.left_click_on_inventory_item(
|
||||
- inventory_item_global_id,
|
||||
- event
|
||||
- )
|
||||
+ escoria.logger.info(self, "Inventory item %s left clicked." % inventory_item_global_id)
|
||||
+ escoria.main.current_scene.game.left_click_on_inventory_item(inventory_item_global_id, event)
|
||||
+
|
||||
|
||||
## An inventory item was clicked with the RMB.[br]
|
||||
## [br]
|
||||
@@ -247,19 +257,15 @@ func _on_mouse_left_click_inventory_item(
|
||||
## - inventory_item_global_id: The global id of the clicked inventory item.[br]
|
||||
## - event: The input event received.
|
||||
func _on_mouse_right_click_inventory_item(
|
||||
- inventory_item_global_id: String,
|
||||
- event: InputEvent
|
||||
+ inventory_item_global_id: String, event: InputEvent
|
||||
) -> void:
|
||||
if input_mode == INPUT_ALL:
|
||||
- escoria.logger.info(
|
||||
- self,
|
||||
- "Inventory item %s right clicked." % inventory_item_global_id
|
||||
- )
|
||||
+ escoria.logger.info(self, "Inventory item %s right clicked." % inventory_item_global_id)
|
||||
escoria.main.current_scene.game.right_click_on_inventory_item(
|
||||
- inventory_item_global_id,
|
||||
- event
|
||||
+ inventory_item_global_id, event
|
||||
)
|
||||
|
||||
+
|
||||
## An inventory item was double-clicked with the LMB.[br]
|
||||
## [br]
|
||||
## #### Parameters[br]
|
||||
@@ -267,41 +273,33 @@ func _on_mouse_right_click_inventory_item(
|
||||
## - inventory_item_global_id: The global id of the clicked inventory item.[br]
|
||||
## - event: The input event received.
|
||||
func _on_mouse_double_left_click_inventory_item(
|
||||
- inventory_item_global_id: String,
|
||||
- event: InputEvent
|
||||
+ inventory_item_global_id: String, event: InputEvent
|
||||
) -> void:
|
||||
if input_mode == INPUT_ALL:
|
||||
escoria.logger.info(
|
||||
- self,
|
||||
- "Inventory item %s double left clicked." % inventory_item_global_id
|
||||
+ self, "Inventory item %s double left clicked." % inventory_item_global_id
|
||||
)
|
||||
escoria.main.current_scene.game.left_double_click_on_inventory_item(
|
||||
- inventory_item_global_id,
|
||||
- event
|
||||
+ inventory_item_global_id, event
|
||||
)
|
||||
|
||||
+
|
||||
## The mouse entered an inventory item.[br]
|
||||
## [br]
|
||||
## #### Parameters[br]
|
||||
## [br]
|
||||
## - inventory_item_global_id: The global id of the inventory item that is hovered.
|
||||
func _on_mouse_entered_inventory_item(inventory_item_global_id: String) -> void:
|
||||
- escoria.logger.info(
|
||||
- self,
|
||||
- "Inventory item %s focused." % inventory_item_global_id
|
||||
- )
|
||||
- escoria.main.current_scene.game.inventory_item_focused(
|
||||
- inventory_item_global_id
|
||||
- )
|
||||
+ escoria.logger.info(self, "Inventory item %s focused." % inventory_item_global_id)
|
||||
+ escoria.main.current_scene.game.inventory_item_focused(inventory_item_global_id)
|
||||
+
|
||||
|
||||
## The mouse exited an inventory item.
|
||||
func _on_mouse_exited_inventory_item() -> void:
|
||||
- escoria.logger.info(
|
||||
- self,
|
||||
- "Inventory item unfocused."
|
||||
- )
|
||||
+ escoria.logger.info(self, "Inventory item unfocused.")
|
||||
escoria.main.current_scene.game.inventory_item_unfocused()
|
||||
|
||||
+
|
||||
## The mouse entered an Escoria item.[br]
|
||||
## [br]
|
||||
## #### Parameters[br]
|
||||
@@ -310,8 +308,7 @@ func _on_mouse_exited_inventory_item() -> void:
|
||||
func _on_mouse_entered_item(item: ESCItem) -> void:
|
||||
if item as ESCPlayer and not (item as ESCPlayer).selectable:
|
||||
escoria.logger.trace(
|
||||
- self,
|
||||
- "Ignoring mouse entering player %s: Player not selectable." % [item.global_id]
|
||||
+ self, "Ignoring mouse entering player %s: Player not selectable." % [item.global_id]
|
||||
)
|
||||
if hover_stack.is_empty():
|
||||
hotspot_focused = ""
|
||||
@@ -322,20 +319,15 @@ func _on_mouse_entered_item(item: ESCItem) -> void:
|
||||
return
|
||||
|
||||
if not escoria.action_manager.is_object_actionable(item.global_id):
|
||||
- escoria.logger.debug(
|
||||
- self,
|
||||
- "Ignoring mouse entering item %s." % [item.global_id]
|
||||
- )
|
||||
+ escoria.logger.debug(self, "Ignoring mouse entering item %s." % [item.global_id])
|
||||
return
|
||||
|
||||
- escoria.logger.info(
|
||||
- self,
|
||||
- "Item focused: %s" % item.global_id
|
||||
- )
|
||||
+ escoria.logger.info(self, "Item focused: %s" % item.global_id)
|
||||
|
||||
hotspot_focused = item.global_id
|
||||
escoria.main.current_scene.game.element_focused(item.global_id)
|
||||
|
||||
+
|
||||
## The mouse exited an Escoria item.[br]
|
||||
## [br]
|
||||
## #### Parameters[br]
|
||||
@@ -350,14 +342,16 @@ func _on_mouse_exited_item(item: ESCItem) -> void:
|
||||
|
||||
if object and not object.interactive:
|
||||
return
|
||||
- if object and is_instance_valid(object.node) and object.node is ESCPlayer and not (object.node as ESCPlayer).selectable:
|
||||
+ if (
|
||||
+ object
|
||||
+ and is_instance_valid(object.node)
|
||||
+ and object.node is ESCPlayer
|
||||
+ and not (object.node as ESCPlayer).selectable
|
||||
+ ):
|
||||
hotspot_focused = ""
|
||||
return
|
||||
|
||||
- escoria.logger.info(
|
||||
- self,
|
||||
- "Item unfocused: %s" % hotspot_focused
|
||||
- )
|
||||
+ escoria.logger.info(self, "Item unfocused: %s" % hotspot_focused)
|
||||
|
||||
if hover_stack.is_empty():
|
||||
hotspot_focused = ""
|
||||
@@ -366,6 +360,7 @@ func _on_mouse_exited_item(item: ESCItem) -> void:
|
||||
hotspot_focused = hover_stack.get_top_item().global_id
|
||||
escoria.main.current_scene.game.element_focused(hotspot_focused)
|
||||
|
||||
+
|
||||
## Function called when the item is set interactive, to re-trigger an input on[br]
|
||||
## underlying item.[br]
|
||||
## [br]
|
||||
@@ -382,9 +377,12 @@ func on_item_non_interactive(item: ESCItem) -> void:
|
||||
return
|
||||
else:
|
||||
var new_item = hover_stack.get_top_item()
|
||||
- escoria.action_manager.set_action_input_state(ESCActionManager.ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM)
|
||||
+ escoria.action_manager.set_action_input_state(
|
||||
+ ESCActionManager.ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM
|
||||
+ )
|
||||
new_item.mouse_entered()
|
||||
|
||||
+
|
||||
## An Escoria item was clicked with the LMB.[br]
|
||||
## [br]
|
||||
## #### Parameters[br]
|
||||
@@ -396,34 +394,32 @@ func _on_mouse_left_clicked_item(item: ESCItem, event: InputEvent) -> void:
|
||||
# Manage clicking through ESCPlayer (if ESCPlayer.selectable is false)
|
||||
if item as ESCPlayer and not (item as ESCPlayer).selectable:
|
||||
escoria.logger.trace(
|
||||
- self,
|
||||
- "Ignoring left click on player %s: Player not selectable."
|
||||
- % [item.global_id]
|
||||
+ self, "Ignoring left click on player %s: Player not selectable." % [item.global_id]
|
||||
)
|
||||
|
||||
# Get next object in hover stack and forward event to it
|
||||
if not hover_stack.is_empty():
|
||||
var next_item = hover_stack.pop_top_item()
|
||||
_on_mouse_left_clicked_item(next_item, event)
|
||||
- else: # if no next object, consider this click as background click
|
||||
+ else: # if no next object, consider this click as background click
|
||||
hotspot_focused = ""
|
||||
_on_left_click_on_bg(event.position)
|
||||
return
|
||||
|
||||
# Clicked object can't be actioned and there is no other object behind
|
||||
# We consider this click as a background click
|
||||
- if not escoria.action_manager.is_object_actionable(item.global_id) \
|
||||
- and hover_stack.is_empty():
|
||||
+ if (
|
||||
+ not escoria.action_manager.is_object_actionable(item.global_id)
|
||||
+ and hover_stack.is_empty()
|
||||
+ ):
|
||||
hotspot_focused = ""
|
||||
_on_left_click_on_bg(event.position)
|
||||
return
|
||||
|
||||
# Finally, execute the action on the ESCItem
|
||||
hotspot_focused = item.global_id
|
||||
- escoria.main.current_scene.game.left_click_on_item(
|
||||
- item.global_id,
|
||||
- event
|
||||
- )
|
||||
+ escoria.main.current_scene.game.left_click_on_item(item.global_id, event)
|
||||
+
|
||||
|
||||
## An Escoria item was double-clicked with the LMB.[br]
|
||||
## [br]
|
||||
@@ -431,42 +427,38 @@ func _on_mouse_left_clicked_item(item: ESCItem, event: InputEvent) -> void:
|
||||
## [br]
|
||||
## - item: The Escoria item clicked.[br]
|
||||
## - event: The input event from the click.
|
||||
-func _on_mouse_left_double_clicked_item(
|
||||
- item: ESCItem,
|
||||
- event: InputEvent
|
||||
-) -> void:
|
||||
+func _on_mouse_left_double_clicked_item(item: ESCItem, event: InputEvent) -> void:
|
||||
if input_mode == INPUT_ALL:
|
||||
# Manage clicking through ESCPlayer (if ESCPlayer.selectable is false)
|
||||
if item as ESCPlayer and not (item as ESCPlayer).selectable:
|
||||
escoria.logger.trace(
|
||||
self,
|
||||
- "Ignoring double left click on player %s: Player not selectable."
|
||||
- % [item.global_id]
|
||||
+ "Ignoring double left click on player %s: Player not selectable." % [item.global_id]
|
||||
)
|
||||
|
||||
# Get next object in hover stack and forward event to it
|
||||
if not hover_stack.is_empty():
|
||||
var next_item = hover_stack.pop_top_item()
|
||||
_on_mouse_left_double_clicked_item(next_item, event)
|
||||
- else: # if no next object, consider this click as background click
|
||||
+ else: # if no next object, consider this click as background click
|
||||
hotspot_focused = ""
|
||||
_on_double_left_click_on_bg(event.position)
|
||||
return
|
||||
|
||||
# Clicked object can't be actioned and there is no other object behind
|
||||
# We consider this click as a background click
|
||||
- if not escoria.action_manager.is_object_actionable(item.global_id) \
|
||||
- and hover_stack.is_empty():
|
||||
+ if (
|
||||
+ not escoria.action_manager.is_object_actionable(item.global_id)
|
||||
+ and hover_stack.is_empty()
|
||||
+ ):
|
||||
hotspot_focused = ""
|
||||
_on_double_left_click_on_bg(event.position)
|
||||
return
|
||||
|
||||
# Finally, execute the action on the ESCItem
|
||||
hotspot_focused = item.global_id
|
||||
- escoria.main.current_scene.game.left_double_click_on_item(
|
||||
- item.global_id,
|
||||
- event
|
||||
- )
|
||||
+ escoria.main.current_scene.game.left_double_click_on_item(item.global_id, event)
|
||||
+
|
||||
|
||||
## An Escoria item was clicked with the RMB.[br]
|
||||
## [br]
|
||||
@@ -478,8 +470,7 @@ func _on_mouse_right_clicked_item(item: ESCItem, event: InputEvent) -> void:
|
||||
if input_mode == INPUT_ALL:
|
||||
if item as ESCPlayer and not (item as ESCPlayer).selectable:
|
||||
escoria.logger.debug(
|
||||
- self,
|
||||
- "Ignoring right click on player %s: Player not selectable." % [item.global_id]
|
||||
+ self, "Ignoring right click on player %s: Player not selectable." % [item.global_id]
|
||||
)
|
||||
|
||||
if not hover_stack.is_empty():
|
||||
@@ -487,9 +478,11 @@ func _on_mouse_right_clicked_item(item: ESCItem, event: InputEvent) -> void:
|
||||
_on_mouse_right_clicked_item(next_item, event)
|
||||
return
|
||||
|
||||
- if not escoria.action_manager.is_object_actionable(item.global_id) \
|
||||
- and hover_stack.is_empty():
|
||||
- # Treat this as a background click now
|
||||
+ if (
|
||||
+ not escoria.action_manager.is_object_actionable(item.global_id)
|
||||
+ and hover_stack.is_empty()
|
||||
+ ):
|
||||
+ # Treat this as a background click now
|
||||
hotspot_focused = ""
|
||||
_on_right_click_on_bg(event.position)
|
||||
return
|
||||
@@ -508,22 +501,27 @@ func _on_mouse_right_clicked_item(item: ESCItem, event: InputEvent) -> void:
|
||||
if event.position:
|
||||
(escoria.main.current_scene.game as ESCGame).right_click_on_bg(event.position)
|
||||
else:
|
||||
- escoria.logger.info(
|
||||
- self,
|
||||
- "Clicked item %s with event %s cannot be activated (player not selectable or not interactive).\n"
|
||||
- % [item.global_id, event] +
|
||||
- "No valid item found in the items stack. Action canceled."
|
||||
+ (
|
||||
+ escoria
|
||||
+ . logger
|
||||
+ . info(
|
||||
+ self,
|
||||
+ (
|
||||
+ (
|
||||
+ "Clicked item %s with event %s cannot be activated (player not selectable or not interactive).\n"
|
||||
+ % [item.global_id, event]
|
||||
+ )
|
||||
+ + "No valid item found in the items stack. Action canceled."
|
||||
+ )
|
||||
+ )
|
||||
)
|
||||
else:
|
||||
escoria.logger.info(
|
||||
- self,
|
||||
- "Item %s right clicked with event %s." % [actual_item.global_id, event]
|
||||
+ self, "Item %s right clicked with event %s." % [actual_item.global_id, event]
|
||||
)
|
||||
hotspot_focused = actual_item.global_id
|
||||
- escoria.main.current_scene.game.right_click_on_item(
|
||||
- actual_item.global_id,
|
||||
- event
|
||||
- )
|
||||
+ escoria.main.current_scene.game.right_click_on_item(actual_item.global_id, event)
|
||||
+
|
||||
|
||||
## The mousewheel was turned.[br]
|
||||
## [br]
|
||||
@@ -533,13 +531,14 @@ func _on_mouse_right_clicked_item(item: ESCItem, event: InputEvent) -> void:
|
||||
func _on_mousewheel_action(direction: int):
|
||||
escoria.main.current_scene.game.mousewheel_action(direction)
|
||||
|
||||
+
|
||||
## Event when the pause menu was requested.
|
||||
func _on_pause_menu_requested():
|
||||
escoria.main.current_scene.game.pause_game()
|
||||
|
||||
+
|
||||
## Hover Stack implementation.
|
||||
class HoverStack:
|
||||
-
|
||||
## Emitted when the content of the hover stack has changed.
|
||||
signal hover_stack_changed
|
||||
|
||||
@@ -562,7 +561,6 @@ class HoverStack:
|
||||
_sort()
|
||||
hover_stack_changed.emit()
|
||||
|
||||
-
|
||||
## Add the items contained in given list to the stack if not already in it.[br]
|
||||
## [br]
|
||||
## #### Parameters[br]
|
||||
@@ -573,7 +571,6 @@ class HoverStack:
|
||||
if escoria.action_manager.is_object_actionable(item.global_id):
|
||||
add_item(item)
|
||||
|
||||
-
|
||||
## Clean the hover stack.
|
||||
func clean():
|
||||
for e in hover_stack:
|
||||
@@ -581,7 +578,6 @@ class HoverStack:
|
||||
hover_stack.erase(e)
|
||||
hover_stack_changed.emit()
|
||||
|
||||
-
|
||||
## Pops the top element of the hover stack and returns it.[br]
|
||||
## [br]
|
||||
## *Returns* The top element of the hover stack.
|
||||
@@ -591,14 +587,12 @@ class HoverStack:
|
||||
hover_stack_changed.emit()
|
||||
return ret
|
||||
|
||||
-
|
||||
## Returns the top element of the hover stack.[br]
|
||||
## [br]
|
||||
## *Returns* The top element of the hover stack.
|
||||
func get_top_item():
|
||||
return hover_stack.back()
|
||||
|
||||
-
|
||||
## Remove the given item from the stack.[br]
|
||||
## [br]
|
||||
## #### Parameters[br]
|
||||
@@ -610,25 +604,21 @@ class HoverStack:
|
||||
_sort()
|
||||
hover_stack_changed.emit()
|
||||
|
||||
-
|
||||
## Clear the stack of hovered items.
|
||||
func clear():
|
||||
hover_stack = []
|
||||
hover_stack_emptied.emit()
|
||||
|
||||
-
|
||||
## Returns true if the hover stack is empty, else false.[br]
|
||||
## [br]
|
||||
## *Returns* True if hover stack is empty, else false.
|
||||
func is_empty() -> bool:
|
||||
return hover_stack.is_empty()
|
||||
|
||||
-
|
||||
## Sort the hover stack by items' z-index.
|
||||
func _sort():
|
||||
hover_stack.sort_custom(Callable(HoverStackSorter, "sort_ascending_z_index"))
|
||||
|
||||
-
|
||||
## Returns true if the hover stack contains the given item.[br]
|
||||
## [br]
|
||||
## #### Parameters[br]
|
||||
@@ -639,7 +629,6 @@ class HoverStack:
|
||||
func has(item) -> bool:
|
||||
return hover_stack.has(item)
|
||||
|
||||
-
|
||||
## Returns the hover stack array.
|
||||
## [br]
|
||||
## *Returns* The hover stack array.
|
||||
@@ -39,7 +39,7 @@ settings/gdscript/always_track_local_variables=true
|
||||
window/size/viewport_width=1280
|
||||
window/size/viewport_height=720
|
||||
window/stretch/mode="canvas_items"
|
||||
mouse_cursor/custom_image="uid://c1s8ssk083h8y"
|
||||
mouse_cursor/custom_image="uid://d3sbd3d03f2ua"
|
||||
|
||||
[editor]
|
||||
|
||||
|
||||