Skip to content

Commit a54e3f4

Browse files
authored
Merge pull request #10 from sketchfab/beta-2-fixes
Beta 2 fixes
2 parents 911989b + 235d613 commit a54e3f4

File tree

13 files changed

+278
-104
lines changed

13 files changed

+278
-104
lines changed

Main.tscn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22

33
[node name="Spatial" type="Spatial" index="0"]
44

5-

addons/sketchfab/Main.gd

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ func _enter_tree():
5454
cfg.load(CONFIG_FILE_PATH)
5555

5656
find_node("Logo").texture = (
57-
Utils.create_texture_from_file("res://addons/sketchfab/sketchfab.png.noimport"))
57+
Utils.create_texture_from_file("res://addons/sketchfab/sketchfab.png.noimport", SceneTree.get_meta("__editor_scale") / 2.0))
58+
59+
func _ready():
60+
var editor_scale = SceneTree.get_meta("__editor_scale")
61+
logged_avatar.rect_min_size *= editor_scale
62+
not_logged.rect_min_size *= editor_scale
63+
logged.find_node("MainBlock").rect_min_size *= editor_scale
5864

5965
func _exit_tree():
6066
cfg.save(CONFIG_FILE_PATH)

addons/sketchfab/Main.tscn

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ anchor_top = 0.0
3636
anchor_right = 0.0
3737
anchor_bottom = 0.0
3838
margin_right = 1024.0
39-
margin_bottom = 140.0
40-
rect_min_size = Vector2( 0, 140 )
39+
margin_bottom = 90.0
4140
rect_pivot_offset = Vector2( 0, 0 )
4241
rect_clip_content = false
4342
mouse_filter = 0
@@ -60,7 +59,7 @@ anchor_bottom = 0.0
6059
margin_left = 10.0
6160
margin_top = 8.0
6261
margin_right = 1014.0
63-
margin_bottom = 134.0
62+
margin_bottom = 84.0
6463
rect_pivot_offset = Vector2( 0, 0 )
6564
rect_clip_content = false
6665
mouse_filter = 1
@@ -75,8 +74,8 @@ anchor_left = 0.0
7574
anchor_top = 0.0
7675
anchor_right = 0.0
7776
anchor_bottom = 0.0
78-
margin_top = 63.0
79-
margin_bottom = 63.0
77+
margin_top = 38.0
78+
margin_bottom = 38.0
8079
rect_pivot_offset = Vector2( 0, 0 )
8180
rect_clip_content = false
8281
mouse_filter = 1
@@ -92,10 +91,10 @@ anchor_left = 0.0
9291
anchor_top = 0.0
9392
anchor_right = 0.0
9493
anchor_bottom = 0.0
95-
margin_left = 648.0
96-
margin_top = 22.0
94+
margin_left = 664.0
95+
margin_top = 5.0
9796
margin_right = 860.0
98-
margin_bottom = 104.0
97+
margin_bottom = 71.0
9998
rect_pivot_offset = Vector2( 0, 0 )
10099
rect_clip_content = false
101100
mouse_filter = 1
@@ -111,7 +110,7 @@ anchor_left = 0.0
111110
anchor_top = 0.0
112111
anchor_right = 0.0
113112
anchor_bottom = 0.0
114-
margin_right = 212.0
113+
margin_right = 196.0
115114
margin_bottom = 14.0
116115
rect_pivot_offset = Vector2( 0, 0 )
117116
rect_clip_content = false
@@ -120,7 +119,7 @@ mouse_default_cursor_shape = 0
120119
size_flags_horizontal = 1
121120
size_flags_vertical = 4
122121
custom_colors/font_color = Color( 0.4, 0.4, 0.4, 1 )
123-
text = "Logged as"
122+
text = "Logged in as"
124123
align = 1
125124
percent_visible = 1.0
126125
lines_skipped = 0
@@ -134,8 +133,8 @@ anchor_top = 0.0
134133
anchor_right = 0.0
135134
anchor_bottom = 0.0
136135
margin_top = 18.0
137-
margin_right = 212.0
138-
margin_bottom = 82.0
136+
margin_right = 196.0
137+
margin_bottom = 66.0
139138
rect_pivot_offset = Vector2( 0, 0 )
140139
rect_clip_content = false
141140
mouse_filter = 1
@@ -146,14 +145,14 @@ custom_constants/separation = 8
146145
alignment = 0
147146
_sections_unfolded = [ "Rect", "Size Flags", "custom_constants" ]
148147

