РВП.
This commit is contained in:
@@ -25,7 +25,6 @@ func is_pressed(): return $button.is_pressed()
|
||||
func is_toggle_mode(): return $button.is_toggle_mode()
|
||||
|
||||
|
||||
|
||||
func _on_button_toggled(val: bool):
|
||||
if val: $state.set_texture(texture_state1)
|
||||
else: $state.set_texture(texture_state0)
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://da7w3vkhadfwe"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://ct0ajcwno03h7" path="res://data/кнопка-квадрат-0.png" id="1"]
|
||||
[ext_resource type="Script" path="res://scenes/nine-patch-button.gd" id="2"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="1"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="6"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="2"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="3"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="5"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="4"]
|
||||
|
||||
[node name="container" type="PanelContainer"]
|
||||
offset_right = 30.0
|
||||
offset_bottom = 30.0
|
||||
theme_override_styles/panel = SubResource("1")
|
||||
script = ExtResource("2")
|
||||
toggle_mode = true
|
||||
|
||||
[node name="state" type="NinePatchRect" parent="."]
|
||||
show_behind_parent = true
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1")
|
||||
patch_margin_left = 10
|
||||
patch_margin_top = 10
|
||||
patch_margin_right = 10
|
||||
patch_margin_bottom = 10
|
||||
axis_stretch_horizontal = 1
|
||||
axis_stretch_vertical = 1
|
||||
|
||||
[node name="button" type="Button" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = SubResource("6")
|
||||
theme_override_styles/hover = SubResource("2")
|
||||
theme_override_styles/pressed = SubResource("3")
|
||||
theme_override_styles/disabled = SubResource("5")
|
||||
theme_override_styles/focus = SubResource("4")
|
||||
toggle_mode = true
|
||||
clip_text = true
|
||||
|
||||
[node name="label" type="Label" parent="."]
|
||||
layout_mode = 2
|
||||
|
||||
[connection signal="toggled" from="button" to="." method="_on_button_toggled"]
|
||||
@@ -1,26 +0,0 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://bq7haw1ypiv48"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/рамка.gd" id="1"]
|
||||
[ext_resource type="Texture2D" uid="uid://cs6i1xwx0pmdk" path="res://data/рамка-панели.png" id="2"]
|
||||
|
||||
[node name="ramka" type="NinePatchRect"]
|
||||
offset_right = 150.0
|
||||
offset_bottom = 100.0
|
||||
texture = ExtResource("2")
|
||||
patch_margin_left = 15
|
||||
patch_margin_top = 30
|
||||
patch_margin_right = 15
|
||||
patch_margin_bottom = 10
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="header" type="Label" parent="."]
|
||||
clip_contents = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 22.0
|
||||
grow_horizontal = 2
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "caption text"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -1,8 +0,0 @@
|
||||
[gd_scene format=2]
|
||||
|
||||
[node name="Label" type="Label"]
|
||||
margin_right = 122.0
|
||||
margin_bottom = 34.0
|
||||
custom_colors/font_color = Color( 1, 0.596078, 0.4, 1 )
|
||||
valign = 1
|
||||
clip_text = true
|
||||
Reference in New Issue
Block a user