farming-simulator/scenes/components/dialog_ui.tscn
Dmitrii Bykov 48a992e07a
Some checks failed
Godot CI / Import + smoke test (push) Failing after 28s
fix мышь + лицо отца (глаза, нос, рот, брови, щетина, уши)
МЫШЬ КАМЕРА (главный баг):
- Crosshair Control в центре экрана с дефолтным mouse_filter=STOP
  ЖРАЛ ВСЕ mouse_motion events когда курсор был в центре (а он
  всегда в центре при MOUSE_MODE_CAPTURED). FPV._unhandled_input
  не вызывался → камера не вращалась.
- Поставил mouse_filter=2 (IGNORE) на Crosshair, CenterDot,
  OuterRing, InnerHole — теперь они только рендерятся, события
  пролетают мимо.
- Поставил mouse_filter=2 ТАКЖЕ на все HUD-лейблы (DateTime,
  Objective, Money, Weather, Stats, ControlsHint, PromptLabel)
  и SubtitlePanel — на будущее, чтобы курсор поверх них не
  обламывал камеру.

СЛАЙДЕРЫ В НАСТРОЙКАХ:
- HBoxContainer rows с custom_minimum_size (0, 24).
- Labels: size_flags_vertical=4 (SHRINK_CENTER) +
  vertical_alignment=1 (CENTER) + min_size (W, 24).
- Sliders: size_flags_vertical=4 + min_size (140, 24).
- Все элементы строки выровнены по центру по вертикали — слайдер
  и текст теперь на одной линии, хитбокс совпадает с визуалом.

ЛИЦО ОТЦА:
- Голова была просто кубом скин-цвета. Теперь у отца:
  * 2 глаза (белая склера 0.038×0.025×0.005 + тёмный зрачок
    0.018×0.018×0.005 поверх) — реально видно куда смотрит.
  * Брови 0.045×0.012 материалом mat_hair (тёмные).
  * Нос 0.028×0.05×0.035 — выпирает на 0.012м вперёд от лица.
  * Рот 0.065×0.012 тёмно-красным mat_mouth.
  * Щетина 0.2×0.075 на нижней части лица mat_stubble
    (тёмно-серо-коричневый) — мужик не побрился.
  * 2 уха 0.025×0.045×0.025 по бокам головы.
- Все элементы — children FatherNPC/Head, наследуют поворот
  родителя, остаются на лице при walking-animation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 19:16:49 +03:00

187 lines
4.5 KiB
Text

