Skip to content

Commit 1580cb6

Browse files
authored
Update (#3)
* update 2021.04.14 * Delete addons directory
1 parent 7e1d0e1 commit 1580cb6

File tree

19 files changed

+248
-204
lines changed

19 files changed

+248
-204
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
export.cfg
66
export_presets.cfg
77
override.cfg
8+
addons/
89

910
#
1011
# Mono-specific ignores

main/res/shaders/lerp_shader.tres

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void light() {
110110

111111
}
112112
"
113-
graph_offset = Vector2( -795, 286 )
113+
graph_offset = Vector2( -915, 323 )
114114
mode = 1
115115
flags/light_only = false
116116
nodes/fragment/0/position = Vector2( 400, 120 )

main/res/shaders/round_avatar.tres

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void light() {
4545

4646
}
4747
"
48-
graph_offset = Vector2( -435, 214 )
48+
graph_offset = Vector2( -428, 247 )
4949
mode = 1
5050
flags/light_only = false
5151
nodes/fragment/2/node = SubResource( 1 )

main/scn/app/main.gd

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
extends Control
22

3-
const version : String = "1.3"
3+
const version : String = "1.4"
44

55
onready var activities : Control = $Main/Activities
66
onready var topbar : HBoxContainer = $TopBar
77
onready var loading : Control = $Main/Loading
8-
onready var error_lbl : Label = $Main/ERROR
8+
onready var error_container : AspectRatioContainer = $Main/ErrorContainer
9+
onready var error_lbl : Label = error_container.get_node("ERROR")
910

1011
onready var user_id_lbl : Label = $Main/AppInfo/UserId
1112
onready var version_lbl : Label = $Main/AppInfo/Version
@@ -47,17 +48,17 @@ func _on_signin_completed():
4748
activities.add_child(Activities.home)
4849

4950
func _on_show_error(error : String):
51+
error_container.set_size(Vector2())
5052
error_lbl.set_text(error)
51-
error_lbl.rect_size = error_lbl.rect_min_size
52-
animator.interpolate_property(error_lbl, "rect_position",
53-
Vector2(rect_size.x/2 - error_lbl.rect_size.x/2, rect_size.y + 10),
54-
Vector2(rect_size.x/2 - error_lbl.rect_size.x/2, rect_size.y - error_lbl.rect_size.y - 50),
53+
animator.interpolate_property(error_container, "rect_position",
54+
Vector2(rect_size.x/2 - error_container.rect_size.x/2, rect_size.y + 10),
55+
Vector2(rect_size.x/2 - error_container.rect_size.x/2, rect_size.y - error_container.rect_size.y),
5556
0.3, Tween.TRANS_QUAD, Tween.EASE_OUT)
5657
animator.start()
57-
yield(get_tree().create_timer(8), "timeout")
58-
animator.interpolate_property(error_lbl, "rect_position",
59-
error_lbl.rect_position,
60-
Vector2(rect_size.x/2 - error_lbl.rect_size.x/2, rect_size.y + 10),
58+
yield(get_tree().create_timer(9), "timeout")
59+
animator.interpolate_property(error_container, "rect_position",
60+
error_container.rect_position,
61+
Vector2(rect_size.x/2 - error_container.rect_size.x/2, rect_size.y + 10),
6162
0.3, Tween.TRANS_QUAD, Tween.EASE_OUT)
6263
animator.start()
6364

main/scn/app/main.tscn

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -281,18 +281,28 @@ __meta__ = {
281281
[node name="Timer" type="Timer" parent="MainContainer/Main/Loading"]
282282
wait_time = 0.7
283283

284-
[node name="ERROR" type="Label" parent="MainContainer/Main"]
284+
[node name="ErrorContainer" type="AspectRatioContainer" parent="MainContainer/Main"]
285285
anchor_left = 0.5
286286
anchor_top = 1.0
287287
anchor_right = 0.5
288288
anchor_bottom = 1.0
289-
margin_left = -330.5
290-
margin_top = 10.5
291-
margin_right = 330.5
292-
margin_bottom = 37.5
289+
margin_left = -250.0
290+
margin_top = 8.0
291+
margin_right = 250.0
292+
margin_bottom = 40.0
293+
size_flags_horizontal = 0
294+
size_flags_vertical = 0
295+
alignment_vertical = 0
296+
__meta__ = {
297+
"_edit_use_anchors_": false
298+
}
299+
300+
[node name="ERROR" type="Label" parent="MainContainer/Main/ErrorContainer"]
301+
margin_right = 500.0
302+
margin_bottom = 32.0
293303
grow_horizontal = 2
294-
grow_vertical = 2
295-
rect_min_size = Vector2( 400, 0 )
304+
rect_min_size = Vector2( 500, 0 )
305+
size_flags_horizontal = 3
296306
custom_styles/normal = SubResource( 9 )
297307
custom_colors/font_color = Color( 1, 0, 0.235294, 1 )
298308
align = 1

main/scn/friend_list/friend_list.tscn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[ext_resource path="res://main/scn/friend_list/friend_list.gd" type="Script" id=1]
44

5-
[sub_resource type="StyleBoxEmpty" id=1]
5+
[sub_resource type="StyleBoxEmpty" id=7]
66
content_margin_left = 7.0
77
content_margin_right = 7.0
88

@@ -28,7 +28,7 @@ margin_right = 1024.0
2828
margin_bottom = 600.0
2929
size_flags_horizontal = 3
3030
size_flags_vertical = 3
31-
custom_styles/bg = SubResource( 1 )
31+
custom_styles/bg = SubResource( 7 )
3232
__meta__ = {
3333
"_edit_use_anchors_": false
3434
}

main/scn/home/home.gd

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@ extends PanelContainer
33
signal show_error()
44
signal loading()
55

6-
onready var posts_section : VBoxContainer = $HomeContainer/Sections/Posts
7-
onready var post_box : VBoxContainer = posts_section.get_node("ScrollPost/PostContainer")
6+
onready var sections_container : VBoxContainer = $HomeContainer/Sections
7+
onready var posts_section : VBoxContainer = sections_container.get_node("Posts")
8+
onready var users_list_section : VBoxContainer = sections_container.get_node("UsersList")
9+
onready var settings_section : VBoxContainer = sections_container.get_node("Settings")
10+
onready var profile_section : VBoxContainer = sections_container.get_node("Profile")
811

9-
onready var profile_section : VBoxContainer = $HomeContainer/Sections/Profile
12+
onready var post_box : VBoxContainer = posts_section.get_node("ScrollPost/PostContainer")
1013
onready var profile_post_container : VBoxContainer = profile_section.get_node("ScrollPost/PostContainer")
1114

1215
onready var menu : VBoxContainer = $HomeContainer/Menu
1316
onready var side_bar : VBoxContainer = $HomeContainer/SideBar
1417
onready var friend_list : VBoxContainer = side_bar.get_node("FriendList")
1518

16-
onready var users_list_section : VBoxContainer = $HomeContainer/Sections/UsersList
17-
onready var settings_section : VBoxContainer = $HomeContainer/Sections/Settings
1819

1920
onready var chat_container : GridContainer = $AspectRatioContainer/ChatContainer
2021

@@ -28,6 +29,8 @@ var friend_posts : Array = []
2829

2930
var posts_db_reference : FirebaseDatabaseReference
3031

32+
var window_size : Vector2
33+
3134
func _connect_signals():
3235
connect("item_rect_changed", self, "_on_Home_item_rect_changed")
3336
$ShareSomethingContainer.connect("share_post", self, "add_shared_post")
@@ -173,10 +176,7 @@ func _on_show_user_profile(user_id : String, user_name : String):
173176
show_section(profile_section)
174177
profile_section.load_profile(user_id, user_name)
175178
emit_signal("loading", false)
176-
177179

178-
func display_post(post_document : Dictionary):
179-
pass
180180

181181
func _on_ShareBtn_pressed():
182182
$ShareSomethingContainer.show()
@@ -201,7 +201,7 @@ func _on_show_chat(chat_node : ChatNode):
201201

202202

203203
func show_section(section : Control) -> void:
204-
for _section in $HomeContainer/Sections.get_children():
204+
for _section in sections_container.get_children():
205205
_section.hide()
206206
section.show()
207207

@@ -234,6 +234,9 @@ func _on_NotificationsBtn_pressed():
234234
pass
235235

236236
func _on_Home_item_rect_changed():
237+
update_chat_container()
238+
239+
func update_chat_container():
237240
if chat_container == null:
238241
return
239242
chat_container.set_columns(floor(rect_size.x / 300))

0 commit comments

Comments
 (0)