Use the shift review mockup as the end-of-shift backdrop
Wrap the review content in a Control root, draw the shift_review art behind an opaque panel, and style the action buttons to match the mockup. Headless 226/226 verified in a clean HEAD worktree.
This commit is contained in:
1 parent
41d3511fc7
commit
00faf45e83
2 files changed
+34
-6
No files matched your search
@@ -48,7 +48,8 @@ and scene visuals with those mockups — verified with
|
||||
- [x] Wire the start menu and venue selection screen to use the `start_menu` scene art.
|
||||
- [x] Wire the pause overlay to `pause_overlay` scene art (backdrop + opaque panel cover).
|
||||
- [x] Wire the settings panel to `settings_panel` art.
|
||||
- [ ] Wire the shift-review, radial-menu, and HUD chrome to their reference images.
|
||||
- [x] Wire the shift-review screen to `shift_review` art (backdrop + opaque panel cover).
|
||||
- [ ] Wire the radial menu and HUD chrome to their reference images.
|
||||
|
||||
### Align in-game visuals
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ extends CanvasLayer
|
||||
## End-of-shift review screen (PLAN.md: Evidence and Body Camera, Shift Review).
|
||||
|
||||
const Strings := preload("res://src/core/strings.gd")
|
||||
const UiArt := preload("res://src/game/ui/art.gd")
|
||||
|
||||
signal restart_requested()
|
||||
signal timeline_requested(review: Dictionary)
|
||||
@@ -15,16 +16,23 @@ var report_label: Label
|
||||
func _init() -> void:
|
||||
name = "ShiftReview"
|
||||
layer = 30
|
||||
var dim := ColorRect.new()
|
||||
dim.color = Color(0.04, 0.05, 0.08, 0.92)
|
||||
dim.set_anchors_preset(Control.PRESET_FULL_RECT)
|
||||
add_child(dim)
|
||||
var root := Control.new()
|
||||
root.name = "ReviewRoot"
|
||||
root.set_anchors_preset(Control.PRESET_FULL_RECT)
|
||||
add_child(root)
|
||||
var art := UiArt.new()
|
||||
if not art.add_screen_backdrop(root, "shift_review",
|
||||
Rect2(0.172, 0.033, 0.59, 0.927)):
|
||||
var dim := ColorRect.new()
|
||||
dim.color = Color(0.04, 0.05, 0.08, 0.92)
|
||||
dim.set_anchors_preset(Control.PRESET_FULL_RECT)
|
||||
root.add_child(dim)
|
||||
|
||||
var center := VBoxContainer.new()
|
||||
center.set_anchors_preset(Control.PRESET_CENTER)
|
||||
center.alignment = BoxContainer.ALIGNMENT_CENTER
|
||||
center.add_theme_constant_override("separation", 12)
|
||||
add_child(center)
|
||||
root.add_child(center)
|
||||
|
||||
var title := Label.new()
|
||||
title.text = "Shift Review"
|
||||
@@ -55,8 +63,27 @@ func _init() -> void:
|
||||
quit_btn.text = "Quit"
|
||||
quit_btn.pressed.connect(func(): get_tree().quit())
|
||||
quit_btn.size_flags_horizontal = Control.SIZE_SHRINK_CENTER
|
||||
_style_review_button(timeline)
|
||||
_style_review_button(restart)
|
||||
_style_review_button(quit_btn)
|
||||
center.add_child(quit_btn)
|
||||
|
||||
func _style_review_button(button: Button) -> void:
|
||||
button.custom_minimum_size = Vector2(300, 52)
|
||||
button.add_theme_font_size_override("font_size", 22)
|
||||
var normal := StyleBoxFlat.new()
|
||||
normal.bg_color = Color(0.115, 0.125, 0.15, 0.96)
|
||||
normal.corner_radius_top_left = 10
|
||||
normal.corner_radius_top_right = 10
|
||||
normal.corner_radius_bottom_left = 10
|
||||
normal.corner_radius_bottom_right = 10
|
||||
var hover := normal.duplicate() as StyleBoxFlat
|
||||
hover.bg_color = Color(0.16, 0.175, 0.21, 0.98)
|
||||
button.add_theme_stylebox_override("normal", normal)
|
||||
button.add_theme_stylebox_override("hover", hover)
|
||||
button.add_theme_stylebox_override("focus", hover)
|
||||
button.add_theme_stylebox_override("pressed", hover)
|
||||
|
||||
func show_review(review: Dictionary, scenario: Resource, history: Array = []) -> void:
|
||||
_review = review
|
||||
var reputation: Dictionary = review.get("reputation", {})
|
||||
|
||||
Reference in new issue
Block a user