add optbtn

This commit is contained in:
2024-12-13 09:01:01 +03:00
parent 7bc5aa8e3d
commit 3fa0b072bf
8 changed files with 174 additions and 66 deletions

View File

@@ -1,12 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://mxm8nthir8h4"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ddnjm"]
bg_color = Color(0, 0, 0, 1)
[gd_scene format=3 uid="uid://mxm8nthir8h4"]
[node name="OptionButton" type="OptionButton"]
offset_right = 130.0
offset_bottom = 25.0
focus_mode = 0
mouse_default_cursor_shape = 2
theme_override_styles/normal = SubResource("StyleBoxFlat_ddnjm")
alignment = 1

38
table/socket_status.tscn Normal file
View File

@@ -0,0 +1,38 @@
[gd_scene load_steps=6 format=3 uid="uid://dn3jp4r8ij3rf"]
[ext_resource type="Texture2D" uid="uid://dkef6xwxwdxi8" path="res://эмс-бланк.png" id="1_bsrew"]
[ext_resource type="Texture2D" uid="uid://b15flrfytxkop" path="res://эмс-бланк-пост.png" id="2_b2kjm"]
[ext_resource type="Texture2D" uid="uid://ijdfo2mml54" path="res://эмс-бланк-перем.png" id="3_odpjv"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jkmds"]
bg_color = Color(0, 0, 0, 1)
[sub_resource type="SpriteFrames" id="SpriteFrames_a7q1i"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("1_bsrew")
}, {
"duration": 1.0,
"texture": ExtResource("2_b2kjm")
}, {
"duration": 1.0,
"texture": ExtResource("3_odpjv")
}, {
"duration": 1.0,
"texture": null
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[node name="PanelContainer" type="PanelContainer"]
offset_right = 73.0
offset_bottom = 38.0
theme_override_styles/panel = SubResource("StyleBoxFlat_jkmds")
[node name="SZI_x" type="AnimatedSprite2D" parent="."]
position = Vector2(35, 11)
scale = Vector2(0.777778, 0.777778)
sprite_frames = SubResource("SpriteFrames_a7q1i")

View File

@@ -1,27 +1,14 @@
[gd_scene load_steps=6 format=3 uid="uid://dhg1syshfaem2"]
[ext_resource type="Material" uid="uid://s6xe8igevnv2" path="res://Shaders/shader_edu.tres" id="1_nb5jm"]
[gd_scene load_steps=2 format=3 uid="uid://dhg1syshfaem2"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_kwqxa"]
bg_color = Color(0, 0, 0, 1)
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_7vs72"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_houwj"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_o2hja"]
bg_color = Color(0.6, 0.6, 0.6, 0)
[node name="PanelContainer" type="PanelContainer"]
offset_right = 186.0
offset_bottom = 40.0
theme_override_styles/panel = SubResource("StyleBoxFlat_kwqxa")
[node name="CheckButton" type="CheckButton" parent="."]
material = ExtResource("1_nb5jm")
layout_mode = 2
size_flags_horizontal = 4
mouse_default_cursor_shape = 2
theme_override_styles/disabled_mirrored = SubResource("StyleBoxTexture_7vs72")
theme_override_styles/hover = SubResource("StyleBoxTexture_houwj")
theme_override_styles/normal = SubResource("StyleBoxFlat_o2hja")

View File

@@ -210,7 +210,7 @@ func get_key_indexes(key: String) -> Array:
##
func set_columns_min_size(sizes: Array) -> void:
func set_columns_min_size(sizes: Array) -> void:
assert((columns == 1) or (columns == sizes.size()))
columns = sizes.size()
var rows_count: = get_rows_count()