149-
[node name="_" type="VBoxContainer" parent="Header/_/Logged/_" index="0"]
148+
[node name="MainBlock" type="VBoxContainer" parent="Header/_/Logged/_" index="0"]
150149

151150
anchor_left = 0.0
152151
anchor_top = 0.0
153152
anchor_right = 0.0
154153
anchor_bottom = 0.0
155154
margin_right = 140.0
156-
margin_bottom = 64.0
155+
margin_bottom = 48.0
157156
rect_min_size = Vector2( 140, 0 )
158157
rect_pivot_offset = Vector2( 0, 0 )
159158
rect_clip_content = false
@@ -164,7 +163,7 @@ size_flags_vertical = 5
164163
alignment = 0
165164
_sections_unfolded = [ "Rect", "Size Flags", "custom_constants" ]
166165

167-
[node name="UserName" type="Label" parent="Header/_/Logged/_/_" index="0"]
166+
[node name="UserName" type="Label" parent="Header/_/Logged/_/MainBlock" index="0"]
168167

169168
anchor_left = 0.0
170169
anchor_top = 0.0
@@ -184,8 +183,9 @@ percent_visible = 1.0
184183
lines_skipped = 0
185184
max_lines_visible = -1
186185

187-
[node name="Plan" type="Label" parent="Header/_/Logged/_/_" index="1"]
186+
[node name="Plan" type="Label" parent="Header/_/Logged/_/MainBlock" index="1"]
188187

188+
visible = false
189189
anchor_left = 0.0
190190
anchor_top = 0.0
191191
anchor_right = 0.0
@@ -205,15 +205,15 @@ percent_visible = 1.0
205205
lines_skipped = 0
206206
max_lines_visible = -1
207207

208-
[node name="Logout" type="Button" parent="Header/_/Logged/_/_" index="2"]
208+
[node name="Logout" type="Button" parent="Header/_/Logged/_/MainBlock" index="2"]
209209

