Simplemouse fixes (#669)

* fix: Simplemouse bounding box size fix
* fix: Bug when exiting game with simplemouse with disconnecting non-connected gamepad
* fix: issue-339. Simplemouse gives an error in the debug when you move on/off ESCItems
* fix: tracks mouse position to allow for mouse tracking as well as on-demand tooltip updates on immediate target change, i.e. rendering doesn't lag a frame behind.
* chore: decouple further by using a signal
* fix: Correct action getting randomly lost with simplemouse
* fix: deleted objects aren't always equated to null.
* fix: clear the tooltip when an action is finished.
* fix: clears tooltip only on successful event completion; debug code cleanup.
* Broken room 5
* fix: Item collisions correctly determined when game resolution = screen resolution
* Update addons/escoria-core/game/core-scripts/esc_item.gd
Co-authored-by: Duncan Brown <duncan@prometheussoftware.ca>
* Update addons/escoria-ui-simplemouse/game.gd
Co-authored-by: Duncan Brown <duncan@prometheussoftware.ca>
* fix: Reverted default UI to 9 verbs
Co-authored-by: Balloonpopper <balloonpopper@git.com>
Co-authored-by: Duncan Brown <duncan@prometheussoftware.ca>
This commit is contained in:
balloonpopper
2023-01-12 22:38:06 +11:00
committed by GitHub
parent 68220ced91
commit 53c900b36e
10 changed files with 71 additions and 70 deletions

View File

@@ -3,15 +3,9 @@
[ext_resource path="res://addons/escoria-ui-simplemouse/tooltip/tooltip_target.gd" type="Script" id=2]
[node name="tooltip" type="RichTextLabel"]
margin_right = 200.0
margin_bottom = 32.0
rect_min_size = Vector2( 200, 32 )
bbcode_enabled = true
bbcode_text = "[center][color=#ffffff][/color][/center]"
scroll_active = false
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
color = Color( 1, 1, 1, 1 )
offset_from_cursor = Vector2( 100, 10 )
offset_from_cursor = Vector2( 0, 0 )

View File

@@ -1,6 +1,21 @@
extends ESCTooltip
signal tooltip_size_updated
func update_tooltip_text():
# Need to update size of bbcode rect before updating the text itself otherwise on the
# first frame the text is wider than the default of 0 and ends up being really tall
# and setting the wrong vertical margin for the tooltip
update_size()
# We signal this here since the processing in this class happens AFTER input
# processing. We signal here to avoid "lagging" behind a frame since
# tooltips are presently dependent on the size of the bounding box around
# the rendered string.
emit_signal("tooltip_size_updated")
bbcode_text = "[center]"
bbcode_text += "[color=#" + color.to_html(false) + "]"
bbcode_text += current_target
@@ -11,4 +26,3 @@ func update_tooltip_text():
# append_bbcode(current_target)
# pop()
# pop()
update_size()