Открыть боковую панель
Левадный Владимир Юрьевич
universo-godot
Коммиты
f0adc8c5
Коммит
f0adc8c5
создал
Июн 04, 2020
по автору
Artem Go
Просмотр файлов
меню выхода, меню рекламы
владелец
30c8b96b
Изменения
16
Скрыть пробелы
Построчно
Рядом
blokoj/eliro/eliro.gd
0 → 100644
Просмотр файла @
f0adc8c5
extends
"res://kerno/fenestroj/tipo_c7.gd"
# наследует перетаскивание и закрытие меню при нажатии на "Х"
func
_on_no_button_pressed
():
$
Canvas
/
Popup
.
set_visible
(
false
)
# скрыть меню
func
_on_yes_button_pressed
():
get_tree
()
.
quit
()
#Выйти из игры
blokoj/eliro/eliro.tscn
0 → 100644
Просмотр файла @
f0adc8c5
[gd_scene load_steps=3 format=2]
[ext_resource path="res://kerno/fenestroj/tipo_c7.tscn" type="PackedScene" id=1]
[ext_resource path="res://blokoj/eliro/eliro.gd" type="Script" id=2]
[node name="eliro" instance=ExtResource( 1 )]
script = ExtResource( 2 )
[node name="Popup" parent="Canvas" index="0"]
visible = false
[node name="Label" parent="Canvas/Popup/ColorRect" index="1"]
anchor_right = 1.0
anchor_bottom = 0.0163273
margin_left = 84.0
margin_top = 3.0
margin_right = -85.0
text = "Выход"
[node name="Label2" parent="Canvas/Popup/ColorRect/ColorRect2" index="2"]
text = "Вы действительно
Хотите выйти?"
[connection signal="pressed" from="Canvas/Popup/ColorRect/ColorRect2/yes_button" to="." method="_on_yes_button_pressed"]
[connection signal="pressed" from="Canvas/Popup/ColorRect/ColorRect2/no_button" to="." method="_on_no_button_pressed"]
blokoj/sciigoj/Canavara_2.png
0 → 100644
Просмотр файла @
f0adc8c5
354,6 КБ
blokoj/sciigoj/Canavara_2.png.import
0 → 100644
Просмотр файла @
f0adc8c5
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Canavara_2.png-3a83b790b4325005479fe53411b41950.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://blokoj/sciigoj/Canavara_2.png"
dest_files=[ "res://.import/Canavara_2.png-3a83b790b4325005479fe53411b41950.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
blokoj/sciigoj/ad_1.gd
0 → 100644
Просмотр файла @
f0adc8c5
extends
"res://kerno/fenestroj/tipo_a2.gd"
# Called when the node enters the scene tree for the first time.
func
_ready
():
pass
# Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
blokoj/sciigoj/ad_1.tscn
0 → 100644
Просмотр файла @
f0adc8c5
[gd_scene load_steps=3 format=2]
[ext_resource path="res://kerno/fenestroj/tipo_a2.tscn" type="PackedScene" id=1]
[ext_resource path="res://blokoj/sciigoj/ad_1.gd" type="Script" id=2]
[node name="ad_1" instance=ExtResource( 1 )]
script = ExtResource( 2 )
[node name="Margin" parent="CanvasLayer" index="0"]
visible = false
kerno/menuo/resursoj/ad
/canavara.jpg
→
blokoj/sciigoj
/canavara.jpg
Просмотр файла @
f0adc8c5
Файл перемещен
kerno/menuo/resursoj/ad
/canavara.jpg.import
→
blokoj/sciigoj
/canavara.jpg.import
Просмотр файла @
f0adc8c5
...
...
@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/canavara.jpg-
7876e716c5d0660073d4769b4f8ed316
.stex"
path="res://.import/canavara.jpg-
b5baf7a95fb889865f1e349b52eb697a
.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://
kerno/menuo/resursoj/ad
/canavara.jpg"
dest_files=[ "res://.import/canavara.jpg-
7876e716c5d0660073d4769b4f8ed316
.stex" ]
source_file="res://
blokoj/sciigoj
/canavara.jpg"
dest_files=[ "res://.import/canavara.jpg-
b5baf7a95fb889865f1e349b52eb697a
.stex" ]
[params]
...
...
kerno/fenestroj/tipo_a2.gd
Просмотр файла @
f0adc8c5
extends
Control
var
display
=
5
var
display
=
30
#время в секундах до появления кнопки закрытия меню
onready
var
timer
=
get_node
(
"Timer"
)
...
...
@@ -16,7 +16,7 @@ func _on_Timer_timeout():
if
display
==
0
:
timer
.
stop
()
$
CanvasLayer
/
Margin
/
ColorRect
/
Close_button
.
set_visible
(
true
)
display
=
5
display
=
30
$
CanvasLayer
/
Margin
/
ColorRect
/
time_display
.
set_visible
(
false
)
func
_on_Close_button_pressed
():
$
CanvasLayer
/
Margin
.
set_visible
(
false
)
...
...
kerno/fenestroj/tipo_a2.tscn
Просмотр файла @
f0adc8c5
[gd_scene load_steps=3 format=2]
[ext_resource path="res://
kerno/menuo/resursoj/ad/c
anavara
.jp
g" type="Texture" id=1]
[ext_resource path="res://
blokoj/sciigoj/C
anavara
_2.pn
g" type="Texture" id=1]
[ext_resource path="res://kerno/fenestroj/tipo_a2.gd" type="Script" id=2]
[node name="tipo_a2" type="Control"]
...
...
@@ -13,7 +13,6 @@ __meta__ = {
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="Margin" type="MarginContainer" parent="CanvasLayer"]
visible = false
margin_left = 382.0
margin_top = 132.0
margin_right = 702.0
...
...
@@ -23,44 +22,50 @@ __meta__ = {
}
[node name="ColorRect" type="ColorRect" parent="CanvasLayer/Margin"]
margin_right = 3
19
.0
margin_right = 3
20
.0
margin_bottom = 21.0
color = Color( 0, 0, 0, 0.294118 )
__meta__ = {
"_edit_use_anchors_": true
}
[node name="ColorRect" type="ColorRect" parent="CanvasLayer/Margin/ColorRect"]
anchor_top = 0.952
anchor_right = 1.0
anchor_bottom = 0.952
margin_top = 0.00799942
margin_bottom = 320.008
color = Color( 0, 0, 0, 0.745098 )
__meta__ = {
"_edit_use_anchors_": true
}
[node name="TextureRect" type="TextureRect" parent="CanvasLayer/Margin/ColorRect/ColorRect"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 11.0
margin_top = 11.0
margin_right = 591.0
margin_bottom = 591.0
rect_scale = Vector2( 0.33, 0.33 )
texture = ExtResource( 1 )
expand = true
__meta__ = {
"_edit_use_anchors_": true
}
[node name="Label" type="Label" parent="CanvasLayer/Margin/ColorRect"]
anchor_left = 0.178125
anchor_top = 0.142857
anchor_right = 0.815625
anchor_bottom = 0.142857
margin_bottom = 17.0
text = "Рекламн
ое предложение
"
text = "Рекламн
ая информация
"
align = 1
__meta__ = {
"_edit_use_anchors_": true
}
[node name="Panel" type="Panel" parent="CanvasLayer/Margin/ColorRect"]
margin_top = 21.0
margin_right = 320.0
margin_bottom = 341.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TextureRect" type="TextureRect" parent="CanvasLayer/Margin/ColorRect/Panel"]
margin_left = 11.2648
margin_top = 10.8808
margin_right = 911.265
margin_bottom = 910.881
rect_scale = Vector2( 0.33, 0.33 )
texture = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="time_display" type="Label" parent="CanvasLayer/Margin/ColorRect"]
anchor_top = -0.0125485
anchor_right = 1.0
...
...
@@ -75,13 +80,13 @@ __meta__ = {
[node name="Close_button" type="Button" parent="CanvasLayer/Margin/ColorRect"]
anchor_left = 1.0
anchor_right = 1.0
margin_left = -
1
0.291
margin_left = -
2
0.291
margin_top = -0.582733
margin_right =
9
.70
923
margin_right =
0
.70
8984
margin_bottom = 22.4173
text = "X"
__meta__ = {
"_edit_use_anchors_":
fals
e
"_edit_use_anchors_":
tru
e
}
[node name="Timer" type="Timer" parent="."]
...
...
kerno/fenestroj/tipo_c7.gd
0 → 100644
Просмотр файла @
f0adc8c5
extends
Control
func
_on_Button_x_pressed
():
$
Canvas
/
Popup
.
set_visible
(
false
)
#func _on_ColorRect_gui_input(event):
# if event is InputEventMouseMotion and Input.is_mouse_button_pressed(BUTTON_LEFT):
# $Canvas/Popup/ColorRect.rect_position += event.relative
#перемещение меню
kerno/fenestroj/tipo_c7.tscn
0 → 100644
Просмотр файла @
f0adc8c5
[gd_scene load_steps=2 format=2]
[ext_resource path="res://kerno/fenestroj/tipo_c7.gd" type="Script" id=1]
[node name="tipo_c7" type="Control"]
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Canvas" type="CanvasLayer" parent="."]
[node name="Popup" type="Popup" parent="Canvas"]
visible = true
margin_right = 223.0
margin_bottom = 189.999
popup_exclusive = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ColorRect" type="ColorRect" parent="Canvas/Popup"]
margin_right = 220.0
margin_bottom = 22.0
color = Color( 0, 0, 0, 0.294118 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Button_x" type="Button" parent="Canvas/Popup/ColorRect"]
anchor_left = 1.006
anchor_right = 1.006
margin_left = -20.9047
margin_top = -0.850006
margin_right = 0.0953369
margin_bottom = 22.15
text = "X"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="Canvas/Popup/ColorRect"]
anchor_right = 1.01002
margin_left = 50.3253
margin_top = 2.64076
margin_right = -50.8799
margin_bottom = 19.6408
text = "название окна"
__meta__ = {
"_edit_use_anchors_": true
}
[node name="ColorRect2" type="ColorRect" parent="Canvas/Popup/ColorRect"]
margin_top = 22.0
margin_right = 220.0
margin_bottom = 185.0
color = Color( 0, 0, 0, 0.745098 )
__meta__ = {
"_edit_use_anchors_": true
}
[node name="yes_button" type="Button" parent="Canvas/Popup/ColorRect/ColorRect2"]
margin_left = 56.0
margin_top = 106.0
margin_right = 89.0
margin_bottom = 129.0
text = "Да"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="no_button" type="Button" parent="Canvas/Popup/ColorRect/ColorRect2"]
margin_left = 125.742
margin_top = 105.517
margin_right = 165.742
margin_bottom = 128.517
text = "Нет"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label2" type="Label" parent="Canvas/Popup/ColorRect/ColorRect2"]
anchor_right = 1.0
margin_left = 35.7529
margin_top = 39.5191
margin_right = -30.2471
margin_bottom = 76.5191
text = "text...."
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="gui_input" from="Canvas/Popup/ColorRect" to="." method="_on_ColorRect_gui_input"]
[connection signal="pressed" from="Canvas/Popup/ColorRect/Button_x" to="." method="_on_Button_x_pressed"]
kerno/menuo/menuo.gd
Просмотр файла @
f0adc8c5
...
...
@@ -246,7 +246,7 @@ func _on_b_itinero_pressed():
func
_on_ad_pressed
():
$
CanvasLayer
/
UI
/
ad
/
tipo_a2
/
CanvasLayer
/
Margin
.
set_visible
(
true
)
$
CanvasLayer
/
UI
/
ad
/
ad_1
/
CanvasLayer
/
Margin
.
set_visible
(
true
)
func
_on_interago_pressed
():
...
...
@@ -256,10 +256,16 @@ func _on_interago_pressed():
$
CanvasLayer
/
UI
/
interago
/
interago
.
print_button
()
$
CanvasLayer
/
UI
/
interago
/
interago
/
canvas
/
MarginContainer
.
set_visible
(
true
)
func
_on_eliro_button_up
():
$
CanvasLayer
/
UI
/
eliro
/
eliro
/
Canvas
/
Popup
.
popup
()
$
CanvasLayer
/
UI
/
eliro
/
eliro
/
Canvas
/
Popup
.
popup_centered
()
# запрашиваем объекты
func
load_objektoj
():
var
q
=
QueryObject
.
new
()
Net
.
send_json
(
q
.
get_objekto_json
(
2
,
3
,
2
,
Global
.
kubo
))
# $HTTPObjectoRequestFind.request(q.URL, Global.backend_headers, true, 2, q.objecto_query( 2, 3, 2, 1))
kerno/menuo/menuo.tscn
Просмотр файла @
f0adc8c5
[gd_scene load_steps=3
7
format=2]
[gd_scene load_steps=3
9
format=2]
[ext_resource path="res://blokoj/taskoj/scenoj/taskoj.tscn" type="PackedScene" id=1]
[ext_resource path="res://kerno/menuo/menuo.gd" type="Script" id=2]
...
...
@@ -23,7 +23,7 @@
[ext_resource path="res://kerno/menuo/resursoj/icons/tab1_3.png" type="Texture" id=21]
[ext_resource path="res://kerno/menuo/resursoj/icons/tab3_3.png" type="Texture" id=22]
[ext_resource path="res://kerno/menuo/resursoj/icons/logo2.png" type="Texture" id=23]
[ext_resource path="res://
kerno/fenestroj/tipo_a2
.tscn" type="PackedScene" id=24]
[ext_resource path="res://
blokoj/sciigoj/ad_1
.tscn" type="PackedScene" id=24]
[ext_resource path="res://kerno/menuo/resursoj/icons/icon7.png" type="Texture" id=25]
[ext_resource path="res://kerno/menuo/resursoj/icons/icon6.png" type="Texture" id=26]
[ext_resource path="res://kerno/menuo/resursoj/icons/icon5.png" type="Texture" id=27]
...
...
@@ -35,6 +35,8 @@
[ext_resource path="res://kerno/menuo/resursoj/icons/lefticon5.png" type="Texture" id=33]
[ext_resource path="res://kerno/menuo/resursoj/icons/lefticon11.png" type="Texture" id=34]
[ext_resource path="res://kerno/menuo/scenoj/interago.tscn" type="PackedScene" id=35]
[ext_resource path="res://kerno/menuo/resursoj/icons/lefticon10.png" type="Texture" id=36]
[ext_resource path="res://blokoj/eliro/eliro.tscn" type="PackedScene" id=37]
[sub_resource type="DynamicFont" id=1]
font_data = ExtResource( 4 )
...
...
@@ -487,14 +489,15 @@ margin_top = 48.0
margin_right = 54.0
margin_bottom = 102.0
rect_min_size = Vector2( 48, 48 )
hint_tooltip = "Рекламн
ые предложен
ия"
hint_tooltip = "Рекламн
ая информац
ия"
focus_mode = 0
mouse_default_cursor_shape = 2
enabled_focus_mode = 0
icon = ExtResource( 29 )
flat = true
[node name="tipo_a2" parent="CanvasLayer/UI/ad" instance=ExtResource( 24 )]
[node name="ad_1" parent="CanvasLayer/UI/ad" instance=ExtResource( 24 )]
visible = true
[node name="Taskoj" parent="CanvasLayer/UI" instance=ExtResource( 7 )]
margin_left = -5.85773
...
...
@@ -582,6 +585,25 @@ margin_top = 304.236
margin_right = -1994.56
margin_bottom = 304.236
[node name="eliro" type="Button" parent="CanvasLayer/UI"]
margin_left = -6.38464
margin_top = 353.756
margin_right = 53.6154
margin_bottom = 407.756
hint_tooltip = "Выход"
mouse_default_cursor_shape = 2
icon = ExtResource( 36 )
flat = true
__meta__ = {
"_edit_use_anchors_": true
}
[node name="eliro" parent="CanvasLayer/UI/eliro" instance=ExtResource( 37 )]
margin_left = 9.04407
margin_top = -354.225
margin_right = 9.04407
margin_bottom = -354.225
[node name="request" type="HTTPRequest" parent="."]
[connection signal="pressed" from="CanvasLayer/UI/real" to="." method="_on_real_pressed"]
[connection signal="pressed" from="CanvasLayer/UI/com" to="." method="_on_com_pressed"]
...
...
@@ -596,3 +618,4 @@ margin_bottom = 304.236
[connection signal="pressed" from="CanvasLayer/UI/b_itinero" to="." method="_on_b_itinero_pressed"]
[connection signal="pressed" from="CanvasLayer/UI/b_itinero" to="." method="_on_Itinero_pressed"]
[connection signal="pressed" from="CanvasLayer/UI/interago" to="." method="_on_interago_pressed"]
[connection signal="button_up" from="CanvasLayer/UI/eliro" to="." method="_on_eliro_button_up"]
kerno/menuo/scenoj/ad.tscn
удалено
100644 → 0
Просмотр файла @
30c8b96b
[gd_scene load_steps=2 format=2]
[ext_resource path="res://kerno/menuo/resursoj/ad/canavara.jpg" type="Texture" id=1]
[node name="ad_control" type="Control"]
__meta__ = {
"_edit_use_anchors_": false
}
[node name="WindowDialog" type="WindowDialog" parent="."]
visible = true
margin_left = 356.483
margin_top = 118.999
margin_right = 669.483
margin_bottom = 442.999
popup_exclusive = true
window_title = "Рекламная информация"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TextureRect" type="TextureRect" parent="WindowDialog"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 8.0
margin_top = 15.0
margin_right = 598.0
margin_bottom = 592.0
rect_scale = Vector2( 0.33, 0.33 )
texture = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
kerno/menuo/scenoj/ad2.tscn
удалено
100644 → 0
Просмотр файла @
30c8b96b
[gd_scene format=2]
[node name="Control" type="Control"]
__meta__ = {
"_edit_use_anchors_": false
}
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать