Put the whole look into one project theme
themes/main_theme.tres is the project theme. It holds Godot's default look for every control type the game uses, plus named styles for the game's own look (popups, the background, spacers, list rows, title and text sizes, highlights) and a palette for the popup dimming. Scenes and scripts name these styles instead of setting colours, sizes or style boxes, and the five old theme files are gone. themes/README.md explains the styles and how to make a new theme. The screenshot tour now uses the real character pictures, so the layout baseline is taken again. Screenshots are pixel-identical to before, and test_theme.gd checks that the look stays in the theme.
This commit was merged in pull request #36.
This commit is contained in:
1 parent
a7bf38c5f9
commit
8b71723a34
39 files changed
+3283
-1869
No files matched your search
@@ -2,13 +2,12 @@
|
||||
|
||||
[ext_resource type="Script" path="res://quiz/music_list_panel.gd" id="part_script"]
|
||||
[ext_resource type="Script" uid="uid://gf1bk6xbe3j" path="res://quiz/scroll_to_end_container.gd" id="7_dj026"]
|
||||
[ext_resource type="Theme" uid="uid://rxexo3ur85as" path="res://themes/light_gray_theme.tres" id="7_wxbv6"]
|
||||
|
||||
[node name="MusicListPanel" type="PanelContainer" unique_id=2011292375]
|
||||
layout_mode = 3
|
||||
theme = ExtResource("7_wxbv6")
|
||||
offset_right = 1088.0
|
||||
offset_bottom = 512.0
|
||||
theme_type_variation = &"MusicList"
|
||||
script = ExtResource("part_script")
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="." unique_id=707750459]
|
||||
|
||||
@@ -2,12 +2,6 @@
|
||||
|
||||
[ext_resource type="Script" path="res://quiz/now_playing.gd" id="part_script"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_qspbu"]
|
||||
font_size = 50
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_3m52w"]
|
||||
font_size = 35
|
||||
|
||||
[node name="NowPlaying" type="VBoxContainer" unique_id=42468498]
|
||||
layout_mode = 3
|
||||
offset_right = 1088.0
|
||||
@@ -17,13 +11,13 @@ script = ExtResource("part_script")
|
||||
[node name="SoundtrackLabel" type="Label" parent="." unique_id=173147793]
|
||||
custom_minimum_size = Vector2(1, 1)
|
||||
layout_mode = 2
|
||||
label_settings = SubResource("LabelSettings_qspbu")
|
||||
theme_type_variation = &"TitleLarge"
|
||||
horizontal_alignment = 1
|
||||
autowrap_mode = 2
|
||||
|
||||
[node name="SongLabel" type="Label" parent="." unique_id=1687490027]
|
||||
custom_minimum_size = Vector2(1, 1)
|
||||
layout_mode = 2
|
||||
label_settings = SubResource("LabelSettings_3m52w")
|
||||
theme_type_variation = &"TitleMedium"
|
||||
horizontal_alignment = 1
|
||||
autowrap_mode = 2
|
||||
+6
-21
@@ -1,24 +1,9 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://cslogy2csnd7a"]
|
||||
[gd_scene format=3 uid="uid://cslogy2csnd7a"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dl6no2wr2c86y" path="res://quiz/player_row.gd" id="1_if4kc"]
|
||||
[ext_resource type="Texture2D" uid="uid://r4as0nmtoa7p" path="res://noCharacter.png" id="2_hpj3s"]
|
||||
[ext_resource type="Texture2D" uid="uid://b2kj6m8qpsgb1" path="res://icons/person_remove_light.svg" id="3_j3uxe"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_821k2"]
|
||||
bg_color = Color(0.180392, 0.180392, 0.180392, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_w10e8"]
|
||||
bg_color = Color(0.180392, 0.180392, 0.180392, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_78a8g"]
|
||||
bg_color = Color(0.180392, 0.180392, 0.180392, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_i56hb"]
|
||||
bg_color = Color(0.180392, 0.180392, 0.180392, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_b2crt"]
|
||||
bg_color = Color(0.180392, 0.180392, 0.180392, 1)
|
||||
|
||||
[node name="PlayerRow" type="Control"]
|
||||
custom_minimum_size = Vector2(2.08165e-12, 40)
|
||||
layout_mode = 3
|
||||
@@ -39,7 +24,7 @@ grow_vertical = 2
|
||||
[node name="Panel4" type="Panel" parent="HBoxContainer"]
|
||||
custom_minimum_size = Vector2(5, 40)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_821k2")
|
||||
theme_type_variation = &"DarkSpacer"
|
||||
|
||||
[node name="Name" type="Label" parent="HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
@@ -55,7 +40,7 @@ text_overrun_behavior = 3
|
||||
[node name="Panel3" type="Panel" parent="HBoxContainer"]
|
||||
custom_minimum_size = Vector2(16, 2.08165e-12)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_w10e8")
|
||||
theme_type_variation = &"DarkSpacer"
|
||||
|
||||
[node name="Character" type="TextureButton" parent="HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
@@ -70,7 +55,7 @@ stretch_mode = 5
|
||||
[node name="Panel2" type="Panel" parent="HBoxContainer"]
|
||||
custom_minimum_size = Vector2(30, 40)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_78a8g")
|
||||
theme_type_variation = &"DarkSpacer"
|
||||
|
||||
[node name="AddPoint" type="Button" parent="HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
@@ -83,7 +68,7 @@ text = "+1"
|
||||
[node name="Panel5" type="Panel" parent="HBoxContainer"]
|
||||
custom_minimum_size = Vector2(3, 40)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_i56hb")
|
||||
theme_type_variation = &"DarkSpacer"
|
||||
|
||||
[node name="RemovePoint" type="Button" parent="HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
@@ -96,7 +81,7 @@ text = "-1"
|
||||
[node name="Panel" type="Panel" parent="HBoxContainer"]
|
||||
custom_minimum_size = Vector2(30, 40)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_b2crt")
|
||||
theme_type_variation = &"DarkSpacer"
|
||||
|
||||
[node name="RemovePlayer" type="TextureButton" parent="HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
|
||||
@@ -13,12 +13,6 @@ unicode = 63743
|
||||
[sub_resource type="Shortcut" id="Shortcut_jafqj"]
|
||||
events = [SubResource("InputEventKey_03bm3")]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qk7sj"]
|
||||
bg_color = Color(0.180392, 0.180392, 0.180392, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_k1ygi"]
|
||||
bg_color = Color(0.180392, 0.180392, 0.180392, 1)
|
||||
|
||||
[node name="PlayersPanel" type="PanelContainer" unique_id=1708375945]
|
||||
layout_mode = 3
|
||||
offset_right = 641.0
|
||||
@@ -60,7 +54,7 @@ layout_mode = 2
|
||||
[node name="Panel" type="Panel" parent="VBoxContainer/AddPlayerContainer" unique_id=1569854056]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_qk7sj")
|
||||
theme_type_variation = &"DarkSpacer"
|
||||
|
||||
[node name="PlayerNameField" type="TextEdit" parent="VBoxContainer/AddPlayerContainer" unique_id=332535327]
|
||||
unique_name_in_owner = true
|
||||
@@ -80,7 +74,7 @@ text = "Add"
|
||||
custom_minimum_size = Vector2(2.08165e-12, 40)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_k1ygi")
|
||||
theme_type_variation = &"DarkSpacer"
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer" unique_id=1000000001]
|
||||
layout_mode = 2
|
||||
|
||||
+3
-7
@@ -1,15 +1,13 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://1jbtmhbqolqe"]
|
||||
[gd_scene format=3 uid="uid://1jbtmhbqolqe"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c8r7ykphss4c2" path="res://characters/Link.png" id="1_ll28s"]
|
||||
[ext_resource type="Script" uid="uid://cjo13wixip8mq" path="res://quiz/song_row.gd" id="1_lspki"]
|
||||
[ext_resource type="Theme" uid="uid://8bllart6xn1f" path="res://themes/default_theme.tres" id="1_x7fq8"]
|
||||
[ext_resource type="StyleBox" uid="uid://bsv6yb0yir04l" path="res://themes/style_box_flat.tres" id="3_5h84f"]
|
||||
|
||||
[node name="SongRow" type="PanelContainer"]
|
||||
custom_minimum_size = Vector2(1000, 0)
|
||||
offset_right = 1088.0
|
||||
offset_bottom = 59.0
|
||||
theme = ExtResource("1_x7fq8")
|
||||
theme_type_variation = &"SongRow"
|
||||
script = ExtResource("1_lspki")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
@@ -23,9 +21,7 @@ custom_minimum_size = Vector2(865, 28)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
mouse_filter = 1
|
||||
theme = ExtResource("1_x7fq8")
|
||||
theme_override_font_sizes/font_size = 20
|
||||
theme_override_styles/normal = ExtResource("3_5h84f")
|
||||
theme_type_variation = &"SongRowLabel"
|
||||
text = "Final Fantasy Dissidia 012 Duodecim (Sista Fantasin Meningsskiljaktigheter 012 Tolv) - 'Crystal Cave -arrange-'' from FINAL FANTASY III"
|
||||
autowrap_mode = 2
|
||||
|
||||
|
||||
@@ -65,4 +65,4 @@ func show_soundtracks(list: Array) -> void:
|
||||
soundtracks.append_array(list)
|
||||
Settings.delete_children(_rows)
|
||||
for i: int in soundtracks.size():
|
||||
_rows.add_child(ListRow.create(soundtracks[i], i, 20))
|
||||
_rows.add_child(ListRow.create(soundtracks[i], i, &"TextLarge"))
|
||||
+1
-1
@@ -19,7 +19,7 @@ func set_label() -> void:
|
||||
var size_to_change: int = song_object.players_given_point.size() * 50
|
||||
song_list_label.custom_minimum_size = Vector2(1000 - size_to_change, 28)
|
||||
if song_object.is_playing:
|
||||
song_list_label.add_theme_color_override("font_color", Color(1, 0.5, 0))
|
||||
song_list_label.theme_type_variation = &"SongRowLabelPlaying"
|
||||
song_list_label.text = song_object.get_song_info()
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user