Skip to content

Commit

Permalink
Fix system icons position, default labels, and helptext
Browse files Browse the repository at this point in the history
  • Loading branch information
rsubtil committed Jul 6, 2023
1 parent b7a0e4b commit e72bca1
Show file tree
Hide file tree
Showing 12 changed files with 117 additions and 32 deletions.
1 change: 1 addition & 0 deletions Logic.gd
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ func move_ui(dir: int, game_view: Node = null):
child.on_hide()
var tween := create_tween()
tween.set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_QUART)
tween.set_parallel(true)
tween.tween_property(
$GameView, "position", target_position_game_view, 0.5
)
Expand Down
4 changes: 1 addition & 3 deletions Theme.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@

[node name="RetroHubTheme" type="Node"]
script = ExtResource("1")
path = "/home/ricardo/.emulationstation/themes/snes"
path = "/home/ricardo/.emulationstation/themes/art-book-next-retropie-main"

[node name="System" parent="." instance=ExtResource("2")]
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3

Expand Down
28 changes: 22 additions & 6 deletions export_presets.cfg

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions objects/datetime/DateTime.gd
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ func apply_theme():
return

position = es_position
label_settings = LabelSettings.new()
label_settings.line_spacing = es_line_spacing
label_settings.font_size = es_font_size
if not es_font_path.is_empty():
label_settings = LabelSettings.new()
label_settings.line_spacing = es_line_spacing
label_settings.font_size = es_font_size
var f := FontFile.new()
f.load_dynamic_font(es_font_path)
label_settings.font = f
Expand Down
2 changes: 1 addition & 1 deletion objects/image/Image.gd
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func handle_max_size():
var tex_size : Vector2
if get_child_count() > 0: # Miximage
tex_size = es_max_size
else:
elif texture:
tex_size = texture.get_size()
if tex_size == Vector2.ZERO:
tex_size = es_max_size
Expand Down
6 changes: 4 additions & 2 deletions objects/rating/Rating.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@ theme = ExtResource("2")
script = ExtResource("1")

[node name="Tex_Unfilled" type="TextureRect" parent="."]
texture_filter = 1
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
texture = ExtResource("5")
expand_mode = 1
stretch_mode = 2
stretch_mode = 1

[node name="Tex_Filled" type="TextureRect" parent="."]
texture_filter = 1
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
texture = ExtResource("4")
expand_mode = 1
stretch_mode = 2
stretch_mode = 1
8 changes: 4 additions & 4 deletions objects/text/Text.gd
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ func apply_theme():
return

position = es_position
$Label.label_settings = LabelSettings.new()
if not es_font_path.is_empty():
$Label.label_settings = LabelSettings.new()
$Label.label_settings.line_spacing = es_line_spacing
$Label.label_settings.font_size = es_font_size
$Label.label_settings.font_color = es_color
var f := FontFile.new()
f.load_dynamic_font(es_font_path)
$Label.label_settings.font = f
$Label.label_settings.line_spacing = es_line_spacing
$Label.label_settings.font_size = es_font_size
$Label.label_settings.font_color = es_color
if es_txt.length():
text = (es_txt)
match es_alignment:
Expand Down
1 change: 1 addition & 0 deletions objects/textlist/GameEntry.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ cache/0/16/0/scale = 1.0
cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)

[node name="GameEntry" type="Button"]
texture_filter = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
Expand Down
21 changes: 21 additions & 0 deletions views/basic/Basic.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ path = "joypad/select"

[node name="Options" parent="HelpSystem" instance=ExtResource("5")]
layout_mode = 2
es_txt = "OPTIONS"
es_color = Color(0.470588, 0.470588, 0.470588, 1)
es_alignment = "center"

[node name="MenuIcon" type="TextureRect" parent="HelpSystem"]
custom_minimum_size = Vector2(40, 40)
Expand All @@ -121,6 +124,9 @@ path = "joypad/start"

[node name="Menu" parent="HelpSystem" instance=ExtResource("5")]
layout_mode = 2
es_txt = "MENU"
es_color = Color(0.470588, 0.470588, 0.470588, 1)
es_alignment = "center"

[node name="FavoritesIcon" type="TextureRect" parent="HelpSystem"]
custom_minimum_size = Vector2(40, 40)
Expand All @@ -133,6 +139,9 @@ path = "joypad/y"

[node name="Favorites" parent="HelpSystem" instance=ExtResource("5")]
layout_mode = 2
es_txt = "FAVORITES"
es_color = Color(0.470588, 0.470588, 0.470588, 1)
es_alignment = "center"