[gd_scene load_steps=2 format=3]
[ext_resource type="Script" path="res://scripts/ui/dialog_manager.gd" id="1_dlg"]
[node name="DialogManager" type="CanvasLayer"]
layer = 10
script = ExtResource("1_dlg")
[node name="DateTimeLabel" type="Label" parent="."]
offset_left = 8.0
offset_top = 6.0
offset_right = 280.0
offset_bottom = 22.0
mouse_filter = 2
text = ""
modulate = Color(0.92, 0.92, 0.92, 1)
[node name="ObjectiveLabel" type="Label" parent="."]
offset_left = 340.0
offset_top = 6.0
offset_right = 632.0
offset_bottom = 22.0
mouse_filter = 2
text = ""
horizontal_alignment = 2
modulate = Color(0.94, 0.71, 0.1, 1)
[node name="MoneyLabel" type="Label" parent="."]
offset_left = 340.0
offset_top = 24.0
offset_right = 632.0
offset_bottom = 40.0
mouse_filter = 2
text = ""
horizontal_alignment = 2
modulate = Color(0.75, 0.75, 0.75, 1)
[node name="WeatherLabel" type="Label" parent="."]
offset_left = 340.0
offset_top = 215.0
offset_right = 632.0
offset_bottom = 231.0
mouse_filter = 2
text = ""
horizontal_alignment = 2
modulate = Color(0.7, 0.75, 0.85, 1)
[node name="StatsLabel" type="Label" parent="."]
offset_left = 8.0
offset_top = 215.0
offset_right = 300.0
offset_bottom = 231.0
mouse_filter = 2
text = ""
modulate = Color(0.94, 0.71, 0.1, 1)
[node name="ControlsHint" type="Label" parent="."]
offset_left = 0.0
offset_top = 28.0
offset_right = 640.0
offset_bottom = 42.0
mouse_filter = 2
text = "WASD ходить · мышь смотреть · ЛКМ взаимодействие · ESC меню · Q сохранить и выйти"
horizontal_alignment = 1
modulate = Color(0.45, 0.45, 0.45, 0.8)
[node name="Crosshair" type="Control" parent="."]
offset_left = 316.0
offset_top = 176.0
offset_right = 324.0
offset_bottom = 184.0
mouse_filter = 2
[node name="CenterDot" type="ColorRect" parent="Crosshair"]
offset_left = 3.0
offset_top = 3.0
offset_right = 5.0
offset_bottom = 5.0
mouse_filter = 2
color = Color(1, 1, 1, 0.85)
[node name="OuterRing" type="ColorRect" parent="Crosshair"]
offset_left = 0.0
offset_top = 0.0
offset_right = 8.0
offset_bottom = 8.0
mouse_filter = 2
color = Color(0, 0, 0, 0.4)
[node name="InnerHole" type="ColorRect" parent="Crosshair"]
offset_left = 1.0
offset_top = 1.0
offset_right = 7.0
offset_bottom = 7.0
mouse_filter = 2
color = Color(0, 0, 0, 0)
[node name="PromptLabel" type="Label" parent="."]
offset_left = 0.0
offset_top = 192.0
offset_right = 640.0
offset_bottom = 212.0
mouse_filter = 2
text = ""
horizontal_alignment = 1
modulate = Color(0.94, 0.71, 0.1, 1)
[node name="SubtitlePanel" type="PanelContainer" parent="."]
offset_left = 16.0
offset_top = 240.0
offset_right = 624.0
offset_bottom = 354.0
mouse_filter = 2
[node name="V" type="VBoxContainer" parent="SubtitlePanel"]
layout_mode = 2
mouse_filter = 2
[node name="Who" type="Label" parent="SubtitlePanel/V"]
layout_mode = 2
mouse_filter = 2
text = "[Я]"
modulate = Color(0.94, 0.71, 0.1, 1)
[node name="Text" type="RichTextLabel" parent="SubtitlePanel/V"]
custom_minimum_size = Vector2(590, 60)
layout_mode = 2
mouse_filter = 2
bbcode_enabled = true
text = ""
fit_content = true
scroll_active = false
autowrap_mode = 3
[node name="Hint" type="Label" parent="SubtitlePanel/V"]
layout_mode = 2
mouse_filter = 2
text = "ЛКМ или ПРОБЕЛ — дальше"
horizontal_alignment = 2
modulate = Color(0.5, 0.5, 0.5, 1)
[node name="NoteOverlay" type="Control" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = 640.0
offset_bottom = 360.0
mouse_filter = 0
[node name="DarkBG" type="ColorRect" parent="NoteOverlay"]
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = 640.0
offset_bottom = 360.0
color = Color(0, 0, 0, 0.78)
[node name="Center" type="CenterContainer" parent="NoteOverlay"]
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = 640.0
offset_bottom = 360.0
[node name="P" type="PanelContainer" parent="NoteOverlay/Center"]
custom_minimum_size = Vector2(440, 200)
layout_mode = 2
[node name="V2" type="VBoxContainer" parent="NoteOverlay/Center/P"]
layout_mode = 2
[node name="Title" type="Label" parent="NoteOverlay/Center/P/V2"]
layout_mode = 2
text = "Записка"
horizontal_alignment = 1
modulate = Color(0.94, 0.71, 0.1, 1)
[node name="Text" type="RichTextLabel" parent="NoteOverlay/Center/P/V2"]
custom_minimum_size = Vector2(420, 100)
layout_mode = 2
bbcode_enabled = true
text = ""
fit_content = true
autowrap_mode = 3
[node name="Hint" type="Label" parent="NoteOverlay/Center/P/V2"]
layout_mode = 2
text = "ЛКМ или ПРОБЕЛ — закрыть"
horizontal_alignment = 1
modulate = Color(0.5, 0.5, 0.5, 1)