210210
anchor_left = 0.0
211211
anchor_top = 0.0
212212
anchor_right = 0.0
213213
anchor_bottom = 0.0
214-
margin_top = 36.0
214+
margin_top = 18.0
215215
margin_right = 140.0
216-
margin_bottom = 56.0
216+
margin_bottom = 38.0
217217
rect_pivot_offset = Vector2( 0, 0 )
218218
rect_clip_content = false
219219
focus_mode = 2
@@ -237,9 +237,9 @@ anchor_top = 0.0
237237
anchor_right = 0.0
238238
anchor_bottom = 0.0
239239
margin_left = 148.0
240-
margin_right = 212.0
241-
margin_bottom = 64.0
242-
rect_min_size = Vector2( 64, 64 )
240+
margin_right = 196.0
241+
margin_bottom = 48.0
242+
rect_min_size = Vector2( 48, 48 )
243243
rect_pivot_offset = Vector2( 0, 0 )
244244
rect_clip_content = false
245245
mouse_filter = 0
@@ -259,9 +259,8 @@ anchor_top = 0.0
259259
anchor_right = 0.0
260260
anchor_bottom = 0.0
261261
margin_left = 864.0
262-
margin_top = 16.0
263262
margin_right = 1004.0
264-
margin_bottom = 110.0
263+
margin_bottom = 76.0
265264
rect_min_size = Vector2( 140, 0 )
266265
rect_pivot_offset = Vector2( 0, 0 )
267266
rect_clip_content = false
@@ -274,6 +273,7 @@ _sections_unfolded = [ "Anchor", "Grow Direction", "Margin", "Rect", "Size Flags
274273

275274
[node name="_" type="Label" parent="Header/_/NotLogged" index="0"]
276275

276+
visible = false
277277
anchor_left = 0.0
278278
anchor_top = 0.0
279279
anchor_right = 0.0
@@ -287,7 +287,7 @@ mouse_default_cursor_shape = 0
287287
size_flags_horizontal = 1
288288
size_flags_vertical = 4
289289
custom_colors/font_color = Color( 0.4, 0.4, 0.4, 1 )
290-
text = "You're not logged"
290+
text = "You're not logged in"
291291
align = 1
292292
percent_visible = 1.0
293293
lines_skipped = 0
@@ -300,9 +300,8 @@ anchor_left = 0.0
300300
anchor_top = 0.0
301301
anchor_right = 0.0
302302
anchor_bottom = 0.0
303-
margin_top = 18.0
304303
margin_right = 140.0
305-
margin_bottom = 42.0
304+
margin_bottom = 24.0
306305
rect_pivot_offset = Vector2( 0, 0 )
307306
rect_clip_content = false
308307
focus_mode = 2
@@ -325,9 +324,9 @@ anchor_left = 0.0
325324
anchor_top = 0.0
326325
anchor_right = 0.0
327326
anchor_bottom = 0.0
328-
margin_top = 46.0
327+
margin_top = 28.0
329328
margin_right = 140.0
330-
margin_bottom = 70.0
329+
margin_bottom = 52.0
331330
rect_pivot_offset = Vector2( 0, 0 )
332331
rect_clip_content = false
333332
focus_mode = 2
@@ -351,9 +350,9 @@ anchor_left = 0.0
351350
anchor_top = 0.0
352351
anchor_right = 0.0
353352
anchor_bottom = 0.0
354-
margin_top = 74.0
353+
margin_top = 56.0
355354
margin_right = 140.0
356-
margin_bottom = 94.0
355+
margin_bottom = 76.0
357356
rect_pivot_offset = Vector2( 0, 0 )
358357
rect_clip_content = false
359358
focus_mode = 2
@@ -377,9 +376,9 @@ anchor_left = 0.0
377376
anchor_top = 0.0
378377
anchor_right = 0.0
379378
anchor_bottom = 0.0
380-
margin_top = 144.0
379+
margin_top = 94.0
381380
margin_right = 1024.0
382-
margin_bottom = 212.0
381+
margin_bottom = 162.0
383382
rect_pivot_offset = Vector2( 0, 0 )
384383
rect_clip_content = false
385384
mouse_filter = 0
@@ -796,7 +795,7 @@ anchor_left = 0.0
796795
anchor_top = 0.0
797796
anchor_right = 0.0
798797
anchor_bottom = 0.0
799-
margin_top = 216.0
798+
margin_top = 166.0
800799
margin_right = 1024.0
801800
margin_bottom = 600.0
802801
rect_pivot_offset = Vector2( 0, 0 )
@@ -820,7 +819,7 @@ anchor_bottom = 0.0
820819
margin_left = 8.0
821820
margin_top = 8.0
822821
margin_right = 1016.0
823-
margin_bottom = 376.0
822+
margin_bottom = 426.0
824823
rect_pivot_offset = Vector2( 0, 0 )
825824
rect_clip_content = true
826825
mouse_filter = 0
@@ -910,7 +909,7 @@ percent_visible = 1.0
910909
lines_skipped = 0
911910
max_lines_visible = -1
912911

913-
[connection signal="pressed" from="Header/_/Logged/_/_/Logout" to="." method="_on_Logout_pressed"]
912+
[connection signal="pressed" from="Header/_/Logged/_/MainBlock/Logout" to="." method="_on_Logout_pressed"]
914913

915914
[connection signal="text_changed" from="Header/_/NotLogged/UserName" to="." method="_on_any_login_text_changed"]
916915

0 commit comments

Comments
 (0)