[node name="MediaIcon" type="TextureRect" parent="HelpSystem"]
custom_minimum_size = Vector2(40, 40)
Expand All @@ -145,6 +154,9 @@ path = "joypad/x"

[node name="Media" parent="HelpSystem" instance=ExtResource("5")]
layout_mode = 2
es_txt = "VIEW MEDIA"
es_color = Color(0.470588, 0.470588, 0.470588, 1)
es_alignment = "center"

[node name="BackIcon" type="TextureRect" parent="HelpSystem"]
custom_minimum_size = Vector2(40, 40)
Expand All @@ -157,6 +169,9 @@ path = "joypad/b"

[node name="Back" parent="HelpSystem" instance=ExtResource("5")]
layout_mode = 2
es_txt = "BACK"
es_color = Color(0.470588, 0.470588, 0.470588, 1)
es_alignment = "center"

[node name="LaunchIcon" type="TextureRect" parent="HelpSystem"]
custom_minimum_size = Vector2(40, 40)
Expand All @@ -169,6 +184,9 @@ path = "joypad/a"

[node name="Launch" parent="HelpSystem" instance=ExtResource("5")]
layout_mode = 2
es_txt = "LAUNCH"
es_color = Color(0.470588, 0.470588, 0.470588, 1)
es_alignment = "center"

[node name="SystemIcon" type="TextureRect" parent="HelpSystem"]
custom_minimum_size = Vector2(40, 40)
Expand All @@ -181,3 +199,6 @@ path = "joypad/dpad"

[node name="System" parent="HelpSystem" instance=ExtResource("5")]
layout_mode = 2
es_txt = "SYSTEM"
es_color = Color(0.470588, 0.470588, 0.470588, 1)
es_alignment = "center"
35 changes: 35 additions & 0 deletions views/detailed/Detailed.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ offset_left = 10.0
offset_top = 377.0
offset_right = -961.0
offset_bottom = -196.0
es_txt = "Rating: "

[node name="md_lbl_releasedate" parent="Children/40" instance=ExtResource("15")]
layout_mode = 0
Expand All @@ -103,6 +104,7 @@ offset_left = 10.0
offset_top = 414.0
offset_right = -961.0
offset_bottom = -159.0
es_txt = "Released: "

[node name="md_lbl_developer" parent="Children/40" instance=ExtResource("15")]
layout_mode = 0
Expand All @@ -113,6 +115,7 @@ offset_left = 10.0
offset_top = 451.0
offset_right = -923.0
offset_bottom = -122.0
es_txt = "Developer: "

[node name="md_lbl_publisher" parent="Children/40" instance=ExtResource("15")]
layout_mode = 0
Expand All @@ -123,6 +126,7 @@ offset_left = 10.0
offset_top = 488.0
offset_right = -923.0
offset_bottom = -85.0
es_txt = "Publisher: "

[node name="md_lbl_genre" parent="Children/40" instance=ExtResource("15")]
layout_mode = 0
Expand All @@ -133,6 +137,7 @@ offset_left = 256.0
offset_top = 381.0
offset_right = -677.0
offset_bottom = -192.0
es_txt = "Genre: "

[node name="md_lbl_players" parent="Children/40" instance=ExtResource("15")]
layout_mode = 0
Expand All @@ -143,6 +148,7 @@ offset_left = 256.0
offset_top = 416.0
offset_right = -677.0
offset_bottom = -157.0
es_txt = "Players: "

[node name="md_lbl_lastplayed" parent="Children/40" instance=ExtResource("15")]
layout_mode = 0
Expand All @@ -153,6 +159,7 @@ offset_left = 256.0
offset_top = 451.0
offset_right = -671.0
offset_bottom = -122.0
es_txt = "Last played: "

[node name="md_lbl_playcount" parent="Children/40" instance=ExtResource("15")]
layout_mode = 0
Expand All @@ -163,6 +170,7 @@ offset_left = 256.0
offset_top = 488.0
offset_right = -658.0
offset_bottom = -85.0
es_txt = "Times played: "

[node name="md_image" parent="Children/40" instance=ExtResource("14")]
layout_mode = 0
Expand Down Expand Up @@ -196,6 +204,7 @@ offset_left = 96.0
offset_top = 451.0
offset_right = -837.0
offset_bottom = -122.0
es_txt = "unknown"

