Add report generation functionality to the UI
- Introduced a new script `report.gd` that extends `VBoxContainer` to manage the display of reports. - Implemented dynamic localization support for report headers and body content based on the global locale. - Created a `refresh` method to update the report content and header image when visibility changes or locale updates. - Added a static `build` method to format and compile report data from the world state, including calculations for star totals and effects. - Integrated presentation logic to render report templates based on the current state of the game world.
This commit is contained in:
+13
-2
@@ -71,6 +71,8 @@
|
||||
[ext_resource type="Script" uid="uid://btsrt6rw3nr04" path="res://ui/audio/owniverse_music_player.gd" id="67_music"]
|
||||
[ext_resource type="Script" uid="uid://botb0k4qr0hqo" path="res://ui/audio/owniverse_effects_player.gd" id="68_effects"]
|
||||
|
||||
[ext_resource type="Script" path="res://ui/report/report.gd" id="69_report"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ifjjt"]
|
||||
|
||||
[sub_resource type="ButtonGroup" id="ButtonGroup_58wjt"]
|
||||
@@ -1012,7 +1014,8 @@ layout_mode = 2
|
||||
texture_normal = ExtResource("52_uvuuk")
|
||||
|
||||
[node name="Report" type="VBoxContainer" parent="Stage" unique_id=1422399839]
|
||||
visible = false
|
||||
script = ExtResource("69_report")
|
||||
custom_minimum_size = Vector2(1080, 1920)
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
@@ -1033,11 +1036,19 @@ custom_minimum_size = Vector2(1080, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Header" type="TextureRect" parent="Stage/Report/Header" unique_id=1321780840]
|
||||
custom_minimum_size = Vector2(824, 256)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("60_an6vj")
|
||||
|
||||
[node name="ReportBody" type="RichTextLabel" parent="Stage/Report" unique_id=1952288631]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
bbcode_enabled = true
|
||||
scroll_active = true
|
||||
theme_override_font_sizes/normal_font_size = 30
|
||||
theme_override_font_sizes/bold_font_size = 30
|
||||
|
||||
[node name="Achievements" type="VBoxContainer" parent="Stage" unique_id=1847732432]
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(1080, 1920)
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
|
||||
Reference in New Issue
Block a user