Tooltip offset for action3 & action4. #17
This commit is contained in:
@@ -25,6 +25,10 @@ export(Vector2) var offset_from_cursor_action1 = Vector2(0,3)
|
|||||||
|
|
||||||
export(Vector2) var offset_from_cursor_action2 = Vector2(0,-2)
|
export(Vector2) var offset_from_cursor_action2 = Vector2(0,-2)
|
||||||
|
|
||||||
|
export(Vector2) var offset_from_cursor_action3 = Vector2(0,3)
|
||||||
|
|
||||||
|
export(Vector2) var offset_from_cursor_action4 = Vector2(0,-2)
|
||||||
|
|
||||||
# Activates debug mode. If enabled, shows the label with a white background.
|
# Activates debug mode. If enabled, shows the label with a white background.
|
||||||
export(bool) var debug_mode = false setget set_debug_mode
|
export(bool) var debug_mode = false setget set_debug_mode
|
||||||
|
|
||||||
|
|||||||
@@ -407,8 +407,12 @@ func get_custom_data() -> Dictionary:
|
|||||||
func update_tooltip_following_mouse_position(tooltip: ESCRichTooltip):
|
func update_tooltip_following_mouse_position(tooltip: ESCRichTooltip):
|
||||||
if tooltip == null:
|
if tooltip == null:
|
||||||
return
|
return
|
||||||
|
if(escoria.action_manager.current_tool == null):
|
||||||
set_tooltip_position("tooltip1", tooltip, tooltip.get_tooltip1_size(), tooltip.offset_from_cursor_action1)
|
set_tooltip_position("tooltip1", tooltip, tooltip.get_tooltip1_size(), tooltip.offset_from_cursor_action1)
|
||||||
set_tooltip_position("tooltip2", tooltip, tooltip.get_tooltip2_size(), tooltip.offset_from_cursor_action2)
|
set_tooltip_position("tooltip2", tooltip, tooltip.get_tooltip2_size(), tooltip.offset_from_cursor_action2)
|
||||||
|
return
|
||||||
|
set_tooltip_position("tooltip1", tooltip, tooltip.get_tooltip1_size(), tooltip.offset_from_cursor_action3)
|
||||||
|
set_tooltip_position("tooltip2", tooltip, tooltip.get_tooltip2_size(), tooltip.offset_from_cursor_action4)
|
||||||
|
|
||||||
|
|
||||||
func set_tooltip_position(nodeId: String, tooltip: ESCRichTooltip, size: Vector2, offset: Vector2):
|
func set_tooltip_position(nodeId: String, tooltip: ESCRichTooltip, size: Vector2, offset: Vector2):
|
||||||
|
|||||||
@@ -108,5 +108,7 @@ z_index = 10
|
|||||||
color = Color( 1, 1, 1, 1 )
|
color = Color( 1, 1, 1, 1 )
|
||||||
offset_from_cursor_action1 = Vector2( 0, 30 )
|
offset_from_cursor_action1 = Vector2( 0, 30 )
|
||||||
offset_from_cursor_action2 = Vector2( 0, -20 )
|
offset_from_cursor_action2 = Vector2( 0, -20 )
|
||||||
|
offset_from_cursor_action3 = Vector2( 0, 55 )
|
||||||
|
offset_from_cursor_action4 = Vector2( 0, -55 )
|
||||||
|
|
||||||
[connection signal="pressed" from="CanvasLayer/ui/menu_button/VBoxContainer/MenuButton" to="." method="_on_MenuButton_pressed"]
|
[connection signal="pressed" from="CanvasLayer/ui/menu_button/VBoxContainer/MenuButton" to="." method="_on_MenuButton_pressed"]
|
||||||
|
|||||||
Reference in New Issue
Block a user