[node name="md_publisher" parent="Children/40" instance=ExtResource("15")]
layout_mode = 0
Expand All @@ -206,6 +215,7 @@ offset_left = 92.0
offset_top = 488.0
offset_right = -841.0
offset_bottom = -85.0
es_txt = "unknown"

[node name="md_genre" parent="Children/40" instance=ExtResource("15")]
layout_mode = 0
Expand All @@ -216,6 +226,7 @@ offset_left = 311.0
offset_top = 381.0
offset_right = -622.0
offset_bottom = -192.0
es_txt = "unknown"

[node name="md_players" parent="Children/40" instance=ExtResource("15")]
layout_mode = 0
Expand All @@ -226,6 +237,7 @@ offset_left = 321.0
offset_top = 416.0
offset_right = -612.0
offset_bottom = -157.0
es_txt = "unknown"

[node name="md_lastplayed" parent="Children/40" instance=ExtResource("16")]
layout_mode = 0
Expand All @@ -244,6 +256,7 @@ offset_left = 366.0
offset_top = 488.0
offset_right = -567.0
offset_bottom = -85.0
es_txt = "0"

[node name="md_description" parent="Children/40" instance=ExtResource("15")]
layout_mode = 0
Expand All @@ -254,6 +267,7 @@ offset_left = 10.0
offset_top = 528.0
offset_right = -623.0
offset_bottom = 15.0
es_txt = "Long description Long description Long description Long description Long description Long description"

[node name="50" type="Control" parent="Children"]
anchors_preset = 0
Expand Down Expand Up @@ -295,6 +309,9 @@ path = "joypad/select"

[node name="Options" parent="HelpSystem" instance=ExtResource("15")]
layout_mode = 2
es_txt = "OPTIONS"
es_color = Color(0.470588, 0.470588, 0.470588, 1)
es_alignment = "center"

[node name="MenuIcon" type="TextureRect" parent="HelpSystem"]
custom_minimum_size = Vector2(40, 40)
Expand All @@ -306,6 +323,9 @@ path = "joypad/start"

[node name="Menu" parent="HelpSystem" instance=ExtResource("15")]
layout_mode = 2
es_txt = "MENU"
es_color = Color(0.470588, 0.470588, 0.470588, 1)
es_alignment = "center"

[node name="FavoritesIcon" type="TextureRect" parent="HelpSystem"]
custom_minimum_size = Vector2(40, 40)
Expand All @@ -317,6 +337,9 @@ path = "joypad/y"

[node name="Favorites" parent="HelpSystem" instance=ExtResource("15")]
layout_mode = 2
es_txt = "FAVORITES"
es_color = Color(0.470588, 0.470588, 0.470588, 1)
es_alignment = "center"

[node name="MediaIcon" type="TextureRect" parent="HelpSystem"]
custom_minimum_size = Vector2(40, 40)
Expand All @@ -328,6 +351,9 @@ path = "joypad/x"

[node name="Media" parent="HelpSystem" instance=ExtResource("15")]
layout_mode = 2
es_txt = "VIEW MEDIA"
es_color = Color(0.470588, 0.470588, 0.470588, 1)
es_alignment = "center"

[node name="BackIcon" type="TextureRect" parent="HelpSystem"]
custom_minimum_size = Vector2(40, 40)
Expand All @@ -339,6 +365,9 @@ path = "joypad/b"

[node name="Back" parent="HelpSystem" instance=ExtResource("15")]
layout_mode = 2
es_txt = "BACK"
es_color = Color(0.470588, 0.470588, 0.470588, 1)
es_alignment = "center"

[node name="LaunchIcon" type="TextureRect" parent="HelpSystem"]
custom_minimum_size = Vector2(40, 40)
Expand All @@ -350,6 +379,9 @@ path = "joypad/a"

[node name="Launch" parent="HelpSystem" instance=ExtResource("15")]
layout_mode = 2
es_txt = "LAUNCH"
es_color = Color(0.470588, 0.470588, 0.470588, 1)
es_alignment = "center"

[node name="SystemIcon" type="TextureRect" parent="HelpSystem"]
custom_minimum_size = Vector2(40, 40)
Expand All @@ -361,3 +393,6 @@ path = "joypad/dpad"

[node name="System" parent="HelpSystem" instance=ExtResource("15")]
layout_mode = 2
es_txt = "SYSTEM"
es_color = Color(0.470588, 0.470588, 0.470588, 1)
es_alignment = "center"
Loading

0 comments on commit e72bca1

Please sign in to comment.