diff --git a/scenes/prologue/act2_install.tscn b/scenes/prologue/act2_install.tscn index bf09c0b..9a41ffa 100644 --- a/scenes/prologue/act2_install.tscn +++ b/scenes/prologue/act2_install.tscn @@ -119,7 +119,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 [node name="Window" type="PanelContainer" parent="Center"] -custom_minimum_size = Vector2(580, 348) +custom_minimum_size = Vector2(580, 220) layout_mode = 2 theme_override_styles/panel = SubResource("style_window") @@ -137,10 +137,10 @@ horizontal_alignment = 1 modulate = Color(0.94, 0.71, 0.1, 1) [node name="Body" type="RichTextLabel" parent="Center/Window/V"] -custom_minimum_size = Vector2(540, 220) +custom_minimum_size = Vector2(540, 0) layout_mode = 2 bbcode_enabled = true -fit_content = false +fit_content = true scroll_active = true scroll_following = false mouse_filter = 0 diff --git a/scripts/prologue/act2_install.gd b/scripts/prologue/act2_install.gd index 638bd7b..6b4afd9 100644 --- a/scripts/prologue/act2_install.gd +++ b/scripts/prologue/act2_install.gd @@ -74,9 +74,21 @@ func _ready() -> void: _to_license_intro() +func _set_body_compact() -> void: + body_label.fit_content = true + body_label.custom_minimum_size = Vector2(540, 0) + + +func _set_body_scrollable(min_h: int) -> void: + body_label.fit_content = false + body_label.custom_minimum_size = Vector2(540, min_h) + body_label.scroll_to_line(0) + + func _to_license_intro() -> void: current_step = Step.LICENSE_INTRO title_label.text = "Шиндовс 9 — Шаг 1 из 5" + _set_body_compact() body_label.text = LICENSE_SHORT body_label.visible = true btn_a.text = "Принять" @@ -93,7 +105,8 @@ func _to_license_intro() -> void: func _to_license_full() -> void: current_step = Step.LICENSE_FULL license_read_clicked = true - title_label.text = "Шиндовс 9 — Полный текст соглашения" + title_label.text = "Шиндовс 9 — Полный текст соглашения (прокрути колесом мыши)" + _set_body_scrollable(220) body_label.text = LICENSE_FULL btn_a.text = "Принять" btn_a.visible = true @@ -103,6 +116,7 @@ func _to_license_full() -> void: func _to_disk() -> void: current_step = Step.DISK title_label.text = "Шиндовс 9 — Шаг 2 из 5" + _set_body_compact() body_label.text = "[center][b]Выбор диска для установки[/b][/center]\n\n[•] Диск C:\\\\ (250 ГБ свободно)\n\nДругие диски не обнаружены." btn_a.text = "Далее" btn_a.visible = true @@ -112,6 +126,7 @@ func _to_disk() -> void: func _to_username() -> void: current_step = Step.USERNAME title_label.text = "Шиндовс 9 — Шаг 3 из 5" + _set_body_compact() body_label.text = "[center][b]Введите имя пользователя[/b][/center]\n\nЭто имя будет использоваться в системе. Минимум 2 символа, максимум 24. Только буквы и цифры." var rng: RandomNumberGenerator = RandomNumberGenerator.new() rng.randomize() @@ -131,6 +146,7 @@ func _to_username() -> void: func _to_password() -> void: current_step = Step.PASSWORD title_label.text = "Шиндовс 9 — Шаг 4 из 5" + _set_body_compact() body_label.text = "[center][b]Введите пароль[/b][/center]\n\nИли оставьте поле пустым / отметьте «Без пароля». Можно потом изменить в настройках." input_field.text = "" input_field.secret = true @@ -151,6 +167,7 @@ func _to_password() -> void: func _to_timezone() -> void: current_step = Step.TIMEZONE title_label.text = "Шиндовс 9 — Шаг 5 из 5" + _set_body_compact() body_label.text = "[center][b]Выберите часовой пояс[/b][/center]\n\nЭто повлияет на время в системе. По умолчанию — UTC+3 (С., страна Р)." input_field.visible = false input_field.secret = false @@ -165,6 +182,7 @@ func _to_timezone() -> void: func _to_installing() -> void: current_step = Step.INSTALLING title_label.text = "Шиндовс 9 — Установка" + _set_body_compact() body_label.text = "[center]Подождите, пока система устанавливается.\nЭто займёт пару минут.[/center]" input_field.visible = false input_hint.visible = false