Открыть боковую панель
Левадный Владимир Юрьевич
universo-godot
Коммиты
ff443deb
Коммит
ff443deb
создал
Июн 01, 2020
по автору
Your Name
Просмотр файлов
Перенос окна Проекты/Задачи на новый тип через наследование базового вида окна
владелец
3357017d
Изменения
47
Скрыть пробелы
Построчно
Рядом
blokoj/kosmosxipoj/scenoj/baseSpaceship/engine.glb.import
Просмотр файла @
ff443deb
...
...
@@ -24,7 +24,6 @@ meshes/ensure_tangents=true
meshes/storage=0
meshes/light_baking=0
meshes/lightmap_texel_size=0.1
skins/use_named_skins=true
external_files/store_in_subdir=false
animation/import=true
animation/fps=15
...
...
blokoj/kosmosxipoj/scenoj/baseSpaceship/engine_ins.glb.import
Просмотр файла @
ff443deb
...
...
@@ -24,7 +24,6 @@ meshes/ensure_tangents=true
meshes/storage=0
meshes/light_baking=0
meshes/lightmap_texel_size=0.1
skins/use_named_skins=true
external_files/store_in_subdir=false
animation/import=true
animation/fps=15
...
...
blokoj/kosmosxipoj/scenoj/baseSpaceship/engines.glb.import
Просмотр файла @
ff443deb
...
...
@@ -24,7 +24,6 @@ meshes/ensure_tangents=true
meshes/storage=0
meshes/light_baking=0
meshes/lightmap_texel_size=0.1
skins/use_named_skins=true
external_files/store_in_subdir=false
animation/import=true
animation/fps=15
...
...
blokoj/taskoj/scenoj/taskoj.tscn
Просмотр файла @
ff443deb
[gd_scene load_steps=
4
format=2]
[gd_scene load_steps=
5
format=2]
[ext_resource path="res://blokoj/taskoj/skriptoj/taskoj.gd" type="Script" id=1]
[ext_resource path="res://blokoj/taskoj/skriptoj/http_TaskojRequest.gd" type="Script" id=2]
[ext_resource path="res://blokoj/taskoj/skriptoj/http_request.gd" type="Script" id=3]
[ext_resource path="res://kerno/fenestroj/tipo_a1.tscn" type="PackedScene" id=2]
[ext_resource path="res://blokoj/taskoj/skriptoj/http_TaskojRequest.gd" type="Script" id=3]
[ext_resource path="res://blokoj/taskoj/skriptoj/http_request.gd" type="Script" id=4]
[node name="Taskoj"
type="Control"
]
[node name="Taskoj"
instance=ExtResource( 2 )
]
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HTTPProjektoRequestFind" type="HTTPRequest" parent="."]
script = ExtResource( 3 )
[node name="HTTPTaskojRequestFind" type="HTTPRequest" parent="."]
script = ExtResource( 2 )
[node name="canvas" type="CanvasLayer" parent="."]
layer = 5
[node name="MarginContainer" type="MarginContainer" parent="canvas"]
[node name="MarginContainer" parent="canvas" index="0"]
visible = false
self_modulate = Color( 1, 1, 1, 0 )
margin_left = 295.116
margin_top = 121.057
margin_right = 544.116
margin_bottom = 280.058
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ColorRect" type="ColorRect" parent="canvas/MarginContainer"]
modulate = Color( 0.996078, 0.996078, 0.996078, 1 )
self_modulate = Color( 0, 0, 0, 1 )
show_behind_parent = true
margin_right = 249.0
margin_bottom = 159.0
color = Color( 0, 0, 0, 0.294118 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ResizeControl" type="Control" parent="canvas/MarginContainer/ColorRect"]
anchor_left = 0.47
anchor_top = 0.415
anchor_right = 1.032
anchor_bottom = 1.038
margin_left = -0.0300064
margin_top = 0.0549927
margin_right = 0.0320129
margin_bottom = 0.0459747
mouse_default_cursor_shape = 12
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="canvas/MarginContainer"]
self_modulate = Color( 1, 1, 1, 0.784314 )
margin_right = 249.0
margin_bottom = 159.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="canvas/MarginContainer/VBoxContainer"]
margin_right = 249.0
margin_bottom = 17.0
[node name="Label" parent="canvas/MarginContainer/VBoxContainer" index="0"]
text = "Проекты"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Close_button" type="Button" parent="canvas/MarginContainer/VBoxContainer/Label"]
self_modulate = Color( 1, 1, 1, 0.784314 )
anchor_left = 1.0
anchor_top = -0.2
anchor_right = 1.0
anchor_bottom = 1.4
margin_left = -19.0
margin_bottom = -9.53674e-07
custom_colors/font_color = Color( 1, 1, 1, 1 )
text = "X"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="scroll" type="ScrollContainer" parent="canvas/MarginContainer/VBoxContainer"]
margin_top = 21.0
margin_right = 249.0
margin_bottom = 159.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HTTPProjektoRequestFind" type="HTTPRequest" parent="." index="1"]
script = ExtResource( 4 )
[node name="ItemList" type="ItemList" parent="canvas/MarginContainer/VBoxContainer/scroll"]
self_modulate = Color( 1, 1, 1, 0.784314 )
margin_right = 249.0
margin_bottom = 138.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_colors/guide_color = Color( 0.117647, 0.8, 0.909804, 1 )
custom_colors/font_color_selected = Color( 0.192157, 0.886275, 0.956863, 1 )
custom_colors/font_color = Color( 1, 1, 1, 1 )
max_text_lines = 10
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="draw" from="." to="." method="_on_Taskoj_draw"]
[connection signal="request_completed" from="HTTPProjektoRequestFind" to="HTTPProjektoRequestFind" method="_on_HTTPRequestFind_request_completed"]
[connection signal="request_completed" from="HTTPTaskojRequestFind" to="HTTPTaskojRequestFind" method="_on_HTTPTaskojRequestFind_request_completed"]
[connection signal="gui_input" from="canvas/MarginContainer" to="." method="_drag"]
[connection signal="gui_input" from="canvas/MarginContainer/ColorRect/ResizeControl" to="." method="_resize"]
[connection signal="pressed" from="canvas/MarginContainer/VBoxContainer/Label/Close_button" to="." method="_on_Close_button_pressed"]
[node name="HTTPTaskojRequestFind" type="HTTPRequest" parent="." index="2"]
script = ExtResource( 3 )
[connection signal="item_selected" from="canvas/MarginContainer/VBoxContainer/scroll/ItemList" to="." method="_on_ItemList_item_selected"]
[connection signal="request_completed" from="HTTPProjektoRequestFind" to="HTTPProjektoRequestFind" method="_on_HTTPProjektoRequestFind_request_completed"]
[connection signal="request_completed" from="HTTPTaskojRequestFind" to="HTTPTaskojRequestFind" method="_on_HTTPTaskojRequestFind_request_completed"]
blokoj/taskoj/skriptoj/http_request.gd
Просмотр файла @
ff443deb
...
...
@@ -2,7 +2,8 @@ extends HTTPRequest
# Обработчик ответа на HTTP запрос к бэкэнду
func
_on_HTTPRequestFind_request_completed
(
result
,
response_code
,
headers
,
body
):
func
_on_HTTPProjektoRequestFind_request_completed
(
result
,
response_code
,
headers
,
body
):
var
resp
=
body
.
get_string_from_utf8
()
var
parsed_resp
=
parse_json
(
resp
)
var
simpled_data
=
parsed_resp
[
'
data'
][
'
universoProjekto'
][
'
edges'
]
...
...
blokoj/taskoj/skriptoj/taskoj.gd
Просмотр файла @
ff443deb
extends
Control
func
_on_Close_button_pressed
():
$
"canvas/MarginContainer"
.
set_visible
(
false
)
$
canvas
/
MarginContainer
/
VBoxContainer
/
Label
.
text
=
"Проекты"
func
_resize
(
event
:
InputEvent
)
->
void
:
if
event
is
InputEventMouseMotion
and
Input
.
is_mouse_button_pressed
(
BUTTON_LEFT
):
$
canvas
/
MarginContainer
.
rect_size
+=
event
.
relative
func
_drag
(
event
:
InputEvent
)
->
void
:
if
event
is
InputEventMouseMotion
and
Input
.
is_mouse_button_pressed
(
BUTTON_LEFT
):
$
canvas
/
MarginContainer
.
rect_position
+=
event
.
relative
extends
"res://kerno/fenestroj/tipo1.gd"
const
QueryObject
=
preload
(
"queries.gd"
)
var
ItemListContent
=
[]
func
_ready
():
Title
.
connect
(
"load_taskoj"
,
self
,
"_reload_taskoj"
)
# перезагружаем список объектов
func
_reload_taskoj
():
$
"canvas/MarginContainer/VBoxContainer/scroll/ItemList"
.
clear
()
FillItemList
()
func
FillItemList
():
# Заполняет список найдеными продуктами
for
Item
in
ItemListContent
:
get_node
(
"canvas/MarginContainer/VBoxContainer/scroll/ItemList"
)
.
add_item
(
Item
,
null
,
true
)
# Вызывается перед появлением окна
func
_on_Taskoj_draw
():
var
q
=
QueryObject
.
new
()
# Делаем запрос к бэкэнду
$
HTTPProjektoRequestFind
.
request
(
q
.
URL
,
Global
.
backend_headers
,
true
,
2
,
q
.
taskoj_projekto
())
func
_on_ItemList_item_selected
(
index
):
...
...
@@ -42,3 +26,10 @@ func _on_ItemList_item_selected(index):
$
HTTPTaskojRequestFind
.
request
(
q
.
URL
,
Global
.
backend_headers
,
true
,
2
,
q
.
taskoj_query
())
$
canvas
/
MarginContainer
/
VBoxContainer
/
Label
.
text
=
"Задачи"
# Вызывается перед появлением окна
func
_on_Window_draw
():
var
q
=
QueryObject
.
new
()
# Делаем запрос к бэкэнду
$
HTTPProjektoRequestFind
.
request
(
q
.
URL
,
Global
.
backend_headers
,
true
,
2
,
q
.
taskoj_projekto
())
kerno/menuo/menuo.tscn
Просмотр файла @
ff443deb
[gd_scene load_steps=37 format=2]
[ext_resource path="res://blokoj/taskoj/scenoj/
t
askoj.tscn" type="PackedScene" id=1]
[ext_resource path="res://blokoj/taskoj/scenoj/
T
askoj.tscn" type="PackedScene" id=1]
[ext_resource path="res://kerno/menuo/menuo.gd" type="Script" id=2]
[ext_resource path="res://kerno/menuo/scenoj/profilo_butono.tscn" type="PackedScene" id=3]
[ext_resource path="res://kerno/menuo/resursoj/fonts/18957.otf" type="DynamicFontData" id=4]
...
...
@@ -500,10 +500,6 @@ flat = true
expand_icon = false
[node name="Window" parent="CanvasLayer/UI/Taskoj" instance=ExtResource( 1 )]
anchor_top = -1.259
anchor_bottom = -1.259
margin_top = 57.914
margin_bottom = 57.914
[node name="RCentro" parent="CanvasLayer/UI" instance=ExtResource( 8 )]
margin_left = -5.63028
...
...
@@ -580,6 +576,7 @@ margin_bottom = 304.236
[connection signal="pressed" from="CanvasLayer/UI/Profilo" to="." method="_on_Profilo_pressed"]
[connection signal="pressed" from="CanvasLayer/UI/ad" to="." method="_on_ad_pressed"]
[connection signal="pressed" from="CanvasLayer/UI/Taskoj" to="." method="_on_Taskoj_pressed"]
[connection signal="draw" from="CanvasLayer/UI/Taskoj/Window" to="CanvasLayer/UI/Taskoj/Window" method="_on_Window_draw"]
[connection signal="pressed" from="CanvasLayer/UI/RCentro" to="." method="_on_Resurso_Center_pressed"]
[connection signal="about_to_show" from="CanvasLayer/UI/RCentro/Window" to="CanvasLayer/UI/RCentro/Window" method="_on_Window_about_to_show"]
[connection signal="pressed" from="CanvasLayer/UI/Objektoj" to="." method="_on_Objektoj_pressed"]
...
...
Пред
1
2
3
След
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать