Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed colors/margins/borders and other issues of scene tree refactor #7

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion game/app/scenes/about.gd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func _process(_delta):

func _write_to_label():
# Fails when weird stuff happens with scene transitions. Don't ask me why.
# Also fails in editor sometimes.
# Also fails in editor sometimes.
# It can be savely ignored because it is called more than once!
if !is_instance_valid(_label):
return
Expand Down
2 changes: 0 additions & 2 deletions game/app/scenes/game_card.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ onready var _texture_icon_rect := $Card/TitleSection/icon
onready var _label_playtime := $Card/TitleSection/VC/HC/LabelPlaytimeNumber
onready var _label_playtime_unit := $Card/TitleSection/VC/HC/LabelPlaytimeUnit


onready var _popup_label_title := $PopupDialogInfo/VC/TitleSection/HC/Title/LabelTitle
onready var _popup_label_description := $PopupDialogInfo/VC/InfoSection/HC/Description
onready var _popup_icon_rect := $PopupDialogInfo/VC/TitleSection/HC/TextureRectIcon
Expand All @@ -23,7 +22,6 @@ onready var _popup_playtime_unit_2 := $PopupDialogInfo/VC/TitleSection/HC/Title/
onready var _popup_label_highscore := $PopupDialogInfo/VC/TitleSection/HC/HighScore/LabelHighscore



func setup(game_config: ConfigFile):
_game_config = game_config
var game_id = game_config.get_meta("folder_name")
Expand Down
69 changes: 36 additions & 33 deletions game/app/scenes/game_card.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ content_margin_left = 16.0
content_margin_right = 16.0
content_margin_top = 16.0
content_margin_bottom = 16.0
bg_color = Color( 0.203922, 0.2, 0.2, 1 )
bg_color = Color( 0.2, 0.2, 0.2, 1 )

[sub_resource type="StyleBoxFlat" id=16]
border_width_left = 1
Expand All @@ -43,7 +43,7 @@ content_margin_left = 16.0
content_margin_right = 16.0
content_margin_top = 16.0
content_margin_bottom = 16.0
bg_color = Color( 0.14902, 0.14902, 0.14902, 1 )
bg_color = Color( 0.164706, 0.164706, 0.164706, 1 )
corner_radius_bottom_right = 1
corner_radius_bottom_left = 1

Expand All @@ -64,6 +64,7 @@ margin_top = 12.0
margin_right = 308.0
margin_bottom = 175.0
rect_min_size = Vector2( 296, 0 )
custom_constants/separation = 11

[node name="TitleSection" type="HBoxContainer" parent="Card"]
margin_right = 296.0
Expand Down Expand Up @@ -139,9 +140,9 @@ __meta__ = {
}

[node name="Description" type="RichTextLabel" parent="Card"]
margin_top = 69.0
margin_top = 75.0
margin_right = 296.0
margin_bottom = 123.0
margin_bottom = 117.0
size_flags_vertical = 3
bbcode_enabled = true

Expand Down Expand Up @@ -180,11 +181,10 @@ __meta__ = {
[node name="VC" type="VBoxContainer" parent="PopupDialogInfo"]
anchor_right = 1.0
anchor_bottom = 1.0
rect_min_size = Vector2( 500, 300 )
rect_min_size = Vector2( 650, 400 )
custom_constants/separation = 0
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": false
"_edit_lock_": true
}

[node name="TitleSection" type="PanelContainer" parent="PopupDialogInfo/VC"]
Expand All @@ -201,6 +201,7 @@ margin_left = 12.0
margin_top = 12.0
margin_right = 638.0
margin_bottom = 76.0
custom_constants/separation = 10
alignment = 2
__meta__ = {
"_edit_use_anchors_": false
Expand All @@ -214,13 +215,13 @@ texture = ExtResource( 3 )
expand = true

[node name="Title" type="VBoxContainer" parent="PopupDialogInfo/VC/TitleSection/HC"]
margin_left = 69.0
margin_right = 470.0
margin_left = 74.0
margin_right = 277.0
margin_bottom = 64.0
size_flags_horizontal = 3

[node name="LabelTitle" type="Label" parent="PopupDialogInfo/VC/TitleSection/HC/Title"]
margin_right = 401.0
margin_right = 203.0
margin_bottom = 40.0
size_flags_vertical = 3
custom_fonts/font = SubResource( 10 )
Expand All @@ -229,7 +230,7 @@ valign = 1

[node name="HC" type="HBoxContainer" parent="PopupDialogInfo/VC/TitleSection/HC/Title"]
margin_top = 45.0
margin_right = 401.0
margin_right = 203.0
margin_bottom = 64.0
custom_constants/separation = 4

Expand Down Expand Up @@ -285,18 +286,19 @@ __meta__ = {
}

[node name="HighScore" type="VBoxContainer" parent="PopupDialogInfo/VC/TitleSection/HC"]
margin_left = 475.0
margin_right = 579.0
margin_left = 287.0
margin_right = 574.0
margin_bottom = 64.0
size_flags_horizontal = 8
size_flags_horizontal = 11
size_flags_stretch_ratio = 2.0
alignment = 1
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Label" type="Label" parent="PopupDialogInfo/VC/TitleSection/HC/HighScore"]
margin_top = 10.0
margin_right = 104.0
margin_right = 287.0
margin_bottom = 29.0
size_flags_horizontal = 3
custom_fonts/font = SubResource( 11 )
Expand All @@ -308,7 +310,7 @@ __meta__ = {

[node name="LabelHighscore" type="Label" parent="PopupDialogInfo/VC/TitleSection/HC/HighScore"]
margin_top = 34.0
margin_right = 104.0
margin_right = 287.0
margin_bottom = 53.0
size_flags_horizontal = 3
custom_fonts/font = SubResource( 11 )
Expand Down Expand Up @@ -338,36 +340,37 @@ __meta__ = {
}

[node name="HC" type="HBoxContainer" parent="PopupDialogInfo/VC/InfoSection"]
margin_left = 15.0
margin_top = 5.0
margin_right = 635.0
margin_bottom = 240.0
margin_left = 16.0
margin_top = 16.0
margin_right = 634.0
margin_bottom = 229.0
custom_constants/separation = 16

[node name="Description" type="RichTextLabel" parent="PopupDialogInfo/VC/InfoSection/HC"]
margin_right = 417.0
margin_bottom = 235.0
margin_right = 484.0
margin_bottom = 213.0
size_flags_horizontal = 3
size_flags_stretch_ratio = 2.0
bbcode_enabled = true

[node name="VSeparator" type="VSeparator" parent="PopupDialogInfo/VC/InfoSection/HC"]
margin_left = 433.0
margin_right = 437.0
margin_bottom = 235.0
margin_left = 500.0
margin_right = 504.0
margin_bottom = 213.0
custom_styles/separator = SubResource( 16 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="VC" type="VBoxContainer" parent="PopupDialogInfo/VC/InfoSection/HC"]
margin_left = 453.0
margin_right = 620.0
margin_bottom = 235.0
margin_left = 520.0
margin_right = 618.0
margin_bottom = 213.0
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.4

[node name="Label" type="Label" parent="PopupDialogInfo/VC/InfoSection/HC/VC"]
margin_right = 167.0
margin_right = 98.0
margin_bottom = 19.0
size_flags_vertical = 1
custom_fonts/font = SubResource( 11 )
Expand All @@ -378,7 +381,7 @@ __meta__ = {

[node name="LabelAuthor" type="Label" parent="PopupDialogInfo/VC/InfoSection/HC/VC"]
margin_top = 24.0
margin_right = 167.0
margin_right = 98.0
margin_bottom = 43.0
size_flags_vertical = 1
custom_fonts/font = SubResource( 11 )
Expand All @@ -390,13 +393,13 @@ __meta__ = {

[node name="Control" type="Control" parent="PopupDialogInfo/VC/InfoSection/HC/VC"]
margin_top = 48.0
margin_right = 167.0
margin_right = 98.0
margin_bottom = 53.0
rect_min_size = Vector2( 0, 5 )

[node name="Label2" type="Label" parent="PopupDialogInfo/VC/InfoSection/HC/VC"]
margin_top = 58.0
margin_right = 167.0
margin_right = 98.0
margin_bottom = 77.0
size_flags_vertical = 1
custom_fonts/font = SubResource( 11 )
Expand All @@ -407,7 +410,7 @@ __meta__ = {

[node name="LabelVersion" type="Label" parent="PopupDialogInfo/VC/InfoSection/HC/VC"]
margin_top = 82.0
margin_right = 167.0
margin_right = 98.0
margin_bottom = 101.0
size_flags_vertical = 1
custom_fonts/font = SubResource( 11 )
Expand Down
2 changes: 1 addition & 1 deletion game/app/scenes/menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var _res_game_card = preload("res://app/scenes/game_card.tscn")
var _res_game_card_add_yours = preload("res://app/scenes/game_card_add_yours.tscn")

onready var _tab_container: TabContainer = $TabContainer
onready var _games_grid: GridContainer = $TabContainer/Games/SC/MC/GC
onready var _games_grid: GridContainer = $TabContainer/Games/SC/MC/CC/GC
onready var _about_tab: ScrollContainer = $TabContainer/About


Expand Down
44 changes: 26 additions & 18 deletions game/app/scenes/menu.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,21 @@ custom_constants/separation = 0

[node name="MC" type="MarginContainer" parent="TabContainer/Games"]
margin_right = 1024.0
margin_bottom = 65.0
rect_min_size = Vector2( 0, 65 )
size_flags_vertical = 0
margin_bottom = 51.0
custom_constants/margin_right = 16
custom_constants/margin_top = 16
custom_constants/margin_left = 16
custom_constants/margin_bottom = 0

[node name="Toolbar" type="HBoxContainer" parent="TabContainer/Games/MC"]
margin_left = 15.0
margin_top = 15.0
margin_right = 1009.0
margin_bottom = 50.0
margin_left = 16.0
margin_top = 16.0
margin_right = 1008.0
margin_bottom = 51.0
alignment = 2

[node name="Label" type="Label" parent="TabContainer/Games/MC/Toolbar"]
margin_right = 729.0
margin_right = 727.0
margin_bottom = 35.0
size_flags_horizontal = 3
size_flags_vertical = 1
Expand All @@ -102,8 +104,8 @@ text = "T_GAMES"
valign = 1

[node name="Label2" type="Label" parent="TabContainer/Games/MC/Toolbar"]
margin_left = 734.0
margin_right = 818.0
margin_left = 732.0
margin_right = 816.0
margin_bottom = 35.0
size_flags_vertical = 1
text = "T_SORTING"
Expand All @@ -113,29 +115,35 @@ __meta__ = {
}

[node name="OptionButtonSorting" type="OptionButton" parent="TabContainer/Games/MC/Toolbar"]
margin_left = 823.0
margin_right = 994.0
margin_left = 821.0
margin_right = 992.0
margin_bottom = 35.0
size_flags_vertical = 5
size_flags_vertical = 4
text = "T_ALPHABETICAL"
items = [ "T_LONGST_PLAYTIME", null, false, 0, null, "T_ALPHABETICAL", null, false, 1, null, "T_LAST_PLAYED", null, false, 2, null ]
selected = 1

[node name="SC" type="ScrollContainer" parent="TabContainer/Games"]
margin_top = 65.0
margin_top = 51.0
margin_right = 1024.0
margin_bottom = 543.0
size_flags_vertical = 3

[node name="MC" type="MarginContainer" parent="TabContainer/Games/SC"]
margin_right = 30.0
margin_right = 1024.0
margin_bottom = 30.0
size_flags_horizontal = 3
custom_constants/margin_right = 0
custom_constants/margin_left = 0

[node name="GC" type="GridContainer" parent="TabContainer/Games/SC/MC"]
margin_left = 15.0
[node name="CC" type="CenterContainer" parent="TabContainer/Games/SC/MC"]
margin_top = 15.0
margin_right = 15.0
margin_right = 1024.0
margin_bottom = 15.0

[node name="GC" type="GridContainer" parent="TabContainer/Games/SC/MC/CC"]
margin_left = 512.0
margin_right = 512.0
custom_constants/vseparation = 4
custom_constants/hseparation = 4
columns = 3
Expand Down
5 changes: 1 addition & 4 deletions game/app/style/theme_game_card.tres
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_resource type="Theme" load_steps=16 format=2]
[gd_resource type="Theme" load_steps=15 format=2]

[ext_resource path="res://shared/fonts/roboto/roboto_regular.ttf" type="DynamicFontData" id=1]

Expand Down Expand Up @@ -72,8 +72,6 @@ corner_radius_bottom_left = 18

[sub_resource type="StyleBoxEmpty" id=33]

[sub_resource type="StyleBoxFlat" id=37]

[sub_resource type="StyleBoxFlat" id=36]
content_margin_left = 12.0
content_margin_right = 12.0
Expand Down Expand Up @@ -114,6 +112,5 @@ MarginContainer/constants/margin_left = 12
MarginContainer/constants/margin_right = 12
MarginContainer/constants/margin_top = 12
OptionButton/constants/arrow_margin = 9
Panel/styles/panel = SubResource( 37 )
PanelContainer/styles/panel = SubResource( 36 )
VBoxContainer/constants/separation = 5