UI cleanup, reorder & unify
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="158.04979mm"
|
||||
height="39.294247mm"
|
||||
viewBox="0 0 158.04979 39.294247"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
sodipodi:docname="dialog_box.svg"
|
||||
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="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="1.2917368"
|
||||
inkscape:cx="320.11165"
|
||||
inkscape:cy="247.34141"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="971"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1" />
|
||||
<defs
|
||||
id="defs1" />
|
||||
<g
|
||||
inkscape:label="Capa 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-25.975154,-58.917846)">
|
||||
<path
|
||||
id="rect1"
|
||||
style="fill:#000000;fill-opacity:0.63985;stroke:#000000;stroke-width:0.123;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
||||
d="m 28.108879,58.979346 c -1.147911,0 -2.072225,0.924314 -2.072225,2.072225 v 29.428178 c 0,1.14791 0.924314,2.072224 2.072225,2.072224 h 73.659071 l 3.23184,5.598625 3.23236,-5.598625 h 73.65907 c 1.14791,0 2.07223,-0.924314 2.07223,-2.072224 V 61.051571 c 0,-1.147911 -0.92432,-2.072225 -2.07223,-2.072225 z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -3,9 +3,9 @@
|
||||
[ext_resource type="Script" uid="uid://d1pg38kdwg07d" path="res://addons/escoria-ui-return-monkey-island-dialog-simple/dialog_tip.gd" id="2"]
|
||||
|
||||
[node name="Label" type="Label"]
|
||||
offset_left = 1057.0
|
||||
offset_top = 533.0
|
||||
offset_right = 1259.0
|
||||
offset_bottom = 551.0
|
||||
offset_left = 1000.0
|
||||
offset_top = 500.0
|
||||
offset_right = 1237.0
|
||||
offset_bottom = 523.0
|
||||
text = "Haz click para acelerar el texto"
|
||||
script = ExtResource("2")
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
[gd_resource type="Theme" load_steps=4 format=3 uid="uid://dlo07cyfhpilq"]
|
||||
[gd_resource type="Theme" load_steps=5 format=3 uid="uid://dlo07cyfhpilq"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://vqqxktsw0f34" path="res://addons/escoria-ui-return-monkey-island/fonts/determination.ttf" id="1_yc5i3"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="1"]
|
||||
content_margin_left = 4.0
|
||||
@@ -19,6 +21,7 @@ corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="3"]
|
||||
bg_color = Color(0, 0, 0, 0.388235)
|
||||
draw_center = false
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
@@ -33,7 +36,9 @@ Label/colors/font_color = Color(1, 1, 1, 1)
|
||||
Label/colors/font_color_shadow = Color(0, 0, 0, 0)
|
||||
Label/colors/font_outline_modulate = Color(1, 0, 0, 1)
|
||||
Label/colors/label_box_bg = Color(0, 0, 0, 0.745098)
|
||||
Label/fonts/font = ExtResource("1_yc5i3")
|
||||
Label/styles/normal = SubResource("1")
|
||||
RichTextLabel/font_sizes/font_size = 20
|
||||
RichTextLabel/fonts/normal_font = ExtResource("1_yc5i3")
|
||||
RichTextLabel/styles/focus = SubResource("2")
|
||||
RichTextLabel/styles/normal = SubResource("3")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_resource type="Theme" load_steps=4 format=3 uid="uid://dvwfrnya2nhxu"]
|
||||
[gd_resource type="Theme" load_steps=3 format=3 uid="uid://dvwfrnya2nhxu"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="1"]
|
||||
content_margin_left = 4.0
|
||||
@@ -10,29 +10,17 @@ corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
expand_margin_left = 19.0
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="2"]
|
||||
bg_color = Color(0, 0, 0, 0.509804)
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yu8vd"]
|
||||
bg_color = Color(0, 0, 0, 0.607843)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="3"]
|
||||
bg_color = Color(0, 0, 0, 0.388235)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
expand_margin_left = 5.0
|
||||
expand_margin_top = 5.0
|
||||
expand_margin_right = 5.0
|
||||
expand_margin_bottom = 5.0
|
||||
|
||||
[resource]
|
||||
Label/colors/font_color = Color(1, 1, 1, 1)
|
||||
Label/colors/font_color_shadow = Color(0, 0, 0, 0)
|
||||
Label/colors/font_outline_modulate = Color(1, 0, 0, 1)
|
||||
Label/colors/label_box_bg = Color(0, 0, 0, 0.745098)
|
||||
Label/styles/normal = SubResource("1")
|
||||
RichTextLabel/styles/focus = SubResource("2")
|
||||
RichTextLabel/styles/normal = SubResource("3")
|
||||
Panel/styles/panel = SubResource("StyleBoxFlat_yu8vd")
|
||||
|
||||
@@ -1 +1 @@
|
||||
uid://yv6l5iarc1ki
|
||||
uid://cfkvypxfuu2mt
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# A dialog UI using a label above the head of the character
|
||||
extends RichTextLabel
|
||||
# A dialog GUI showing a dialog box and character portraits
|
||||
extends Window
|
||||
|
||||
|
||||
# Signal emitted when text has been said
|
||||
@@ -22,7 +22,6 @@ var _reading_speed_in_wpm: int
|
||||
# Used to extract words from lines of text.
|
||||
var _word_regex: RegEx = RegEx.new()
|
||||
|
||||
|
||||
# Current character speaking, to keep track of reference for animation purposes
|
||||
var _current_character
|
||||
|
||||
@@ -33,18 +32,23 @@ var _is_speeding_up: bool = false
|
||||
var _current_line: String
|
||||
|
||||
|
||||
# Tween node for text animation
|
||||
@onready var tween: Tween3 = Tween3.new(self)
|
||||
|
||||
# The node showing the text
|
||||
@onready var text_node: RichTextLabel = self
|
||||
@onready var text_node = $TextureRect/MarginContainer/HSplitContainer/text
|
||||
|
||||
# The tween node for text animations
|
||||
@onready var tween: Tween3 = Tween3.new(self)
|
||||
|
||||
# Whether the dialog manager is paused
|
||||
@onready var is_paused: bool = true
|
||||
|
||||
var dialog_location_node = null
|
||||
|
||||
# Enable bbcode and catch the signal when a tween completed
|
||||
@export var centered_text: bool
|
||||
|
||||
var X_POSITION_OFFSET: int = -10
|
||||
var Y_POSITION_OFFSET: int = -20
|
||||
|
||||
# Build up the UI
|
||||
func _ready():
|
||||
_text_time_per_character = ProjectSettings.get_setting(
|
||||
RTMISimpleDialogSettings.TEXT_TIME_PER_LETTER_MS
|
||||
@@ -96,7 +100,7 @@ func _ready():
|
||||
|
||||
_word_regex.compile("\\S+")
|
||||
|
||||
bbcode_enabled = true
|
||||
text_node.bbcode_enabled = true
|
||||
|
||||
tween.finished.connect(_on_dialog_line_typed.bind("", ""))
|
||||
|
||||
@@ -108,18 +112,6 @@ func _ready():
|
||||
_current_line = ""
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if _current_character.is_inside_tree() and \
|
||||
is_instance_valid(dialog_location_node):
|
||||
# Position the RichTextLabel on the character's dialog position, if any.
|
||||
position = dialog_location_node.get_global_transform_with_canvas().origin
|
||||
position.x -= size.x / 2
|
||||
|
||||
_account_for_margin_x()
|
||||
|
||||
_account_for_margin_y()
|
||||
|
||||
|
||||
# Make a character say something
|
||||
#
|
||||
# #### Parameters
|
||||
@@ -154,9 +146,10 @@ func say(character: String, line: String) :
|
||||
var text_color = _current_character.dialog_color
|
||||
var text_color_html = text_color.to_html(false)
|
||||
|
||||
text_node.text = "[center][color=#" + text_color_html + "]" \
|
||||
.format([text_color_html]) + tr(line) + "[/color][center]"
|
||||
|
||||
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
|
||||
@@ -184,14 +177,12 @@ func say(character: String, line: String) :
|
||||
set_process(true)
|
||||
|
||||
|
||||
# Called by the dialog player when user wants to finish dialogue fast.
|
||||
# Called by the dialog player when the
|
||||
func speedup():
|
||||
if not _is_speeding_up:
|
||||
_is_speeding_up = true
|
||||
var time_show_full_text = _fast_text_time_per_character / 1000 * len(_current_line)
|
||||
|
||||
tween.reset()
|
||||
|
||||
tween.interpolate_property(text_node, "visible_ratio",
|
||||
text_node.visible_ratio, 1.0, time_show_full_text,
|
||||
Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
|
||||
@@ -201,7 +192,6 @@ func speedup():
|
||||
# Called by the dialog player when user wants to finish dialogue immediately.
|
||||
func finish():
|
||||
tween.reset()
|
||||
|
||||
tween.interpolate_property(text_node, "visible_ratio",
|
||||
text_node.visible_ratio, 1.0, 0.0)
|
||||
tween.play()
|
||||
@@ -209,8 +199,11 @@ func finish():
|
||||
|
||||
# To be called if voice audio has finished.
|
||||
func voice_audio_finished():
|
||||
_stop_character_talking()
|
||||
_stop_character_talking()
|
||||
|
||||
# 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
|
||||
@@ -233,8 +226,11 @@ func _get_number_of_words() -> int:
|
||||
return _word_regex.search_all(text_node.get_text()).size()
|
||||
|
||||
|
||||
|
||||
# Ending the dialog
|
||||
func _on_dialog_finished():
|
||||
$Timer.stop()
|
||||
|
||||
# Only trigger to clear the text if we aren't limiting the clearing trigger to a click.
|
||||
if not ESCProjectSettingsManager.get_setting(RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY):
|
||||
say_finished.emit()
|
||||
@@ -244,28 +240,27 @@ func _on_dialog_finished():
|
||||
func _on_paused():
|
||||
if tween.is_running():
|
||||
is_paused = true
|
||||
visible = false
|
||||
tween.stop()
|
||||
|
||||
|
||||
# Handler managing resume notification from Escoria
|
||||
func _on_resumed():
|
||||
if not tween.is_running():
|
||||
# We can't rely on "show()" to make an invisible popup reappear, as per the docs for
|
||||
# CanvasItem. Instead, we need to use one of the popup_* methods.
|
||||
if is_inside_tree():
|
||||
popup_centered()
|
||||
|
||||
is_paused = false
|
||||
visible = true
|
||||
tween.resume()
|
||||
|
||||
|
||||
# Handler to deal with this node being removed
|
||||
func _on_tree_exiting() -> void:
|
||||
_stop_character_talking()
|
||||
|
||||
|
||||
|
||||
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():
|
||||
queue_free()
|
||||
|
||||
func _account_for_margin_x() -> void:
|
||||
if position.x < 0:
|
||||
@@ -275,7 +270,7 @@ func _account_for_margin_x() -> void:
|
||||
ProjectSettings.get("display/window/size/viewport_width")
|
||||
|
||||
if screen_margin_x > 0:
|
||||
position.x -= screen_margin_x
|
||||
position.x -= screen_margin_x + X_POSITION_OFFSET
|
||||
|
||||
|
||||
func _account_for_margin_y() -> void:
|
||||
@@ -286,4 +281,4 @@ func _account_for_margin_y() -> void:
|
||||
ProjectSettings.get("display/window/size/viewport_height")
|
||||
|
||||
if screen_margin_y > 0:
|
||||
position.y -= screen_margin_y
|
||||
position.y -= screen_margin_y + Y_POSITION_OFFSET
|
||||
|
||||
@@ -1,18 +1,47 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://x2crry528c4o"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cp75ofyuetxux"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d12nyx86nlc6h" path="res://addons/escoria-ui-return-monkey-island-dialog-simple/types/floating.gd" id="1"]
|
||||
[ext_resource type="Theme" uid="uid://dvwfrnya2nhxu" path="res://addons/escoria-ui-return-monkey-island-dialog-simple/theme/dialog.tres" id="2"]
|
||||
[ext_resource type="Script" uid="uid://bupgxuw37bw5t" path="res://addons/escoria-ui-return-monkey-island-dialog-simple/types/floating.gd" id="1"]
|
||||
[ext_resource type="Theme" uid="uid://dlo07cyfhpilq" path="res://addons/escoria-ui-return-monkey-island-dialog-simple/theme.tres" id="2_f1tsx"]
|
||||
[ext_resource type="Texture2D" uid="uid://cxdch2m3xopvy" path="res://addons/escoria-ui-return-monkey-island-dialog-simple/assets/dialog_box.svg" id="2_x8ib0"]
|
||||
|
||||
[node name="dialog_label" type="RichTextLabel"]
|
||||
offset_right = 672.0
|
||||
offset_bottom = 97.0
|
||||
theme = ExtResource("2")
|
||||
bbcode_enabled = true
|
||||
text = "[center]Here be some text.[/center]"
|
||||
text = "Here be some text."
|
||||
fit_content_height = true
|
||||
[node name="dialog_box" type="Window"]
|
||||
transparent_bg = true
|
||||
position = Vector2i(0, 36)
|
||||
size = Vector2i(600, 150)
|
||||
unresizable = true
|
||||
borderless = true
|
||||
transparent = true
|
||||
popup_window = true
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="Tween" type="Tween" parent="."]
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
offset_right = 597.0
|
||||
offset_bottom = 149.0
|
||||
texture = ExtResource("2_x8ib0")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="TextureRect"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 20
|
||||
theme_override_constants/margin_top = 20
|
||||
theme_override_constants/margin_right = 20
|
||||
theme_override_constants/margin_bottom = 20
|
||||
|
||||
[node name="HSplitContainer" type="HSplitContainer" parent="TextureRect/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 35
|
||||
dragger_visibility = 1
|
||||
|
||||
[node name="text" type="RichTextLabel" parent="TextureRect/MarginContainer/HSplitContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme = ExtResource("2_f1tsx")
|
||||
bbcode_enabled = true
|
||||
text = "Here be some text"
|
||||
justification_flags = 171
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_resource type="FontFile" load_steps=2 format=3 uid="uid://cne31d6e0513y"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://v5cnd4d0uvv3" path="res://addons/escoria-ui-return-monkey-island/fonts/caslonantique.ttf" id="1"]
|
||||
[ext_resource type="FontFile" uid="uid://dbuthr0652qv7" path="res://addons/escoria-ui-return-monkey-island/fonts/caslonantique.ttf" id="1"]
|
||||
|
||||
[resource]
|
||||
fallbacks = Array[Font]([ExtResource("1")])
|
||||
|
||||
BIN
addons/escoria-ui-return-monkey-island/fonts/determination.ttf
Normal file
BIN
addons/escoria-ui-return-monkey-island/fonts/determination.ttf
Normal file
Binary file not shown.
@@ -78,23 +78,25 @@ var _is_gamepad_connected = false
|
||||
# Tracks the mouse's current position onscreen.
|
||||
var _current_mouse_pos = Vector2.ZERO
|
||||
|
||||
# A reference to the node handling tooltip2
|
||||
var tooltip2_node: Object
|
||||
var last_target: Object
|
||||
|
||||
var video_player: Object
|
||||
|
||||
@export var inventory_ui: ESCInventory
|
||||
@export var rtmi_tooltip_node: RTMIRichTooltip
|
||||
@export var dev_tools_node: Control
|
||||
|
||||
func _init():
|
||||
gymkhana.tooltip_manager = ESCTootltipManager.new()
|
||||
gymkhana.item_count_manager = ESCItemCountManager.new()
|
||||
escoria.di = RTMIDependencyInjector.new()
|
||||
|
||||
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.di = RTMIDependencyInjector.new()
|
||||
|
||||
if $tooltip_layer/tooltip.connect("tooltip_size_updated", Callable(self, "update_tooltip_following_mouse_position").bind(tooltip_node)) != 0:
|
||||
if tooltip_node.connect("tooltip_size_updated", Callable(self, "update_tooltip_following_mouse_position").bind(tooltip_node)) != 0:
|
||||
escoria.logger.error(self, "Error connecting tooltip_size_updated with update_tooltip_following_mouse_position")
|
||||
# We get current day and month
|
||||
var time = Time.get_datetime_dict_from_system()
|
||||
@@ -108,7 +110,7 @@ func _ready():
|
||||
|
||||
|
||||
func _enter_tree():
|
||||
var room_selector_parent = $CanvasLayer/ui/menu_button/HBoxContainer
|
||||
var room_selector_parent = dev_tools_node
|
||||
|
||||
if ESCProjectSettingsManager.get_setting(ESCProjectSettingsManager.ENABLE_ROOM_SELECTOR) \
|
||||
and room_selector_parent.get_node_or_null("room_select") == null:
|
||||
@@ -143,7 +145,7 @@ func _exit_tree():
|
||||
|
||||
|
||||
func toggle_room_selector_visibility():
|
||||
var room_selector_parent = $CanvasLayer/ui/menu_button/VBoxContainer
|
||||
var room_selector_parent = dev_tools_node
|
||||
var room_selector = room_selector_parent.get_node_or_null("room_select")
|
||||
if(room_selector != null):
|
||||
room_selector.visible = !room_selector.visible
|
||||
@@ -156,10 +158,8 @@ func _input(event: InputEvent) -> void:
|
||||
toggle_room_selector_visibility()
|
||||
|
||||
if event is InputEventMouseMotion:
|
||||
#_current_mouse_pos = get_global_mouse_position() # Escoria core
|
||||
_current_mouse_pos = get_viewport().get_mouse_position()
|
||||
update_tooltip_following_mouse_position(tooltip_node)
|
||||
update_tooltip_following_mouse_position(tooltip2_node)
|
||||
|
||||
|
||||
|
||||
@@ -274,8 +274,8 @@ func left_double_click_on_bg(position: Vector2) -> void:
|
||||
func element_focused(element_id: String) -> void:
|
||||
var target_obj = escoria.object_manager.get_object(element_id).node
|
||||
if target_obj is ESCItem or ESCItemWithTooltip:
|
||||
$tooltip_layer/tooltip.set_target(target_obj.tooltip_name)
|
||||
$tooltip_layer/tooltip.set_target_object(target_obj)
|
||||
tooltip_node.set_target(target_obj.tooltip_name)
|
||||
tooltip_node.set_target_object(target_obj)
|
||||
|
||||
if is_instance_valid(last_target):
|
||||
last_target.get_component('outline').highlight(false)
|
||||
@@ -287,8 +287,8 @@ func element_focused(element_id: String) -> void:
|
||||
|
||||
|
||||
func element_unfocused() -> void:
|
||||
$tooltip_layer/tooltip.set_target("")
|
||||
$tooltip_layer/tooltip.set_target_object(null)
|
||||
tooltip_node.set_target("")
|
||||
tooltip_node.set_target_object(null)
|
||||
if(last_target != null):
|
||||
last_target.get_component('outline').highlight(false)
|
||||
last_target = null
|
||||
@@ -358,34 +358,37 @@ func right_click_on_inventory_item(inventory_item_global_id: String, event: Inpu
|
||||
|
||||
|
||||
|
||||
|
||||
func inventory_item_focused(inventory_item_global_id: String) -> void:
|
||||
var target_obj = escoria.object_manager.get_object(inventory_item_global_id).node
|
||||
if target_obj is ESCItemWithTooltip:
|
||||
#$tooltip_layer/tooltip.set_target(target_obj.action3_text)
|
||||
$tooltip_layer/tooltip.set_target_object(target_obj)
|
||||
tooltip_node.set_target_object(target_obj)
|
||||
|
||||
|
||||
|
||||
func inventory_item_unfocused() -> void:
|
||||
element_unfocused()
|
||||
|
||||
func open_inventory():
|
||||
$CanvasLayer/ui/HBoxContainer/inventory_ui.show_inventory()
|
||||
pass
|
||||
|
||||
func close_inventory():
|
||||
$CanvasLayer/ui/HBoxContainer/inventory_ui.hide_inventory()
|
||||
pass
|
||||
|
||||
func hide_ui():
|
||||
$CanvasLayer/ui/HBoxContainer/inventory_ui.hide_ui()
|
||||
$CanvasLayer/ui/HBoxContainer/inventory_ui.hide()
|
||||
$CanvasLayer/ui.hide()
|
||||
$dialog_layer.hide()
|
||||
#inventory_ui.hide_ui()
|
||||
#inventory_ui.hide()
|
||||
#$game_layer.hide()
|
||||
$game_layer.visible = false
|
||||
#$dialog_layer.hide()
|
||||
|
||||
func show_ui():
|
||||
if escoria.room_manager.GLOBAL_CURRENT_SCENE != "turno_cocina_creditos":
|
||||
$CanvasLayer/ui/HBoxContainer/inventory_ui.show()
|
||||
$CanvasLayer/ui/HBoxContainer/inventory_ui.show_ui()
|
||||
$CanvasLayer/ui.show()
|
||||
$dialog_layer.show()
|
||||
#inventory_ui.show()
|
||||
#inventory_ui.show_ui()
|
||||
#$ui_layer/game_ui.show()
|
||||
#$dialog_layer.show()
|
||||
$game_layer.show()
|
||||
|
||||
|
||||
func hide_main_menu():
|
||||
@@ -448,7 +451,7 @@ func get_custom_data() -> Dictionary:
|
||||
|
||||
|
||||
# Update the tooltip position
|
||||
func update_tooltip_following_mouse_position(tooltip: ESCRichTooltip):
|
||||
func update_tooltip_following_mouse_position(tooltip: RTMIRichTooltip):
|
||||
if tooltip == null:
|
||||
return
|
||||
if(escoria.action_manager.current_tool == null):
|
||||
@@ -459,7 +462,7 @@ func update_tooltip_following_mouse_position(tooltip: ESCRichTooltip):
|
||||
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: RTMIRichTooltip, size: Vector2, offset: Vector2):
|
||||
var mouse_position = calculateMousePosition(size)
|
||||
var corrected_position = correctPosition(tooltip, size, mouse_position, offset)
|
||||
tooltip.get_node(nodeId).position = corrected_position
|
||||
@@ -474,7 +477,7 @@ func calculateMousePosition(size: Vector2):
|
||||
#return _current_mouse_pos - size
|
||||
return _current_mouse_pos
|
||||
|
||||
func correctPosition(tooltip: ESCRichTooltip, size: Vector2, mouse_position: Vector2, offset: Vector2):
|
||||
func correctPosition(tooltip: RTMIRichTooltip, size: Vector2, mouse_position: Vector2, offset: Vector2):
|
||||
|
||||
# clamp TOP
|
||||
if tooltip.tooltip_distance_to_edge_top(_current_mouse_pos) <= mouse_tooltip_margin:
|
||||
@@ -502,26 +505,26 @@ func _on_event_done(return_code: int, _event_name: String):
|
||||
Input.set_custom_mouse_cursor(null)
|
||||
|
||||
# Show tooltips, they were hidden while performing action
|
||||
$tooltip_layer/tooltip.show()
|
||||
tooltip_node.show()
|
||||
|
||||
|
||||
func _on_MenuButton_pressed() -> void:
|
||||
pause_game()
|
||||
|
||||
func get_video_player() -> Node:
|
||||
return $CanvasLayer/video_player
|
||||
return $menu_layer/video_player
|
||||
|
||||
func play_video(video_file: String) -> void:
|
||||
hide_ui()
|
||||
clear_tooltip()
|
||||
$CanvasLayer/video_player.visible = true
|
||||
$CanvasLayer/video_player.play(video_file)
|
||||
get_video_player().visible = true
|
||||
get_video_player().play(video_file)
|
||||
|
||||
# Clears the tooltip content (if an ESCTooltip node exists in UI)
|
||||
# MODIFIED FOR RTMIUI
|
||||
func clear_tooltip():
|
||||
if tooltip_node != null:
|
||||
(tooltip_node as ESCRichTooltip).clear()
|
||||
(tooltip_node as RTMIRichTooltip).clear()
|
||||
|
||||
|
||||
func play_pause_music():
|
||||
@@ -557,4 +560,4 @@ func _on_MusicButton_pressed():
|
||||
|
||||
|
||||
func _on_translation_button_pressed() -> void:
|
||||
$CanvasLayer/language_selector.show()
|
||||
$menu_layer/language_selector.show()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://bl50queikqfjc" path="res://addons/escoria-ui-return-monkey-island/inventory/inventory_ui.tscn" id="1"]
|
||||
[ext_resource type="Script" uid="uid://dfl7khtlretr7" path="res://addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd" id="2"]
|
||||
[ext_resource type="PackedScene" uid="uid://dmw5gicuenj53" path="res://addons/escoria-core/game/scenes/camera_player/camera.tscn" id="3"]
|
||||
[ext_resource type="PackedScene" uid="uid://d2kogebvoxy51" path="res://addons/escoria-ui-return-monkey-island/esc_rich_tooltip.tscn" id="4"]
|
||||
[ext_resource type="PackedScene" uid="uid://d2kogebvoxy51" path="res://addons/escoria-ui-return-monkey-island/rtmi_rich_tooltip.tscn" id="4"]
|
||||
[ext_resource type="Script" uid="uid://lkc4isk3g0rj" path="res://addons/escoria-ui-return-monkey-island/game.gd" id="5"]
|
||||
[ext_resource type="Texture2D" uid="uid://ce2rx8nm1s6gh" path="res://addons/escoria-ui-return-monkey-island/icons/music-double-note.svg" id="6"]
|
||||
[ext_resource type="Texture2D" uid="uid://d0ta8viehhtdj" path="res://addons/escoria-ui-return-monkey-island/icons/translation.svg" id="6_yfacq"]
|
||||
@@ -20,20 +20,32 @@
|
||||
[ext_resource type="Texture2D" uid="uid://e2xk0aimdte" path="res://addons/escoria-ui-return-monkey-island/icons/music-double-note-disabled.svg" id="16"]
|
||||
[ext_resource type="PackedScene" uid="uid://c0066wpl3qky4" path="res://addons/escoria-ui-return-monkey-island/menus/language_selector/language_selector.tscn" id="19_we0hb"]
|
||||
|
||||
[node name="game" type="Node2D"]
|
||||
[node name="game" type="Node2D" node_paths=PackedStringArray("inventory_ui", "rtmi_tooltip_node")]
|
||||
script = ExtResource("5")
|
||||
main_menu = NodePath("CanvasLayer/main_menu")
|
||||
pause_menu = NodePath("CanvasLayer/pause_menu")
|
||||
inventory_ui = NodePath("game_layer/ui_layer/Inventory")
|
||||
rtmi_tooltip_node = NodePath("game_layer/tooltip_layer/tooltip")
|
||||
main_menu = NodePath("menu_layer/main_menu")
|
||||
pause_menu = NodePath("menu_layer/pause_menu")
|
||||
mouse_tooltip_margin = 70.0
|
||||
editor_debug_mode = 1
|
||||
ui_parent_control_node = NodePath("CanvasLayer/ui")
|
||||
|
||||
[node name="camera" parent="." instance=ExtResource("3")]
|
||||
|
||||
[node name="tooltip_layer" type="CanvasLayer" parent="."]
|
||||
[node name="game_layer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="dialog_layer" type="CanvasLayer" parent="game_layer"]
|
||||
layer = 3
|
||||
|
||||
[node name="ESCDialogsPlayer" type="Control" parent="game_layer/dialog_layer"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
theme = ExtResource("9")
|
||||
script = ExtResource("2")
|
||||
|
||||
[node name="tooltip_layer" type="CanvasLayer" parent="game_layer"]
|
||||
layer = 2
|
||||
|
||||
[node name="tooltip" parent="tooltip_layer" instance=ExtResource("4")]
|
||||
[node name="tooltip" parent="game_layer/tooltip_layer" instance=ExtResource("4")]
|
||||
z_index = 10
|
||||
color = Color(1, 1, 1, 1)
|
||||
offset_from_cursor_action1 = Vector2(0, 60)
|
||||
@@ -42,50 +54,34 @@ offset_from_cursor_action3 = Vector2(0, 60)
|
||||
offset_from_cursor_action4 = Vector2(0, -20)
|
||||
debug_mode = true
|
||||
|
||||
[node name="dialog_layer" type="CanvasLayer" parent="."]
|
||||
layer = 3
|
||||
[node name="ui_layer" type="CanvasLayer" parent="game_layer"]
|
||||
|
||||
[node name="ESCDialogsPlayer" type="Control" parent="dialog_layer"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
theme = ExtResource("9")
|
||||
script = ExtResource("2")
|
||||
[node name="DevTools" type="PanelContainer" parent="game_layer/ui_layer"]
|
||||
offset_top = 622.0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 662.0
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="ui" type="Control" parent="CanvasLayer"]
|
||||
layout_mode = 3
|
||||
anchor_top = 0.9
|
||||
[node name="Tools" type="PanelContainer" parent="game_layer/ui_layer"]
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -26.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
offset_left = -220.0
|
||||
offset_bottom = 84.0
|
||||
grow_horizontal = 0
|
||||
theme = ExtResource("9")
|
||||
|
||||
[node name="menu_button" type="Control" parent="CanvasLayer/ui"]
|
||||
anchors_preset = 0
|
||||
offset_left = 1245.0
|
||||
offset_top = -643.0
|
||||
offset_right = 1245.0
|
||||
offset_bottom = -643.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
[node name="MarginContainer" type="MarginContainer" parent="game_layer/ui_layer/Tools"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/ui/menu_button"]
|
||||
layout_mode = 0
|
||||
offset_left = -179.0
|
||||
offset_top = 33.0
|
||||
offset_right = 21.0
|
||||
offset_bottom = 103.0
|
||||
alignment = 1
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="game_layer/ui_layer/Tools/MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TranslationButton" type="TextureButton" parent="CanvasLayer/ui/menu_button/HBoxContainer"]
|
||||
[node name="TranslationButton" type="TextureButton" parent="game_layer/ui_layer/Tools/MarginContainer/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
texture_normal = ExtResource("6_yfacq")
|
||||
texture_hover = ExtResource("7_we0hb")
|
||||
|
||||
[node name="MusicButton" type="TextureButton" parent="CanvasLayer/ui/menu_button/HBoxContainer"]
|
||||
[node name="MusicButton" type="TextureButton" parent="game_layer/ui_layer/Tools/MarginContainer/HBoxContainer2"]
|
||||
custom_minimum_size = Vector2(64, 0)
|
||||
layout_mode = 2
|
||||
script = ExtResource("14")
|
||||
@@ -94,46 +90,39 @@ musicEnabledHoverTexture = ExtResource("13")
|
||||
musicDisabledTexture = ExtResource("16")
|
||||
musicDisabledHoverTexture = ExtResource("15")
|
||||
|
||||
[node name="MenuButton" type="TextureButton" parent="CanvasLayer/ui/menu_button/HBoxContainer"]
|
||||
[node name="MenuButton" type="TextureButton" parent="game_layer/ui_layer/Tools/MarginContainer/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
texture_normal = ExtResource("13_we0hb")
|
||||
texture_hover = ExtResource("14_parhr")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/ui"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
[node name="Inventory" parent="game_layer/ui_layer" instance=ExtResource("1")]
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -2.0
|
||||
offset_top = -8.0
|
||||
offset_right = -2.0
|
||||
offset_bottom = -16.0
|
||||
offset_left = -640.0
|
||||
offset_top = -120.0
|
||||
offset_right = 640.0
|
||||
offset_bottom = 0.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="Spacer" type="Control" parent="CanvasLayer/ui/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
[node name="menu_layer" type="CanvasLayer" parent="."]
|
||||
layer = 2
|
||||
|
||||
[node name="inventory_ui" parent="CanvasLayer/ui/HBoxContainer" instance=ExtResource("1")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="pause_menu" parent="CanvasLayer" instance=ExtResource("8")]
|
||||
visible = false
|
||||
theme = ExtResource("9")
|
||||
|
||||
[node name="main_menu" parent="CanvasLayer" instance=ExtResource("7")]
|
||||
[node name="pause_menu" parent="menu_layer" instance=ExtResource("8")]
|
||||
visible = false
|
||||
|
||||
[node name="video_player" parent="CanvasLayer" instance=ExtResource("12")]
|
||||
[node name="main_menu" parent="menu_layer" instance=ExtResource("7")]
|
||||
visible = false
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
|
||||
[node name="language_selector" parent="CanvasLayer" instance=ExtResource("19_we0hb")]
|
||||
[node name="video_player" parent="menu_layer" instance=ExtResource("12")]
|
||||
visible = false
|
||||
|
||||
[connection signal="pressed" from="CanvasLayer/ui/menu_button/HBoxContainer/TranslationButton" to="." method="_on_translation_button_pressed"]
|
||||
[connection signal="pressed" from="CanvasLayer/ui/menu_button/HBoxContainer/MusicButton" to="." method="_on_MusicButton_pressed"]
|
||||
[connection signal="pressed" from="CanvasLayer/ui/menu_button/HBoxContainer/MenuButton" to="." method="_on_MenuButton_pressed"]
|
||||
[node name="language_selector" parent="menu_layer" instance=ExtResource("19_we0hb")]
|
||||
visible = false
|
||||
|
||||
[connection signal="pressed" from="game_layer/ui_layer/Tools/MarginContainer/HBoxContainer2/TranslationButton" to="." method="_on_translation_button_pressed"]
|
||||
[connection signal="pressed" from="game_layer/ui_layer/Tools/MarginContainer/HBoxContainer2/MusicButton" to="." method="_on_MusicButton_pressed"]
|
||||
[connection signal="pressed" from="game_layer/ui_layer/Tools/MarginContainer/HBoxContainer2/MenuButton" to="." method="_on_MenuButton_pressed"]
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# The inventory representation of an ESC item if pickable (only used by
|
||||
# the inventory components)
|
||||
extends ESCInventoryButton
|
||||
class_name RTMIInventoryButton
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uid://dxqu8pi7p6vng
|
||||
@@ -0,0 +1,5 @@
|
||||
# Inventory container handler that acts as a base for UIs inventory containers
|
||||
extends ESCInventoryContainer
|
||||
class_name RTMIInventoryContainer
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uid://245b34c8nyex
|
||||
@@ -7,26 +7,30 @@ var inventory_visible: bool = false
|
||||
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
$FloatingInventory/panel.position.x = ProjectSettings.get_setting("display/window/size/viewport_width") - $FloatingInventory/panel.size.x
|
||||
#$FloatingInventory/panel.position.x = ProjectSettings.get_setting("display/window/size/viewport_width") - $FloatingInventory/panel.size.x
|
||||
|
||||
|
||||
func show_inventory():
|
||||
$FloatingInventory/panel.show()
|
||||
#$FloatingInventory/panel.show()
|
||||
self.show()
|
||||
inventory_visible = true
|
||||
|
||||
|
||||
func hide_inventory():
|
||||
$FloatingInventory/panel.hide()
|
||||
#$FloatingInventory/panel.hide()
|
||||
self.hide()
|
||||
inventory_visible = false
|
||||
|
||||
|
||||
func show_ui():
|
||||
$FloatingInventory/inventory_bg.show()
|
||||
$FloatingInventory/panel/MarginContainer/ScrollContainer/container.show()
|
||||
#$FloatingInventory/inventory_bg.show()
|
||||
#$FloatingInventory/panel/MarginContainer/ScrollContainer/container.show()
|
||||
self.show()
|
||||
inventory_visible = true
|
||||
|
||||
|
||||
func hide_ui():
|
||||
$FloatingInventory/inventory_bg.hide()
|
||||
$FloatingInventory/panel/MarginContainer/ScrollContainer/container.hide()
|
||||
self.hide()
|
||||
#$FloatingInventory/inventory_bg.hide()
|
||||
#$FloatingInventory/panel/MarginContainer/ScrollContainer/container.hide()
|
||||
inventory_visible = false
|
||||
|
||||
@@ -1,67 +1,23 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://bl50queikqfjc"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://bl50queikqfjc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://1hedqas3odoy" path="res://addons/escoria-ui-return-monkey-island/inventory/inventory_ui.gd" id="1"]
|
||||
[ext_resource type="Theme" uid="uid://23n73qci0qc3" path="res://addons/escoria-ui-return-monkey-island/theme/inventory_ui.tres" id="1_a1nc4"]
|
||||
[ext_resource type="Script" uid="uid://c4syt26p7mg66" path="res://addons/escoria-core/ui_library/inventory/esc_inventory_container.gd" id="3"]
|
||||
|
||||
[node name="inventory_ui" type="Control"]
|
||||
custom_minimum_size = Vector2(90, 90)
|
||||
layout_mode = 3
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_right = 768.0
|
||||
offset_bottom = 540.0
|
||||
scale = Vector2(0.4, 0.4)
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 3
|
||||
[node name="Inventory" type="PanelContainer"]
|
||||
offset_right = 1280.0
|
||||
offset_bottom = 120.0
|
||||
theme = ExtResource("1_a1nc4")
|
||||
script = ExtResource("1")
|
||||
inventory_ui_container = NodePath("FloatingInventory/panel/MarginContainer/ScrollContainer/container")
|
||||
inventory_ui_container = NodePath("MarginContainer/ScrollContainer/container")
|
||||
|
||||
[node name="FloatingInventory" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="inventory_bg" type="Polygon2D" parent="FloatingInventory"]
|
||||
position = Vector2(0, -16)
|
||||
color = Color(0.156863, 0.0627451, 0, 1)
|
||||
polygon = PackedVector2Array(-3, 578, 1280, 578, 1280, 752, -3, 757)
|
||||
|
||||
[node name="panel" type="TextureRect" parent="FloatingInventory"]
|
||||
custom_minimum_size = Vector2(0, 160)
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -1276.0
|
||||
offset_top = -160.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
expand_mode = 1
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="FloatingInventory/panel"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -4.0
|
||||
offset_top = 2.0
|
||||
offset_right = -16.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/margin_left = 20
|
||||
theme_override_constants/margin_top = 20
|
||||
theme_override_constants/margin_right = 20
|
||||
theme_override_constants/margin_bottom = 20
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="FloatingInventory/panel/MarginContainer"]
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 6
|
||||
vertical_scroll_mode = 0
|
||||
|
||||
[node name="container" type="HBoxContainer" parent="FloatingInventory/panel/MarginContainer/ScrollContainer"]
|
||||
[node name="container" type="HBoxContainer" parent="MarginContainer/ScrollContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/separation = 20
|
||||
script = ExtResource("3")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://c0066wpl3qky4"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://c0066wpl3qky4"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bb2dncmckwtj2" path="res://addons/escoria-ui-return-monkey-island/menus/language_selector/language_selector.gd" id="1_rfy64"]
|
||||
[ext_resource type="Theme" uid="uid://djtwqnfbbt5t8" path="res://addons/escoria-ui-return-monkey-island/theme/menu.tres" id="1_ygmpa"]
|
||||
[ext_resource type="Texture2D" uid="uid://d0ta8viehhtdj" path="res://addons/escoria-ui-return-monkey-island/icons/translation.svg" id="2_502ci"]
|
||||
[ext_resource type="Theme" uid="uid://dvpaon5mw2w8l" path="res://addons/escoria-ui-return-monkey-island/theme.tres" id="2_jw4w0"]
|
||||
|
||||
@@ -12,6 +13,7 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("1_ygmpa")
|
||||
script = ExtResource("1_rfy64")
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://d3wdxi18u52c5"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://d3wdxi18u52c5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cnlvmkxk41x6j" path="res://addons/escoria-ui-return-monkey-island/menus/main_menu/main_menu.gd" id="1"]
|
||||
[ext_resource type="Theme" uid="uid://djtwqnfbbt5t8" path="res://addons/escoria-ui-return-monkey-island/theme/menu.tres" id="1_6gi1c"]
|
||||
[ext_resource type="Script" uid="uid://bfi05b2x5srm2" path="res://addons/escoria-ui-return-monkey-island/menus/RTMIMenuButtonWithSaveFeature.gd" id="2"]
|
||||
[ext_resource type="Texture2D" uid="uid://bgfi7t6khinjw" path="res://gymkhana/logo-small.png" id="3"]
|
||||
[ext_resource type="PackedScene" uid="uid://csxvnrljbqkr8" path="res://addons/escoria-ui-return-monkey-island/menus/options/options.tscn" id="4"]
|
||||
@@ -14,6 +15,7 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("1_6gi1c")
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="load_game" parent="." instance=ExtResource("5")]
|
||||
@@ -41,7 +43,7 @@ anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -308.0
|
||||
offset_right = 308.0
|
||||
theme_override_constants/separation = 100
|
||||
theme_override_constants/separation = 50
|
||||
alignment = 1
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="main/main"]
|
||||
@@ -60,16 +62,19 @@ text = "NEW_GAME"
|
||||
script = ExtResource("5_4i6cp")
|
||||
|
||||
[node name="load_game" type="Button" parent="main/main/buttons"]
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
layout_mode = 2
|
||||
text = "LOAD_GAME"
|
||||
script = ExtResource("2")
|
||||
|
||||
[node name="options" type="Button" parent="main/main/buttons"]
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
layout_mode = 2
|
||||
text = "OPTIONS"
|
||||
script = ExtResource("5_4i6cp")
|
||||
|
||||
[node name="quit" type="Button" parent="main/main/buttons"]
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
layout_mode = 2
|
||||
text = "QUIT"
|
||||
script = ExtResource("5_4i6cp")
|
||||
|
||||
@@ -1,156 +1,113 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://csxvnrljbqkr8"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://csxvnrljbqkr8"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://srnd5fwltb6k" path="res://addons/escoria-ui-return-monkey-island/menus/options/flags/de.png" id="1"]
|
||||
[ext_resource type="Texture2D" uid="uid://yckfhmbqy4gy" path="res://addons/escoria-ui-return-monkey-island/menus/options/flags/de.png" id="1"]
|
||||
[ext_resource type="Theme" uid="uid://djtwqnfbbt5t8" path="res://addons/escoria-ui-return-monkey-island/theme/menu.tres" id="1_h0rhj"]
|
||||
[ext_resource type="Script" uid="uid://bjl2eag8hh30h" path="res://addons/escoria-ui-return-monkey-island/menus/options/options.gd" id="4"]
|
||||
|
||||
[node name="options" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
theme = ExtResource("1_h0rhj")
|
||||
script = ExtResource("4")
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
layout_mode = 0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_editor_description_": ""
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
alignment = 1
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"]
|
||||
offset_left = 391.0
|
||||
offset_top = 241.0
|
||||
offset_right = 888.0
|
||||
offset_bottom = 484.0
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 6
|
||||
theme_override_constants/margin_right = 20
|
||||
theme_override_constants/margin_top = 20
|
||||
theme_override_constants/margin_left = 20
|
||||
theme_override_constants/margin_top = 20
|
||||
theme_override_constants/margin_right = 20
|
||||
theme_override_constants/margin_bottom = 20
|
||||
|
||||
[node name="options" type="GridContainer" parent="VBoxContainer/MarginContainer"]
|
||||
offset_left = 20.0
|
||||
offset_top = 20.0
|
||||
offset_right = 477.0
|
||||
offset_bottom = 223.0
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 6
|
||||
theme_override_constants/h_separation = 40
|
||||
columns = 2
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="label" type="Label" parent="VBoxContainer/MarginContainer/options"]
|
||||
offset_top = 30.0
|
||||
offset_right = 137.0
|
||||
offset_bottom = 44.0
|
||||
layout_mode = 2
|
||||
text = "OPTIONS_LANGUAGE"
|
||||
|
||||
[node name="flags" type="HBoxContainer" parent="VBoxContainer/MarginContainer/options"]
|
||||
offset_left = 177.0
|
||||
offset_right = 457.0
|
||||
offset_bottom = 75.0
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/separation = 30
|
||||
alignment = 1
|
||||
|
||||
[node name="TextureRect2" type="TextureRect" parent="VBoxContainer/MarginContainer/options/flags"]
|
||||
offset_right = 125.0
|
||||
offset_bottom = 75.0
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1")
|
||||
|
||||
[node name="TextureRect3" type="TextureRect" parent="VBoxContainer/MarginContainer/options/flags"]
|
||||
offset_left = 155.0
|
||||
offset_right = 280.0
|
||||
offset_bottom = 75.0
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1")
|
||||
|
||||
[node name="label2" type="Label" parent="VBoxContainer/MarginContainer/options"]
|
||||
offset_top = 80.0
|
||||
offset_right = 137.0
|
||||
offset_bottom = 94.0
|
||||
layout_mode = 2
|
||||
text = "GENERAL_VOLUME"
|
||||
|
||||
[node name="general_volume" type="HSlider" parent="VBoxContainer/MarginContainer/options"]
|
||||
offset_left = 177.0
|
||||
offset_top = 79.0
|
||||
offset_right = 457.0
|
||||
offset_bottom = 95.0
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
max_value = 1.0
|
||||
step = 0.001
|
||||
|
||||
[node name="label3" type="Label" parent="VBoxContainer/MarginContainer/options"]
|
||||
offset_top = 100.0
|
||||
offset_right = 137.0
|
||||
offset_bottom = 114.0
|
||||
layout_mode = 2
|
||||
text = "SOUND_VOLUME"
|
||||
|
||||
[node name="sound_volume" type="HSlider" parent="VBoxContainer/MarginContainer/options"]
|
||||
offset_left = 177.0
|
||||
offset_top = 99.0
|
||||
offset_right = 457.0
|
||||
offset_bottom = 115.0
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
max_value = 1.0
|
||||
step = 0.001
|
||||
|
||||
[node name="label4" type="Label" parent="VBoxContainer/MarginContainer/options"]
|
||||
offset_top = 120.0
|
||||
offset_right = 137.0
|
||||
offset_bottom = 134.0
|
||||
layout_mode = 2
|
||||
text = "MUSIC_VOLUME"
|
||||
|
||||
[node name="music_volume" type="HSlider" parent="VBoxContainer/MarginContainer/options"]
|
||||
offset_left = 177.0
|
||||
offset_top = 119.0
|
||||
offset_right = 457.0
|
||||
offset_bottom = 135.0
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
max_value = 1.0
|
||||
step = 0.001
|
||||
|
||||
[node name="label5" type="Label" parent="VBoxContainer/MarginContainer/options"]
|
||||
offset_top = 140.0
|
||||
offset_right = 137.0
|
||||
offset_bottom = 154.0
|
||||
layout_mode = 2
|
||||
text = "SPEECH_VOLUME"
|
||||
|
||||
[node name="speech_volume" type="HSlider" parent="VBoxContainer/MarginContainer/options"]
|
||||
offset_left = 177.0
|
||||
offset_top = 139.0
|
||||
offset_right = 457.0
|
||||
offset_bottom = 155.0
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
max_value = 1.0
|
||||
step = 0.001
|
||||
|
||||
[node name="label6" type="Label" parent="VBoxContainer/MarginContainer/options"]
|
||||
offset_top = 164.0
|
||||
offset_right = 137.0
|
||||
offset_bottom = 178.0
|
||||
layout_mode = 2
|
||||
text = "FULLSCREEN"
|
||||
|
||||
[node name="fullscreen" type="CheckBox" parent="VBoxContainer/MarginContainer/options"]
|
||||
offset_left = 177.0
|
||||
offset_top = 159.0
|
||||
offset_right = 457.0
|
||||
offset_bottom = 183.0
|
||||
layout_mode = 2
|
||||
|
||||
[node name="label7" type="Label" parent="VBoxContainer/MarginContainer/options"]
|
||||
offset_top = 188.0
|
||||
offset_right = 137.0
|
||||
offset_bottom = 202.0
|
||||
layout_mode = 2
|
||||
text = "SPEECH_SPEED"
|
||||
|
||||
[node name="speech_speed" type="HSlider" parent="VBoxContainer/MarginContainer/options"]
|
||||
offset_left = 177.0
|
||||
offset_top = 187.0
|
||||
offset_right = 457.0
|
||||
offset_bottom = 203.0
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
min_value = 10.0
|
||||
max_value = 400.0
|
||||
@@ -158,29 +115,17 @@ step = 10.0
|
||||
value = 200.0
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
offset_top = 488.0
|
||||
offset_right = 1280.0
|
||||
offset_bottom = 508.0
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 20
|
||||
alignment = 1
|
||||
|
||||
[node name="back" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||
offset_left = 549.0
|
||||
offset_right = 660.0
|
||||
offset_bottom = 20.0
|
||||
layout_mode = 2
|
||||
text = "OPTIONS_BACK"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="apply" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||
offset_left = 680.0
|
||||
offset_right = 731.0
|
||||
offset_bottom = 20.0
|
||||
layout_mode = 2
|
||||
text = "APPLY"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="value_changed" from="VBoxContainer/MarginContainer/options/general_volume" to="." method="_on_general_volume_changed"]
|
||||
[connection signal="value_changed" from="VBoxContainer/MarginContainer/options/sound_volume" to="." method="_on_sound_volume_changed"]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://dl7w8oqk1rmhw"]
|
||||
[gd_scene load_steps=9 format=3 uid="uid://dl7w8oqk1rmhw"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ctu22fcrvjv4t" path="res://addons/escoria-ui-return-monkey-island/menus/pause_menu/pause_menu.gd" id="1"]
|
||||
[ext_resource type="Theme" uid="uid://djtwqnfbbt5t8" path="res://addons/escoria-ui-return-monkey-island/theme/menu.tres" id="1_e0gqa"]
|
||||
[ext_resource type="PackedScene" uid="uid://csxvnrljbqkr8" path="res://addons/escoria-ui-return-monkey-island/menus/options/options.tscn" id="2"]
|
||||
[ext_resource type="Texture2D" uid="uid://bgfi7t6khinjw" path="res://gymkhana/logo-small.png" id="3"]
|
||||
[ext_resource type="PackedScene" uid="uid://cj440t8pub603" path="res://addons/escoria-core/ui_library/menus/load_save/save/save_game.tscn" id="4"]
|
||||
@@ -15,6 +16,7 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("1_e0gqa")
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
@@ -33,6 +35,8 @@ layout_mode = 1
|
||||
[node name="options" parent="." instance=ExtResource("2")]
|
||||
visible = false
|
||||
anchors_preset = 0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
@@ -46,49 +50,54 @@ offset_right = 308.0
|
||||
offset_bottom = 44.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
scale = Vector2(0.92, 0.92)
|
||||
theme_override_constants/separation = 100
|
||||
theme_override_constants/separation = 16
|
||||
alignment = 1
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
texture = ExtResource("3")
|
||||
stretch_mode = 3
|
||||
|
||||
[node name="menuitems" type="VBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="continue" type="Button" parent="VBoxContainer/menuitems"]
|
||||
custom_minimum_size = Vector2(0, 150)
|
||||
custom_minimum_size = Vector2(0, 120)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
text = "CONTINUE_GAME"
|
||||
script = ExtResource("6_31lra")
|
||||
|
||||
[node name="new_game" type="Button" parent="VBoxContainer/menuitems"]
|
||||
custom_minimum_size = Vector2(0, 30)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
text = "NEW_GAME"
|
||||
script = ExtResource("6_31lra")
|
||||
|
||||
[node name="save_game" type="Button" parent="VBoxContainer/menuitems"]
|
||||
custom_minimum_size = Vector2(0, 30)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
text = "SAVE_GAME"
|
||||
script = ExtResource("7_e0gqa")
|
||||
|
||||
[node name="load_game" type="Button" parent="VBoxContainer/menuitems"]
|
||||
custom_minimum_size = Vector2(0, 30)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
text = "LOAD_GAME"
|
||||
script = ExtResource("7_e0gqa")
|
||||
|
||||
[node name="options" type="Button" parent="VBoxContainer/menuitems"]
|
||||
custom_minimum_size = Vector2(0, 30)
|
||||
layout_mode = 2
|
||||
text = "OPTIONS"
|
||||
script = ExtResource("6_31lra")
|
||||
|
||||
[node name="quit" type="Button" parent="VBoxContainer/menuitems"]
|
||||
custom_minimum_size = Vector2(0, 30)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
text = "QUIT"
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
extends ESCInventoryItem
|
||||
class_name RTMIESCInventoryItem
|
||||
|
||||
var shader = preload("res://addons/escoria-ui-return-monkey-island/shaders/shadermaterial_outline_green5px.tres")
|
||||
|
||||
func _init(p_item: ESCItem) -> void:
|
||||
super._init(p_item)
|
||||
escoria.logger.info(self, "RTMIESCInventoryItem")
|
||||
@@ -10,3 +12,5 @@ func _init(p_item: ESCItem) -> void:
|
||||
texture_hovered = p_item._get_inventory_texture_hovered()
|
||||
if p_item is ESCItemWithTooltip:
|
||||
p_item.register_components()
|
||||
p_item.hover_enabled = true
|
||||
p_item.material = shader
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uid://27e4yrrk30dp
|
||||
@@ -1,7 +1,7 @@
|
||||
@tool
|
||||
# A tooltip displaying <verb> <item1> [<item2>]
|
||||
extends Node2D
|
||||
class_name ESCRichTooltip
|
||||
class_name RTMIRichTooltip
|
||||
|
||||
|
||||
# Maximum width of the label
|
||||
@@ -0,0 +1 @@
|
||||
uid://b7sdsky8ovx75
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://d2kogebvoxy51"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bbf2w51korm6e" path="res://addons/escoria-ui-return-monkey-island/esc_rich_tooltip.gd" id="1"]
|
||||
[ext_resource type="Script" uid="uid://bbf2w51korm6e" path="res://addons/escoria-ui-return-monkey-island/rtmi_rich_tooltip.gd" id="1"]
|
||||
[ext_resource type="Texture2D" uid="uid://cv545ye40v70b" path="res://addons/escoria-ui-return-monkey-island/cursors/rounded_mouse_right.png" id="2"]
|
||||
[ext_resource type="Texture2D" uid="uid://naf4ovsgrbyp" path="res://addons/escoria-ui-return-monkey-island/cursors/rounded_mouse_left.png" id="3"]
|
||||
[ext_resource type="Theme" uid="uid://bf2eet52fueam" path="res://addons/escoria-ui-return-monkey-island/theme/ui.tres" id="4"]
|
||||
@@ -0,0 +1,64 @@
|
||||
// Source : https://godotshaders.com/shader/2d-outline-inline/
|
||||
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform vec4 color : source_color = vec4(1.0);
|
||||
uniform float width : hint_range(0, 10) = 1.0;
|
||||
uniform int pattern : hint_range(0, 2) = 0; // diamond, circle, square
|
||||
uniform bool inside = false;
|
||||
uniform bool add_margins = true; // only useful when inside is false
|
||||
|
||||
void vertex() {
|
||||
if (add_margins) {
|
||||
VERTEX += (UV * 2.0 - 1.0) * width;
|
||||
}
|
||||
}
|
||||
|
||||
bool hasContraryNeighbour(vec2 uv, vec2 texture_pixel_size, sampler2D texture) {
|
||||
for (float i = -ceil(width); i <= ceil(width); i++) {
|
||||
float x = abs(i) > width ? width * sign(i) : i;
|
||||
float offset;
|
||||
|
||||
if (pattern == 0) {
|
||||
offset = width - abs(x);
|
||||
} else if (pattern == 1) {
|
||||
offset = floor(sqrt(pow(width + 0.5, 2) - x * x));
|
||||
} else if (pattern == 2) {
|
||||
offset = width;
|
||||
}
|
||||
|
||||
for (float j = -ceil(offset); j <= ceil(offset); j++) {
|
||||
float y = abs(j) > offset ? offset * sign(j) : j;
|
||||
vec2 xy = uv + texture_pixel_size * vec2(x, y);
|
||||
|
||||
if ((xy != clamp(xy, vec2(0.0), vec2(1.0)) || texture(texture, xy).a <= 0.0) == inside) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 uv = UV;
|
||||
|
||||
if (add_margins) {
|
||||
vec2 texture_pixel_size = vec2(1.0) / (vec2(1.0) / TEXTURE_PIXEL_SIZE + vec2(width * 2.0));
|
||||
|
||||
uv = (uv - texture_pixel_size * width) * TEXTURE_PIXEL_SIZE / texture_pixel_size;
|
||||
|
||||
if (uv != clamp(uv, vec2(0.0), vec2(1.0))) {
|
||||
COLOR.a = 0.0;
|
||||
} else {
|
||||
COLOR = texture(TEXTURE, uv);
|
||||
}
|
||||
} else {
|
||||
COLOR = texture(TEXTURE, uv);
|
||||
}
|
||||
|
||||
if ((COLOR.a > 0.0) == inside && hasContraryNeighbour(uv, TEXTURE_PIXEL_SIZE, TEXTURE)) {
|
||||
COLOR.rgb = inside ? mix(COLOR.rgb, color.rgb, color.a) : color.rgb;
|
||||
COLOR.a += (1.0 - COLOR.a) * color.a;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://crapjow6genqs
|
||||
@@ -0,0 +1,11 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://bredlcniiy5bp"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://crapjow6genqs" path="res://addons/escoria-ui-return-monkey-island/shaders/outline.gdshader" id="1_2bktm"]
|
||||
|
||||
[resource]
|
||||
shader = ExtResource("1_2bktm")
|
||||
shader_parameter/color = Color(0, 1, 0, 1)
|
||||
shader_parameter/width = 5.0
|
||||
shader_parameter/pattern = 0
|
||||
shader_parameter/inside = false
|
||||
shader_parameter/add_margins = true
|
||||
@@ -0,0 +1,11 @@
|
||||
[gd_resource type="Theme" load_steps=2 format=3 uid="uid://23n73qci0qc3"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3hnbv"]
|
||||
bg_color = Color(0.173269, 0.0886366, 0, 1)
|
||||
|
||||
[resource]
|
||||
MarginContainer/constants/margin_bottom = 15
|
||||
MarginContainer/constants/margin_left = 15
|
||||
MarginContainer/constants/margin_right = 15
|
||||
MarginContainer/constants/margin_top = 15
|
||||
PanelContainer/styles/panel = SubResource("StyleBoxFlat_3hnbv")
|
||||
@@ -1,4 +1,6 @@
|
||||
[gd_resource type="Theme" load_steps=4 format=3 uid="uid://djtwqnfbbt5t8"]
|
||||
[gd_resource type="Theme" load_steps=7 format=3 uid="uid://djtwqnfbbt5t8"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://vqqxktsw0f34" path="res://addons/escoria-ui-return-monkey-island/fonts/determination.ttf" id="1_p03cv"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="1"]
|
||||
bg_color = Color(0.14902, 0.14902, 0.14902, 0.784314)
|
||||
@@ -8,9 +10,25 @@ bg_color = Color(0.285156, 0.285156, 0.285156, 0.784314)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="3"]
|
||||
bg_color = Color(0.027451, 0.027451, 0.027451, 0.745098)
|
||||
expand_margin_left = 2.0
|
||||
expand_margin_top = 2.0
|
||||
expand_margin_right = 2.0
|
||||
expand_margin_bottom = 2.0
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_p03cv"]
|
||||
bg_color = Color(0.219501, 0.219501, 0.219501, 1)
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_p03cv"]
|
||||
|
||||
[resource]
|
||||
Button/fonts/font = ExtResource("1_p03cv")
|
||||
Button/styles/focus = SubResource("1")
|
||||
Button/styles/hover = SubResource("2")
|
||||
Button/styles/normal = SubResource("1")
|
||||
Button/styles/pressed = SubResource("3")
|
||||
MarginContainer/constants/margin_bottom = 5
|
||||
MarginContainer/constants/margin_left = 5
|
||||
MarginContainer/constants/margin_right = 5
|
||||
MarginContainer/constants/margin_top = 5
|
||||
Panel/styles/panel = SubResource("StyleBoxFlat_p03cv")
|
||||
PanelContainer/styles/panel = SubResource("StyleBoxEmpty_p03cv")
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
[gd_resource type="Theme" load_steps=4 format=3 uid="uid://bf2eet52fueam"]
|
||||
[gd_resource type="Theme" load_steps=7 format=3 uid="uid://bf2eet52fueam"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://vqqxktsw0f34" path="res://addons/escoria-ui-return-monkey-island/fonts/determination.ttf" id="1_6h504"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6h504"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="1"]
|
||||
content_margin_left = 4.0
|
||||
@@ -10,6 +14,8 @@ corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
expand_margin_left = 19.0
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_6h504"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="2"]
|
||||
bg_color = Color(0, 0, 0, 0.509804)
|
||||
corner_radius_top_left = 5
|
||||
@@ -29,10 +35,20 @@ expand_margin_right = 5.0
|
||||
expand_margin_bottom = 5.0
|
||||
|
||||
[resource]
|
||||
Button/fonts/font = ExtResource("1_6h504")
|
||||
Button/styles/hover = SubResource("StyleBoxFlat_6h504")
|
||||
Label/colors/font_color = Color(1, 1, 1, 1)
|
||||
Label/colors/font_color_shadow = Color(0, 0, 0, 0)
|
||||
Label/colors/font_outline_modulate = Color(1, 0, 0, 1)
|
||||
Label/colors/label_box_bg = Color(0, 0, 0, 0.745098)
|
||||
Label/fonts/font = ExtResource("1_6h504")
|
||||
Label/styles/normal = SubResource("1")
|
||||
MarginContainer/constants/margin_bottom = 5
|
||||
MarginContainer/constants/margin_left = 5
|
||||
MarginContainer/constants/margin_right = 5
|
||||
MarginContainer/constants/margin_top = 5
|
||||
PanelContainer/styles/panel = SubResource("StyleBoxEmpty_6h504")
|
||||
RichTextLabel/fonts/mono_font = ExtResource("1_6h504")
|
||||
RichTextLabel/fonts/normal_font = ExtResource("1_6h504")
|
||||
RichTextLabel/styles/focus = SubResource("2")
|
||||
RichTextLabel/styles/normal = SubResource("3")
|
||||
|
||||
@@ -1,39 +1,52 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://ctg3fukoficqk"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ckl3iy3v3v68s" path="res://addons/escoria-ui-return-monkey-island/video_player/video_player.gd" id="1"]
|
||||
[ext_resource type="Theme" uid="uid://djtwqnfbbt5t8" path="res://gymkhana.tres" id="2"]
|
||||
[ext_resource type="Theme" uid="uid://bf2eet52fueam" path="res://addons/escoria-ui-return-monkey-island/theme/ui.tres" id="1_384st"]
|
||||
|
||||
[sub_resource type="VideoStreamTheora" id="1"]
|
||||
|
||||
[sub_resource type="Shortcut" id="3"]
|
||||
|
||||
[node name="video_player" type="Control"]
|
||||
offset_right = 1285.0
|
||||
offset_bottom = 753.0
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 1280.0
|
||||
offset_bottom = 720.0
|
||||
theme = ExtResource("1_384st")
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
offset_left = -11.0
|
||||
offset_top = -3.0
|
||||
offset_right = 1285.0
|
||||
offset_bottom = 766.0
|
||||
layout_mode = 0
|
||||
offset_right = 1280.0
|
||||
offset_bottom = 720.0
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="VideoStreamPlayer" type="VideoStreamPlayer" parent="."]
|
||||
offset_right = 1279.0
|
||||
offset_bottom = 771.0
|
||||
layout_mode = 0
|
||||
offset_right = 1280.0
|
||||
offset_bottom = 720.0
|
||||
stream = SubResource("1")
|
||||
expand = false
|
||||
|
||||
[node name="Skip" type="Button" parent="."]
|
||||
offset_left = 1163.0
|
||||
offset_top = 680.0
|
||||
offset_right = 1250.0
|
||||
offset_bottom = 712.0
|
||||
theme = ExtResource("2")
|
||||
shortcut_in_tooltip = false
|
||||
[node name="PanelContainer" type="PanelContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -125.0
|
||||
offset_top = -40.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Skip" type="Button" parent="PanelContainer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
shortcut = SubResource("3")
|
||||
shortcut_in_tooltip = false
|
||||
text = "Saltar video"
|
||||
|
||||
[connection signal="finished" from="VideoStreamPlayer" to="." method="_on_VideoPlayer_finished"]
|
||||
[connection signal="pressed" from="Skip" to="." method="_on_Skip_pressed"]
|
||||
[connection signal="pressed" from="PanelContainer/MarginContainer/Skip" to="." method="_on_Skip_pressed"]
|
||||
|
||||
@@ -2,23 +2,23 @@
|
||||
|
||||
[ext_resource type="Resource" uid="uid://c4lhcwvjqx5ty" path="res://gymkhana/characters/eneko/eneko_smoking_animatios.tres" id="1"]
|
||||
[ext_resource type="Script" uid="uid://clg4yrj7v7eae" path="res://addons/escoria-ui-return-monkey-island/esc_player_with_tooltip.gd" id="2"]
|
||||
[ext_resource type="Texture2D" uid="uid://d3llwr16eq05e" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-005.png" id="4"]
|
||||
[ext_resource type="Texture2D" uid="uid://bfsccuoj7pmbf" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-002.png" id="5"]
|
||||
[ext_resource type="Texture2D" uid="uid://dttlqbxpeqwi2" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-003.png" id="6"]
|
||||
[ext_resource type="Texture2D" uid="uid://cms1wfpspj3lm" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-001.png" id="7"]
|
||||
[ext_resource type="Texture2D" uid="uid://dvn6aneqx6ki4" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-010.png" id="8"]
|
||||
[ext_resource type="Texture2D" uid="uid://c3oauyuv2m63f" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-016.png" id="9"]
|
||||
[ext_resource type="Texture2D" uid="uid://dj3afybpcing3" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-009.png" id="10"]
|
||||
[ext_resource type="Texture2D" uid="uid://b2fp3wx3yc4ac" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-008.png" id="11"]
|
||||
[ext_resource type="Texture2D" uid="uid://dc18o6ownjk4f" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-012.png" id="12"]
|
||||
[ext_resource type="Texture2D" uid="uid://cwaa6byg1k8jp" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-013.png" id="13"]
|
||||
[ext_resource type="Texture2D" uid="uid://b8dkc8xtqe4sh" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-004.png" id="14"]
|
||||
[ext_resource type="Texture2D" uid="uid://bhj0jj26o1v24" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-006.png" id="15"]
|
||||
[ext_resource type="Texture2D" uid="uid://cms3agh4k5nrs" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-007.png" id="16"]
|
||||
[ext_resource type="Texture2D" uid="uid://deqj1jv3tlrnw" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-015.png" id="17"]
|
||||
[ext_resource type="Texture2D" uid="uid://nrkwgky7ip6w" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-014.png" id="18"]
|
||||
[ext_resource type="Texture2D" uid="uid://bb02qchp31qbk" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-005.png" id="4"]
|
||||
[ext_resource type="Texture2D" uid="uid://d1077cyo2guax" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-002.png" id="5"]
|
||||
[ext_resource type="Texture2D" uid="uid://cnnggyic1gucn" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-003.png" id="6"]
|
||||
[ext_resource type="Texture2D" uid="uid://dv1wxodjpaugw" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-001.png" id="7"]
|
||||
[ext_resource type="Texture2D" uid="uid://cekotf5gc6xbk" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-010.png" id="8"]
|
||||
[ext_resource type="Texture2D" uid="uid://nfn7piw54ra0" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-016.png" id="9"]
|
||||
[ext_resource type="Texture2D" uid="uid://cpi3eoydqcvqj" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-009.png" id="10"]
|
||||
[ext_resource type="Texture2D" uid="uid://chr5s14dhyvqc" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-008.png" id="11"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjtv1xqse0yuy" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-012.png" id="12"]
|
||||
[ext_resource type="Texture2D" uid="uid://6bsralxp8ndw" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-013.png" id="13"]
|
||||
[ext_resource type="Texture2D" uid="uid://cxo2ep1tqvkqm" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-004.png" id="14"]
|
||||
[ext_resource type="Texture2D" uid="uid://bs7od2dqskigr" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-006.png" id="15"]
|
||||
[ext_resource type="Texture2D" uid="uid://c5ylkrfmvy4uj" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-007.png" id="16"]
|
||||
[ext_resource type="Texture2D" uid="uid://bibmiuts6ow8w" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-015.png" id="17"]
|
||||
[ext_resource type="Texture2D" uid="uid://ueswqch37ph4" path="res://gymkhana/characters/eneko/smoking_animation/unscreen-014.png" id="18"]
|
||||
[ext_resource type="Script" uid="uid://85bledusisk1" path="res://addons/escoria-core/game/core-scripts/esc_dialog_location.gd" id="19_maw5o"]
|
||||
[ext_resource type="Texture2D" uid="uid://dh4jyr03r21c8" path="res://gymkhana/characters/eneko/assets/speak-2.png" id="20"]
|
||||
[ext_resource type="Texture2D" uid="uid://d4lpmrlecmrj1" path="res://gymkhana/characters/eneko/assets/speak-2.png" id="20"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="2"]
|
||||
atlas = ExtResource("20")
|
||||
@@ -127,6 +127,6 @@ flip_h = true
|
||||
polygon = PackedVector2Array(-5, 6, -4, 22, -7, 32, -10, 39, -6, 43, 7, 43, 12, 35, 14, 25, 12, 12, 10, -25, 31, -38, 32, 37, 48, 37, 49, 28, 46, 22, 50, -1, 51, -35, 57, -39, 57, -72, 58, -74, 70, -68, 76, -69, 79, -76, 78, -81, 72, -89, 67, -104, 56, -114, 47, -115, 45, -120, 46, -140, 38, -145, 34, -146, 28, -144, 24, -139, 22, -129, 24, -122, 23, -119, 17, -114, 5, -109, -7, -80, -7, -62, 4, -58, 5, -53, -7, -34)
|
||||
|
||||
[node name="ESCDialogLocation" type="Marker2D" parent="."]
|
||||
position = Vector2(40, -240)
|
||||
position = Vector2(35, -270)
|
||||
script = ExtResource("19_maw5o")
|
||||
metadata/_custom_type_script = "uid://85bledusisk1"
|
||||
|
||||
@@ -331,6 +331,6 @@ position = Vector2(5, -151)
|
||||
shape = SubResource("21")
|
||||
|
||||
[node name="ESCDialogLocation" type="Marker2D" parent="."]
|
||||
position = Vector2(10, -452)
|
||||
position = Vector2(1, -452)
|
||||
script = ExtResource("5_10x32")
|
||||
metadata/_custom_type_script = "uid://85bledusisk1"
|
||||
|
||||
@@ -90,7 +90,7 @@ rtmi_dialog_simple/avatars_path="res://game/dialog_avatars"
|
||||
rtmi_dialog_simple/text_time_per_letter_ms=50
|
||||
rtmi_dialog_simple/text_time_per_fast_letter_ms=10
|
||||
rtmi_dialog_simple/clear_text_by_click_only=false
|
||||
rtmi_dialog_simple/reading_speed_in_wpm=200
|
||||
rtmi_dialog_simple/reading_speed_in_wpm=100
|
||||
rtmi_dialog_simple/left_click_action="Speed up"
|
||||
rtmi_dialog_simple/stop_talking_animation_on="End of audio"
|
||||
rtmi_ui/sound_library_folder="res://gymkhana/sounds/"
|
||||
|
||||
Reference in New Issue
Block a user