diff --git a/gymkhana/addons/escoria-ui-return-monkey-island/game.tscn b/gymkhana/addons/escoria-ui-return-monkey-island/game.tscn index 0fd730e3..d0d2febb 100644 --- a/gymkhana/addons/escoria-ui-return-monkey-island/game.tscn +++ b/gymkhana/addons/escoria-ui-return-monkey-island/game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=12 format=2] +[gd_scene load_steps=11 format=2] [ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/inventory/inventory_ui.tscn" type="PackedScene" id=1] [ext_resource path="res://addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd" type="Script" id=2] @@ -8,7 +8,6 @@ [ext_resource path="res://addons/escoria-core/ui_library/menus/main_menu/main_menu.tscn" type="PackedScene" id=7] [ext_resource path="res://addons/escoria-core/ui_library/menus/pause_menu/pause_menu.tscn" type="PackedScene" id=8] [ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/theme.tres" type="Theme" id=9] -[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/tooltip/target_tooltip2.tscn" type="PackedScene" id=10] [ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/icons/cog-64.svg" type="Texture" id=11] [ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/video_player/video_player.tscn" type="PackedScene" id=12] @@ -90,12 +89,6 @@ visible = false [node name="tooltip_layer" type="CanvasLayer" parent="."] layer = 2 -[node name="tooltip2" parent="tooltip_layer" instance=ExtResource( 10 )] -mouse_filter = 2 -bbcode_text = "[center][color=#000000][/color][/center]" -fit_content_height = true -offset_from_cursor = Vector2( 0, -10 ) - [node name="tooltip" parent="tooltip_layer" instance=ExtResource( 4 )] z_index = 10 color = Color( 1, 1, 1, 1 ) diff --git a/gymkhana/addons/escoria-ui-return-monkey-island/item_components/ESCItemComponentOutline.gd b/gymkhana/addons/escoria-ui-return-monkey-island/item_components/ESCItemComponentOutline.gd index b51553b0..24090034 100644 --- a/gymkhana/addons/escoria-ui-return-monkey-island/item_components/ESCItemComponentOutline.gd +++ b/gymkhana/addons/escoria-ui-return-monkey-island/item_components/ESCItemComponentOutline.gd @@ -35,7 +35,8 @@ func _process(_delta: float): lastHighlightState = isHighlighted func _input(event): - if(event.is_action_pressed("ui_show_hints")): + + if(event.is_action_pressed("ui_show_hints")) and escoria.inputs_manager.input_mode == escoria.inputs_manager.INPUT_ALL: highlight(true) elif (event.is_action_released("ui_show_hints")): highlight(false) diff --git a/gymkhana/addons/escoria-ui-return-monkey-island/tooltip-reworked/tooltip-action1.tscn b/gymkhana/addons/escoria-ui-return-monkey-island/tooltip-reworked/tooltip-action1.tscn deleted file mode 100644 index d52f8647..00000000 --- a/gymkhana/addons/escoria-ui-return-monkey-island/tooltip-reworked/tooltip-action1.tscn +++ /dev/null @@ -1,22 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/cursors/mouse_left.png" type="Texture" id=1] -[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/theme.tres" type="Theme" id=2] -[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/tooltip-reworked/tooltip-reworked.gd" type="Script" id=3] - -[node name="action1" type="Node2D"] -z_index = 500 -script = ExtResource( 3 ) - -[node name="label" type="Label" parent="."] -margin_left = -1.0 -margin_top = -16.0 -margin_right = 83.0 -margin_bottom = 14.0 -theme = ExtResource( 2 ) -text = "Prueba" - -[node name="MouseLeft" type="Sprite" parent="."] -position = Vector2( 13, -2 ) -scale = Vector2( 1.3125, 1.25 ) -texture = ExtResource( 1 ) diff --git a/gymkhana/addons/escoria-ui-return-monkey-island/tooltip-reworked/tooltip-action2.tscn b/gymkhana/addons/escoria-ui-return-monkey-island/tooltip-reworked/tooltip-action2.tscn deleted file mode 100644 index 5da3d577..00000000 --- a/gymkhana/addons/escoria-ui-return-monkey-island/tooltip-reworked/tooltip-action2.tscn +++ /dev/null @@ -1,22 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/cursors/mouse_right.png" type="Texture" id=1] -[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/theme.tres" type="Theme" id=2] -[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/tooltip-reworked/tooltip-reworked.gd" type="Script" id=3] - -[node name="action2" type="Node2D"] -z_index = 500 -script = ExtResource( 3 ) - -[node name="label" type="Label" parent="."] -margin_left = -1.0 -margin_top = -16.0 -margin_right = 83.0 -margin_bottom = 14.0 -theme = ExtResource( 2 ) -text = "Prueba" - -[node name="MouseRight" type="Sprite" parent="."] -position = Vector2( 11.5, -1 ) -scale = Vector2( 1.3125, 1.25 ) -texture = ExtResource( 1 ) diff --git a/gymkhana/addons/escoria-ui-return-monkey-island/tooltip-reworked/tooltip-reworked.gd b/gymkhana/addons/escoria-ui-return-monkey-island/tooltip-reworked/tooltip-reworked.gd deleted file mode 100644 index 267f4758..00000000 --- a/gymkhana/addons/escoria-ui-return-monkey-island/tooltip-reworked/tooltip-reworked.gd +++ /dev/null @@ -1,25 +0,0 @@ -extends Node2D - - -# Declare member variables here. Examples: -# var a = 2 -# var b = "text" - - -# Called when the node enters the scene tree for the first time. -func _ready(): - self.visible = false; - -func set_text(text: String) -> void: - $label.text = text - - -# Called every frame. 'delta' is the elapsed time since the previous frame. -#func _process(delta): -# pass - - -func _on_ESCItemWithTooltip_mouse_entered(): - self.visible = true # Replace with function body. -func _on_ESCItemWithTooltip_mouse_exited(): - self.visible = false # Replace with function body. diff --git a/gymkhana/addons/escoria-ui-return-monkey-island/tooltip/target_tooltip.tscn b/gymkhana/addons/escoria-ui-return-monkey-island/tooltip/target_tooltip.tscn deleted file mode 100644 index c2184c3e..00000000 --- a/gymkhana/addons/escoria-ui-return-monkey-island/tooltip/target_tooltip.tscn +++ /dev/null @@ -1,13 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/theme.tres" type="Theme" id=1] -[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/tooltip/tooltip_target.gd" type="Script" id=2] - -[node name="tooltip" type="RichTextLabel"] -theme = ExtResource( 1 ) -bbcode_enabled = true -bbcode_text = "[center][color=#ffffff][/color][/center]" -scroll_active = false -script = ExtResource( 2 ) -color = Color( 1, 1, 1, 1 ) -offset_from_cursor = Vector2( 0, -50 ) diff --git a/gymkhana/addons/escoria-ui-return-monkey-island/tooltip/target_tooltip2.tscn b/gymkhana/addons/escoria-ui-return-monkey-island/tooltip/target_tooltip2.tscn deleted file mode 100644 index 3f9eca9d..00000000 --- a/gymkhana/addons/escoria-ui-return-monkey-island/tooltip/target_tooltip2.tscn +++ /dev/null @@ -1,13 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/theme.tres" type="Theme" id=1] -[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/tooltip/tooltip2_target.gd" type="Script" id=2] - -[node name="tooltip" type="RichTextLabel"] -theme = ExtResource( 1 ) -bbcode_enabled = true -bbcode_text = "[center][color=#ffffff][/color][/center]" -scroll_active = false -script = ExtResource( 2 ) -color = Color( 1, 1, 1, 1 ) -offset_from_cursor = Vector2( 0, 50 ) diff --git a/gymkhana/addons/escoria-ui-return-monkey-island/tooltip/tooltip2_target.gd b/gymkhana/addons/escoria-ui-return-monkey-island/tooltip/tooltip2_target.gd deleted file mode 100644 index 2e7ce403..00000000 --- a/gymkhana/addons/escoria-ui-return-monkey-island/tooltip/tooltip2_target.gd +++ /dev/null @@ -1,56 +0,0 @@ -extends ESCTooltip - -var id: int - - -export(Texture) var iconTexture: Texture = null \ - setget ,_get_icon_texture - -func _init(tooltip_id = 0): - id = tooltip_id - - #$icon.texture = iconTexture - - - - -signal tooltip2_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() - #var texturePath = get_constant() - var texturePath = null - # 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("tooltip2_size_updated") - bbcode_text = ""; - #bbcode_text += "[img]" + "res://gymkhana/addons/escoria-ui-return-monkey-island/cursors/mouse_right.png" + "[/img]" - #bbcode_text += "[color=#" + color.to_html(false) + "]" - bbcode_text += "[color=#" + color.to_html(false) + "]" - bbcode_text += current_target - bbcode_text += "[/color]" -# push_align(RichTextLabel.ALIGN_CENTER) -# push_color(color) -# append_bbcode(current_target) -# pop() -# pop() - - -func _on_room_ready(): - escoria.main.current_scene.game.tooltip2_node = self - _room_is_ready = true - -func _get_icon_texture() -> Texture: - if iconTexture == null: - for c in get_children(): - if c is TextureRect or c is Sprite: - return c.texture - return null - else: - return iconTexture diff --git a/gymkhana/addons/escoria-ui-return-monkey-island/tooltip/tooltip_target.gd b/gymkhana/addons/escoria-ui-return-monkey-island/tooltip/tooltip_target.gd deleted file mode 100644 index fdbbda7b..00000000 --- a/gymkhana/addons/escoria-ui-return-monkey-island/tooltip/tooltip_target.gd +++ /dev/null @@ -1,37 +0,0 @@ -extends ESCTooltip - -var id: int - -func _init(tooltip_id = 0): - id = tooltip_id - -signal tooltip_size_updated -# Update the tooltip size according to the text. - -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 = ""; - #bbcode_text = "[img]" + "res://gymkhana/addons/escoria-ui-return-monkey-island/cursors/mouse_left.png" + "[/img]" - #bbcode_text += "[color=#" + color.to_html(false) + "]" - bbcode_text += "[color=#" + color.to_html(false) + "]" - bbcode_text += current_target - bbcode_text += "[/color]" -# push_align(RichTextLabel.ALIGN_CENTER) -# push_color(color) -# append_bbcode(current_target) -# pop() -# pop() - - -func _on_room_ready(): - escoria.main.current_scene.game.tooltip_node = self - _room_is_ready = true