From ee0f2c759772d8b03973e82451c7c0b78b0542a0 Mon Sep 17 00:00:00 2001 From: sasha80 Date: Fri, 7 Jul 2023 15:51:34 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=20=D0=B2?= =?UTF-8?q?=20=D0=BF=D1=80=D0=BE=D1=86=D0=B5=D1=81=D1=81=D0=B5.=20=D0=9F?= =?UTF-8?q?=D1=80=D0=BE=D1=81=D1=82=D0=B0=D1=8F=20=D0=BA=D0=BD=D0=BE=D0=BF?= =?UTF-8?q?=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/button_flat.tscn | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 scenes/button_flat.tscn diff --git a/scenes/button_flat.tscn b/scenes/button_flat.tscn new file mode 100644 index 0000000..29f05f6 --- /dev/null +++ b/scenes/button_flat.tscn @@ -0,0 +1,49 @@ +[gd_scene load_steps=9 format=3 uid="uid://da7w3vkhadfwe"] + +[ext_resource type="Script" path="res://scenes/nine-patch-button.gd" id="1_wpbps"] +[ext_resource type="Texture2D" uid="uid://ct0ajcwno03h7" path="res://data/кнопка-квадрат-0.png" id="2_1xr6o"] + +[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("1_wpbps") +toggle_mode = true + +[node name="state" type="NinePatchRect" parent="."] +show_behind_parent = true +layout_mode = 2 +texture = ExtResource("2_1xr6o") +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"]