Добавление таблицы в настройках
This commit is contained in:
12
scenes/tilemap/Control.gd
Normal file
12
scenes/tilemap/Control.gd
Normal file
@@ -0,0 +1,12 @@
|
||||
extends Control
|
||||
|
||||
var scene_list=[]
|
||||
|
||||
func node_list(node):
|
||||
scene_list.append(node)
|
||||
|
||||
func _enter_tree():
|
||||
get_tree().node_added.connect(self.node_list)
|
||||
func _ready():
|
||||
get_tree().node_added.disconnect(self.node_list) #should be first string in _ready()
|
||||
print(scene_list)
|
||||
3
scenes/tilemap/navig.tscn
Normal file
3
scenes/tilemap/navig.tscn
Normal file
@@ -0,0 +1,3 @@
|
||||
[gd_scene format=3 uid="uid://e3sw6q228iai"]
|
||||
|
||||
[node name="Navig" type="Node2D"]
|
||||
1
scenes/настройки/GridContainer.gd
Normal file
1
scenes/настройки/GridContainer.gd
Normal file
@@ -0,0 +1 @@
|
||||
extends "res://table/table.gd"
|
||||
102
scenes/настройки/нас1E59.tmp
Normal file
102
scenes/настройки/нас1E59.tmp
Normal file
@@ -0,0 +1,102 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://bnptm4rlp60dq"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/настройки/настройки.gd" id="1_2l3rd"]
|
||||
[ext_resource type="Script" path="res://table/table.gd" id="2_ts42i"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_anjmx"]
|
||||
script/source = "extends LineEdit
|
||||
|
||||
func _ready() -> void: text = ProjectSettings.get('application/config/map_server_addr')
|
||||
|
||||
|
||||
func _on_text_changed(new_text: String) -> void:
|
||||
ProjectSettings.set('application/config/map_server_addr', new_text)
|
||||
ProjectSettings.save_custom('override.cfg')
|
||||
"
|
||||
|
||||
[node name="Настройки" type="Panel"]
|
||||
script = ExtResource("1_2l3rd")
|
||||
|
||||
[node name="table" type="GridContainer" parent="."]
|
||||
layout_mode = 2
|
||||
offset_left = 32.0
|
||||
offset_top = 96.0
|
||||
offset_right = 241.0
|
||||
offset_bottom = 535.0
|
||||
columns = 2
|
||||
script = ExtResource("2_ts42i")
|
||||
|
||||
[node name="Label1" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 16.0
|
||||
offset_top = 60.0
|
||||
offset_right = 434.0
|
||||
offset_bottom = 82.0
|
||||
text = "Управление элементами в режиме с ограниченным доступом"
|
||||
|
||||
[node name="Label2" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 16.0
|
||||
offset_top = 20.0
|
||||
offset_right = 476.0
|
||||
offset_bottom = 50.0
|
||||
text = "Текущий режим доступа: полный"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="edt_mapaddr" type="LineEdit" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 660.0
|
||||
offset_top = 80.0
|
||||
offset_right = 1032.0
|
||||
offset_bottom = 110.0
|
||||
script = SubResource("GDScript_anjmx")
|
||||
|
||||
[node name="Label" type="Label" parent="edt_mapaddr"]
|
||||
layout_mode = 0
|
||||
offset_left = -180.0
|
||||
offset_right = -20.0
|
||||
offset_bottom = 30.0
|
||||
text = "Адрес сервера карт:"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="GridContainer2" type="GridContainer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 478.0
|
||||
offset_top = 154.0
|
||||
offset_right = 784.0
|
||||
offset_bottom = 260.0
|
||||
columns = 2
|
||||
|
||||
[node name="external_cu_lbl" type="Label" parent="GridContainer2"]
|
||||
layout_mode = 2
|
||||
text = "Внешнее целеуказание."
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="external_cu_btn" type="CheckButton" parent="GridContainer2"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label19" type="Label" parent="GridContainer2"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "Кнопка «Подавление».
|
||||
Отключить отображение этой кнопки,
|
||||
что бы тип помех применялся сразу."
|
||||
|
||||
[node name="CheckButton18" type="CheckButton" parent="GridContainer2"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 6
|
||||
size_flags_vertical = 6
|
||||
button_pressed = true
|
||||
|
||||
[node name="lbl_commit" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 480.0
|
||||
offset_top = 20.0
|
||||
offset_right = 1040.0
|
||||
offset_bottom = 50.0
|
||||
text = "Текущая версия ПО УАРЭП:"
|
||||
vertical_alignment = 1
|
||||
|
||||
[connection signal="text_changed" from="edt_mapaddr" to="edt_mapaddr" method="_on_text_changed"]
|
||||
[connection signal="pressed" from="GridContainer2/external_cu_btn" to="." method="_on_external_cu_btn_pressed"]
|
||||
28
scenes/работа/CharacterBody2D.gd
Normal file
28
scenes/работа/CharacterBody2D.gd
Normal file
@@ -0,0 +1,28 @@
|
||||
class_name characterBody extends CharacterBody2D
|
||||
|
||||
|
||||
const SPEED = 300.0
|
||||
const JUMP_VELOCITY = -400.0
|
||||
|
||||
## Получить гравитацию из настроек проекта для синхронизации с узлами RigidBody.
|
||||
var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")
|
||||
|
||||
|
||||
func _physics_process(delta):
|
||||
# Add the gravity.
|
||||
if not is_on_floor():
|
||||
velocity.y += gravity * delta
|
||||
|
||||
# Handle jump.
|
||||
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
|
||||
velocity.y = JUMP_VELOCITY
|
||||
|
||||
# Get the input direction and handle the movement/deceleration.
|
||||
# As good practice, you should replace UI actions with custom gameplay actions.
|
||||
var direction = Input.get_axis("ui_left", "ui_right")
|
||||
if direction:
|
||||
velocity.x = direction * SPEED
|
||||
else:
|
||||
velocity.x = move_toward(velocity.x, 0, SPEED)
|
||||
|
||||
move_and_slide()
|
||||
5
table/editl.tscn
Normal file
5
table/editl.tscn
Normal file
@@ -0,0 +1,5 @@
|
||||
[gd_scene format=3 uid="uid://bvbvtgwps54yr"]
|
||||
|
||||
[node name="Editl" type="LineEdit"]
|
||||
caret_blink = true
|
||||
caret_blink_interval = 0.5
|
||||
5
table/empti.tscn
Normal file
5
table/empti.tscn
Normal file
@@ -0,0 +1,5 @@
|
||||
[gd_scene format=3 uid="uid://bwesvho0mk6qk"]
|
||||
|
||||
[node name="Empti" type="Label"]
|
||||
offset_right = 48.0
|
||||
offset_bottom = 19.0
|
||||
16
table/lable.tscn
Normal file
16
table/lable.tscn
Normal file
@@ -0,0 +1,16 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dwphmxstaxn4v"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yign5"]
|
||||
bg_color = Color(0.117647, 0.117647, 0.117647, 0.85098)
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.0562916, 0.0562916, 0.0562916, 1)
|
||||
corner_radius_top_left = 3
|
||||
corner_radius_top_right = 3
|
||||
corner_radius_bottom_right = 3
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[node name="Lable" type="Label"]
|
||||
offset_right = 104.0
|
||||
offset_bottom = 24.0
|
||||
theme_override_colors/font_color = Color(1, 0.596078, 0.4, 1)
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_yign5")
|
||||
13
table/taggle.tscn
Normal file
13
table/taggle.tscn
Normal file
@@ -0,0 +1,13 @@
|
||||
[gd_scene format=3 uid="uid://dm7hh7ibuin78"]
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 96.0
|
||||
offset_bottom = 24.0
|
||||
|
||||
[node name="CheckButton" type="CheckButton" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 30.0
|
||||
offset_right = 74.0
|
||||
offset_bottom = 24.0
|
||||
Reference in New Issue
Block a user