[gd_scene load_steps=13 format=3 uid="uid://da7w3vkhadfwe"] [ext_resource type="Script" uid="uid://damy6n4u215pu" path="res://scenes/button-flat/nine-patch-button.gd" id="1_ui6sg"] [ext_resource type="Texture2D" uid="uid://ct0ajcwno03h7" path="res://data/кнопка-квадрат-0.png" id="2_0cn5u"] [ext_resource type="Shader" uid="uid://cdmmsf161l6yw" path="res://shaders/strips.gdshader" id="2_5ngiq"] [sub_resource type="StyleBoxEmpty" id="1"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_hhdyc"] resource_local_to_scene = true shader = ExtResource("2_5ngiq") shader_parameter/rotation = 0.0 shader_parameter/color = Vector4(1, 1, 1, 0.1) shader_parameter/width = 3.0 shader_parameter/speed = 0.0 shader_parameter/disabled = false shader_parameter/scale = Vector2(1, 1) [sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_6nup5"] [sub_resource type="GDScript" id="GDScript_uyl5d"] script/source = "@tool extends Sprite2D ## Скорость движения чёрточек. @export var speed: float = 0.01: set(val): material.set('shader_parameter/speed', val) get: return material.get('shader_parameter/speed') ## Режим отображения. Когда [b]true[/b], чёрточки отображаются. @export var disabled: bool = false: set(val): material.set('shader_parameter/disabled', val) get: return material.get('shader_parameter/disabled') ## Угол наклона чёрточек. @export var strips_rotation: float = 0.0: set(val): material.set('shader_parameter/rotation', val) get: return material.get('shader_parameter/rotation') " [sub_resource type="StyleBoxEmpty" id="4"] [sub_resource type="StyleBoxEmpty" id="5"] [sub_resource type="StyleBoxEmpty" id="2"] [sub_resource type="StyleBoxEmpty" id="3"] [sub_resource type="StyleBoxEmpty" id="6"] [node name="container" type="PanelContainer"] offset_right = 20.0 offset_bottom = 20.0 theme_override_styles/panel = SubResource("1") script = ExtResource("1_ui6sg") [node name="recommend" type="ReferenceRect" parent="."] visible = false z_as_relative = false layout_mode = 2 border_color = Color(0, 0.549509, 0.921779, 1) border_width = 5.0 editor_only = false [node name="back" type="Sprite2D" parent="."] material = SubResource("ShaderMaterial_hhdyc") scale = Vector2(20, 20) texture = SubResource("PlaceholderTexture2D_6nup5") centered = false script = SubResource("GDScript_uyl5d") speed = 0.0 [node name="state" type="NinePatchRect" parent="."] layout_mode = 2 texture = ExtResource("2_0cn5u") patch_margin_left = 10 patch_margin_top = 10 patch_margin_right = 10 patch_margin_bottom = 10 axis_stretch_horizontal = 2 axis_stretch_vertical = 2 [node name="button" type="Button" parent="."] layout_mode = 2 theme_override_colors/font_outline_color = Color(0, 0, 0, 1) theme_override_constants/outline_size = 4 theme_override_font_sizes/font_size = 15 theme_override_styles/focus = SubResource("4") theme_override_styles/disabled = SubResource("5") theme_override_styles/hover = SubResource("2") theme_override_styles/pressed = SubResource("3") theme_override_styles/normal = SubResource("6") toggle_mode = true action_mode = 0 clip_text = true [connection signal="resized" from="." to="." method="_on_resized"] [connection signal="visibility_changed" from="back" to="back" method="_on_visibility_changed"]