Implement production vertical slice foundation
This commit is contained in:
1 parent
9d4a89f355
commit
a18e82eb44
104 files changed
+10595
-268
No files matched your search
@@ -0,0 +1,26 @@
|
||||
class_name ConfirmationDialogScreen
|
||||
extends Control
|
||||
|
||||
signal cancelled
|
||||
signal confirmed(action_id: StringName)
|
||||
|
||||
var _action_id: StringName
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
process_mode = Node.PROCESS_MODE_ALWAYS
|
||||
%CancelButton.pressed.connect(func() -> void: cancelled.emit())
|
||||
%ConfirmButton.pressed.connect(func() -> void: confirmed.emit(_action_id))
|
||||
%CancelButton.grab_focus()
|
||||
|
||||
|
||||
func configure(
|
||||
action_id: StringName,
|
||||
title: String,
|
||||
message: String,
|
||||
confirm_label: String
|
||||
) -> void:
|
||||
_action_id = action_id
|
||||
%Title.text = title
|
||||
%Message.text = message
|
||||
%ConfirmButton.text = confirm_label
|
||||
@@ -0,0 +1,74 @@
|
||||
[gd_scene load_steps=2 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://game/presentation/confirmation/confirmation_dialog.gd" id="1_confirm"]
|
||||
|
||||
[node name="ConfirmationDialog" type="Control"]
|
||||
process_mode = 3
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_confirm")
|
||||
|
||||
[node name="Dim" type="ColorRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0, 0, 0, 0.72)
|
||||
|
||||
[node name="Center" type="CenterContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Panel" type="PanelContainer" parent="Center"]
|
||||
custom_minimum_size = Vector2(650, 280)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Margin" type="MarginContainer" parent="Center/Panel"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 34
|
||||
theme_override_constants/margin_top = 28
|
||||
theme_override_constants/margin_right = 34
|
||||
theme_override_constants/margin_bottom = 28
|
||||
|
||||
[node name="Layout" type="VBoxContainer" parent="Center/Panel/Margin"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 18
|
||||
|
||||
[node name="Title" type="Label" parent="Center/Panel/Margin/Layout"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 28
|
||||
text = "CONFIRMER"
|
||||
|
||||
[node name="Message" type="Label" parent="Center/Panel/Margin/Layout"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
text = "Cette action doit être confirmée."
|
||||
autowrap_mode = 2
|
||||
|
||||
[node name="Actions" type="HBoxContainer" parent="Center/Panel/Margin/Layout"]
|
||||
layout_mode = 2
|
||||
alignment = 2
|
||||
|
||||
[node name="CancelButton" type="Button" parent="Center/Panel/Margin/Layout/Actions"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(190, 46)
|
||||
layout_mode = 2
|
||||
text = "RESTER EN PLONGÉE"
|
||||
|
||||
[node name="ConfirmButton" type="Button" parent="Center/Panel/Margin/Layout/Actions"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(210, 46)
|
||||
layout_mode = 2
|
||||
text = "CONFIRMER"
|
||||
Reference in new issue
Block a user