Mail support
Deploy Promiscuity Auth API / deploy (push) Successful in 48s
Deploy Promiscuity Character API / deploy (push) Successful in 59s
Deploy Promiscuity Inventory API / deploy (push) Successful in 46s
Deploy Promiscuity Locations API / deploy (push) Successful in 1m0s
Deploy Promiscuity Mail API / deploy (push) Successful in 1m9s
k8s smoke test / test (push) Successful in 9s
Deploy Promiscuity Auth API / deploy (push) Successful in 48s
Deploy Promiscuity Character API / deploy (push) Successful in 59s
Deploy Promiscuity Inventory API / deploy (push) Successful in 46s
Deploy Promiscuity Locations API / deploy (push) Successful in 1m0s
Deploy Promiscuity Mail API / deploy (push) Successful in 1m9s
k8s smoke test / test (push) Successful in 9s
This commit is contained in:
@@ -3,6 +3,7 @@ extends Node3D
|
||||
const CHARACTER_API_URL := "https://pchar.ranaze.com/api/Characters"
|
||||
const LOCATION_API_URL := "https://ploc.ranaze.com/api/Locations"
|
||||
const INVENTORY_API_URL := "https://pinv.ranaze.com/api/inventory"
|
||||
const MAIL_API_URL := "https://pmail.ranaze.com/api/mail"
|
||||
const START_SCREEN_SCENE := "res://scenes/UI/start_screen.tscn"
|
||||
const SETTINGS_SCENE := "res://scenes/UI/Settings.tscn"
|
||||
const CHARACTER_SLOT_COUNT := 6
|
||||
@@ -34,6 +35,16 @@ const HEARTBEAT_INTERVAL := 10.0
|
||||
@onready var _target_slot_spin_box: SpinBox = $InventoryMenu/MarginContainer/Panel/VBoxContainer/ControlsPanel/VBoxContainer/ControlsRow/TargetSlotSpinBox
|
||||
@onready var _quantity_spin_box: SpinBox = $InventoryMenu/MarginContainer/Panel/VBoxContainer/ControlsPanel/VBoxContainer/ControlsRow/QuantitySpinBox
|
||||
@onready var _inventory_status_label: Label = $InventoryMenu/MarginContainer/Panel/VBoxContainer/ControlsPanel/VBoxContainer/StatusLabel
|
||||
@onready var _mail_menu: CanvasLayer = $MailMenu
|
||||
@onready var _mail_location_label: Label = $MailMenu/MarginContainer/Panel/VBoxContainer/MailboxLocationLabel
|
||||
@onready var _mail_inbox_items: ItemList = $MailMenu/MarginContainer/Panel/VBoxContainer/Columns/InboxPanel/VBoxContainer/InboxItems
|
||||
@onready var _mail_sent_items: ItemList = $MailMenu/MarginContainer/Panel/VBoxContainer/Columns/SentPanel/VBoxContainer/SentItems
|
||||
@onready var _mail_selected_label: Label = $MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer/SelectedMailLabel
|
||||
@onready var _mail_selected_body: TextEdit = $MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer/SelectedMailBody
|
||||
@onready var _mail_recipient_line_edit: LineEdit = $MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer/RecipientLineEdit
|
||||
@onready var _mail_subject_line_edit: LineEdit = $MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer/SubjectLineEdit
|
||||
@onready var _mail_compose_body: TextEdit = $MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer/ComposeBody
|
||||
@onready var _mail_status_label: Label = $MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer/StatusLabel
|
||||
|
||||
var _center_coord := Vector2i.ZERO
|
||||
var _tiles_root: Node3D
|
||||
@@ -61,6 +72,11 @@ var _heartbeat_in_flight := false
|
||||
var _visible_character_refresh_elapsed := 0.0
|
||||
var _heartbeat_elapsed := 0.0
|
||||
var _remote_character_nodes: Dictionary = {}
|
||||
var _mail_inbox: Array = []
|
||||
var _mail_sent: Array = []
|
||||
var _mail_request_in_flight := false
|
||||
var _selected_inbox_mail_id := ""
|
||||
var _selected_sent_mail_id := ""
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
@@ -104,7 +120,7 @@ func _process(_delta: float) -> void:
|
||||
if _heartbeat_elapsed >= HEARTBEAT_INTERVAL:
|
||||
_heartbeat_elapsed = 0.0
|
||||
_send_presence_heartbeat()
|
||||
if _inventory_menu.visible:
|
||||
if _inventory_menu.visible or _mail_menu.visible:
|
||||
return
|
||||
var target_world_pos := _get_stream_position()
|
||||
var target_coord := _world_to_coord(target_world_pos)
|
||||
@@ -117,13 +133,17 @@ func _process(_delta: float) -> void:
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("player_phone"):
|
||||
if get_tree().paused:
|
||||
if get_tree().paused or _mail_menu.visible:
|
||||
return
|
||||
_toggle_inventory_menu()
|
||||
get_viewport().set_input_as_handled()
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("ui_cancel") and _mail_menu.visible:
|
||||
_close_mail_menu()
|
||||
get_viewport().set_input_as_handled()
|
||||
return
|
||||
if event.is_action_pressed("ui_cancel") and _inventory_menu.visible:
|
||||
_close_inventory_menu()
|
||||
get_viewport().set_input_as_handled()
|
||||
@@ -197,6 +217,8 @@ func _toggle_pause_menu() -> void:
|
||||
func _pause_game() -> void:
|
||||
if _inventory_menu.visible:
|
||||
_close_inventory_menu()
|
||||
if _mail_menu.visible:
|
||||
_close_mail_menu()
|
||||
get_tree().paused = true
|
||||
_pause_menu.visible = true
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
@@ -209,6 +231,8 @@ func _resume_game() -> void:
|
||||
|
||||
|
||||
func _toggle_inventory_menu() -> void:
|
||||
if _mail_menu.visible:
|
||||
return
|
||||
if _inventory_menu.visible:
|
||||
_close_inventory_menu()
|
||||
return
|
||||
@@ -235,6 +259,28 @@ func _close_inventory_menu() -> void:
|
||||
_set_player_menu_lock(false)
|
||||
|
||||
|
||||
func _open_mail_menu() -> void:
|
||||
_mail_menu.visible = true
|
||||
_mail_status_label.text = "Loading mailbox..."
|
||||
_selected_inbox_mail_id = ""
|
||||
_selected_sent_mail_id = ""
|
||||
_set_player_menu_lock(true)
|
||||
_update_mail_location_label()
|
||||
_refresh_mailbox()
|
||||
|
||||
|
||||
func _close_mail_menu() -> void:
|
||||
_mail_menu.visible = false
|
||||
_mail_status_label.text = ""
|
||||
_set_player_menu_lock(false)
|
||||
|
||||
|
||||
func _update_mail_location_label() -> void:
|
||||
var location_data := _get_location_data(_center_coord)
|
||||
var location_name := String(location_data.get("name", "Mailbox")).strip_edges()
|
||||
_mail_location_label.text = "%s (%d,%d)" % [location_name, _center_coord.x, _center_coord.y]
|
||||
|
||||
|
||||
func _set_player_menu_lock(locked: bool) -> void:
|
||||
if _player == null:
|
||||
return
|
||||
@@ -503,14 +549,16 @@ func _create_object_material(object_key: String) -> StandardMaterial3D:
|
||||
material.roughness = 1.0
|
||||
material.metallic = 0.0
|
||||
|
||||
if object_key.contains("grass"):
|
||||
material.albedo_color = Color(0.28, 0.68, 0.25, 1.0)
|
||||
elif object_key.contains("wood"):
|
||||
material.albedo_color = Color(0.54, 0.36, 0.18, 1.0)
|
||||
elif object_key.contains("stone"):
|
||||
material.albedo_color = Color(0.55, 0.57, 0.6, 1.0)
|
||||
else:
|
||||
material.albedo_color = Color(0.85, 0.75, 0.3, 1.0)
|
||||
if object_key.contains("grass"):
|
||||
material.albedo_color = Color(0.28, 0.68, 0.25, 1.0)
|
||||
elif object_key.contains("wood"):
|
||||
material.albedo_color = Color(0.54, 0.36, 0.18, 1.0)
|
||||
elif object_key.contains("stone"):
|
||||
material.albedo_color = Color(0.55, 0.57, 0.6, 1.0)
|
||||
elif object_key.contains("mailbox"):
|
||||
material.albedo_color = Color(0.22, 0.44, 0.78, 1.0)
|
||||
else:
|
||||
material.albedo_color = Color(0.85, 0.75, 0.3, 1.0)
|
||||
|
||||
return material
|
||||
|
||||
@@ -894,6 +942,266 @@ func _fetch_character_inventory() -> Array:
|
||||
|
||||
var payload := parsed as Dictionary
|
||||
return _parse_floor_inventory_items(payload.get("items", []))
|
||||
|
||||
|
||||
func _refresh_mailbox() -> void:
|
||||
if _mail_request_in_flight or _character_id.is_empty():
|
||||
return
|
||||
_refresh_mailbox_async()
|
||||
|
||||
|
||||
func _refresh_mailbox_async() -> void:
|
||||
_mail_request_in_flight = true
|
||||
var request := HTTPRequest.new()
|
||||
add_child(request)
|
||||
|
||||
var headers := PackedStringArray()
|
||||
if not AuthState.access_token.is_empty():
|
||||
headers.append("Authorization: Bearer %s" % AuthState.access_token)
|
||||
|
||||
var err := request.request("%s/characters/%s" % [MAIL_API_URL, _character_id], headers, HTTPClient.METHOD_GET)
|
||||
if err != OK:
|
||||
request.queue_free()
|
||||
_mail_status_label.text = "Failed to load mailbox."
|
||||
_mail_request_in_flight = false
|
||||
return
|
||||
|
||||
var result: Array = await request.request_completed
|
||||
request.queue_free()
|
||||
_mail_request_in_flight = false
|
||||
|
||||
var result_code: int = result[0]
|
||||
var response_code: int = result[1]
|
||||
var response_body: String = result[3].get_string_from_utf8()
|
||||
if result_code != HTTPRequest.RESULT_SUCCESS or response_code < 200 or response_code >= 300:
|
||||
_mail_status_label.text = "Failed to load mailbox."
|
||||
push_warning("Failed to load mailbox (%s/%s): %s" % [result_code, response_code, response_body])
|
||||
return
|
||||
|
||||
var parsed: Variant = JSON.parse_string(response_body)
|
||||
if typeof(parsed) != TYPE_DICTIONARY:
|
||||
_mail_status_label.text = "Mailbox response was invalid."
|
||||
return
|
||||
|
||||
var mailbox := parsed as Dictionary
|
||||
_mail_inbox = _parse_mail_messages(mailbox.get("inbox", []))
|
||||
_mail_sent = _parse_mail_messages(mailbox.get("sent", []))
|
||||
_render_mailbox()
|
||||
_mail_status_label.text = ""
|
||||
|
||||
|
||||
func _render_mailbox() -> void:
|
||||
var current_inbox_id := _selected_inbox_mail_id
|
||||
var current_sent_id := _selected_sent_mail_id
|
||||
_mail_inbox_items.clear()
|
||||
for index in range(_mail_inbox.size()):
|
||||
var message := _mail_inbox[index] as Dictionary
|
||||
var prefix := "[NEW] " if String(message.get("readUtc", "")).is_empty() else ""
|
||||
var text := "%s%s | %s" % [
|
||||
prefix,
|
||||
String(message.get("senderCharacterName", "")).strip_edges(),
|
||||
String(message.get("subject", "")).strip_edges()
|
||||
]
|
||||
_mail_inbox_items.add_item(text)
|
||||
_mail_inbox_items.set_item_metadata(index, message)
|
||||
if String(message.get("id", "")).strip_edges() == current_inbox_id:
|
||||
_mail_inbox_items.select(index)
|
||||
|
||||
_mail_sent_items.clear()
|
||||
for index in range(_mail_sent.size()):
|
||||
var message := _mail_sent[index] as Dictionary
|
||||
var text := "%s | %s" % [
|
||||
String(message.get("recipientCharacterName", "")).strip_edges(),
|
||||
String(message.get("subject", "")).strip_edges()
|
||||
]
|
||||
_mail_sent_items.add_item(text)
|
||||
_mail_sent_items.set_item_metadata(index, message)
|
||||
if String(message.get("id", "")).strip_edges() == current_sent_id:
|
||||
_mail_sent_items.select(index)
|
||||
|
||||
_update_mail_selection_display()
|
||||
|
||||
|
||||
func _parse_mail_messages(value: Variant) -> Array:
|
||||
var messages: Array = []
|
||||
if typeof(value) != TYPE_ARRAY:
|
||||
return messages
|
||||
|
||||
for entry in value:
|
||||
if typeof(entry) != TYPE_DICTIONARY:
|
||||
continue
|
||||
var message := entry as Dictionary
|
||||
messages.append({
|
||||
"id": String(message.get("id", "")).strip_edges(),
|
||||
"senderCharacterId": String(message.get("senderCharacterId", "")).strip_edges(),
|
||||
"senderCharacterName": String(message.get("senderCharacterName", "")).strip_edges(),
|
||||
"recipientCharacterId": String(message.get("recipientCharacterId", "")).strip_edges(),
|
||||
"recipientCharacterName": String(message.get("recipientCharacterName", "")).strip_edges(),
|
||||
"subject": String(message.get("subject", "")).strip_edges(),
|
||||
"body": String(message.get("body", "")).strip_edges(),
|
||||
"createdUtc": String(message.get("createdUtc", "")).strip_edges(),
|
||||
"readUtc": String(message.get("readUtc", "")).strip_edges()
|
||||
})
|
||||
|
||||
return messages
|
||||
|
||||
|
||||
func _update_mail_selection_display() -> void:
|
||||
var selected_message := {}
|
||||
if not _selected_inbox_mail_id.is_empty():
|
||||
selected_message = _find_mail_message_by_id(_mail_inbox, _selected_inbox_mail_id)
|
||||
elif not _selected_sent_mail_id.is_empty():
|
||||
selected_message = _find_mail_message_by_id(_mail_sent, _selected_sent_mail_id)
|
||||
|
||||
if selected_message.is_empty():
|
||||
_mail_selected_label.text = "Selected Mail"
|
||||
_mail_selected_body.text = ""
|
||||
return
|
||||
|
||||
var subject := String(selected_message.get("subject", "")).strip_edges()
|
||||
var sender_name := String(selected_message.get("senderCharacterName", "")).strip_edges()
|
||||
var recipient_name := String(selected_message.get("recipientCharacterName", "")).strip_edges()
|
||||
_mail_selected_label.text = "%s -> %s | %s" % [sender_name, recipient_name, subject]
|
||||
_mail_selected_body.text = String(selected_message.get("body", "")).strip_edges()
|
||||
|
||||
|
||||
func _find_mail_message_by_id(messages: Array, message_id: String) -> Dictionary:
|
||||
for message_variant in messages:
|
||||
if typeof(message_variant) != TYPE_DICTIONARY:
|
||||
continue
|
||||
var message := message_variant as Dictionary
|
||||
if String(message.get("id", "")).strip_edges() == message_id:
|
||||
return message
|
||||
return {}
|
||||
|
||||
|
||||
func _on_mail_inbox_selected(index: int) -> void:
|
||||
var metadata: Variant = _mail_inbox_items.get_item_metadata(index)
|
||||
if typeof(metadata) != TYPE_DICTIONARY:
|
||||
return
|
||||
var message := metadata as Dictionary
|
||||
_selected_sent_mail_id = ""
|
||||
_mail_sent_items.deselect_all()
|
||||
_selected_inbox_mail_id = String(message.get("id", "")).strip_edges()
|
||||
_update_mail_selection_display()
|
||||
_mark_mail_read(_selected_inbox_mail_id)
|
||||
|
||||
|
||||
func _on_mail_sent_selected(index: int) -> void:
|
||||
var metadata: Variant = _mail_sent_items.get_item_metadata(index)
|
||||
if typeof(metadata) != TYPE_DICTIONARY:
|
||||
return
|
||||
var message := metadata as Dictionary
|
||||
_selected_inbox_mail_id = ""
|
||||
_mail_inbox_items.deselect_all()
|
||||
_selected_sent_mail_id = String(message.get("id", "")).strip_edges()
|
||||
_update_mail_selection_display()
|
||||
|
||||
|
||||
func _mark_mail_read(message_id: String) -> void:
|
||||
if message_id.is_empty():
|
||||
return
|
||||
_mark_mail_read_async(message_id)
|
||||
|
||||
|
||||
func _mark_mail_read_async(message_id: String) -> void:
|
||||
var request := HTTPRequest.new()
|
||||
add_child(request)
|
||||
|
||||
var headers := PackedStringArray()
|
||||
if not AuthState.access_token.is_empty():
|
||||
headers.append("Authorization: Bearer %s" % AuthState.access_token)
|
||||
|
||||
var err := request.request("%s/characters/%s/messages/%s/read" % [MAIL_API_URL, _character_id, message_id], headers, HTTPClient.METHOD_POST)
|
||||
if err != OK:
|
||||
request.queue_free()
|
||||
return
|
||||
|
||||
var result: Array = await request.request_completed
|
||||
request.queue_free()
|
||||
var result_code: int = result[0]
|
||||
var response_code: int = result[1]
|
||||
if result_code != HTTPRequest.RESULT_SUCCESS or response_code < 200 or response_code >= 300:
|
||||
return
|
||||
|
||||
for index in range(_mail_inbox.size()):
|
||||
var message := _mail_inbox[index] as Dictionary
|
||||
if String(message.get("id", "")).strip_edges() != message_id:
|
||||
continue
|
||||
message["readUtc"] = "read"
|
||||
_mail_inbox[index] = message
|
||||
break
|
||||
_render_mailbox()
|
||||
|
||||
|
||||
func _on_mail_refresh_pressed() -> void:
|
||||
_mail_status_label.text = "Refreshing mailbox..."
|
||||
_refresh_mailbox()
|
||||
|
||||
|
||||
func _on_mail_send_pressed() -> void:
|
||||
var recipient_name := _mail_recipient_line_edit.text.strip_edges()
|
||||
var subject := _mail_subject_line_edit.text.strip_edges()
|
||||
var body := _mail_compose_body.text.strip_edges()
|
||||
if recipient_name.is_empty():
|
||||
_mail_status_label.text = "Recipient character name is required."
|
||||
return
|
||||
if subject.is_empty():
|
||||
_mail_status_label.text = "Subject is required."
|
||||
return
|
||||
if body.is_empty():
|
||||
_mail_status_label.text = "Body is required."
|
||||
return
|
||||
_send_mail_async(recipient_name, subject, body)
|
||||
|
||||
|
||||
func _send_mail_async(recipient_name: String, subject: String, body: String) -> void:
|
||||
if _mail_request_in_flight:
|
||||
return
|
||||
_mail_request_in_flight = true
|
||||
_mail_status_label.text = "Sending mail..."
|
||||
|
||||
var request := HTTPRequest.new()
|
||||
add_child(request)
|
||||
|
||||
var headers := PackedStringArray()
|
||||
if not AuthState.access_token.is_empty():
|
||||
headers.append("Authorization: Bearer %s" % AuthState.access_token)
|
||||
headers.append("Content-Type: application/json")
|
||||
|
||||
var payload := JSON.stringify({
|
||||
"recipientCharacterName": recipient_name,
|
||||
"subject": subject,
|
||||
"body": body
|
||||
})
|
||||
var err := request.request("%s/characters/%s/send" % [MAIL_API_URL, _character_id], headers, HTTPClient.METHOD_POST, payload)
|
||||
if err != OK:
|
||||
request.queue_free()
|
||||
_mail_request_in_flight = false
|
||||
_mail_status_label.text = "Failed to send mail."
|
||||
return
|
||||
|
||||
var result: Array = await request.request_completed
|
||||
request.queue_free()
|
||||
_mail_request_in_flight = false
|
||||
|
||||
var result_code: int = result[0]
|
||||
var response_code: int = result[1]
|
||||
var response_body: String = result[3].get_string_from_utf8()
|
||||
if result_code != HTTPRequest.RESULT_SUCCESS or response_code < 200 or response_code >= 300:
|
||||
_mail_status_label.text = "Failed to send mail."
|
||||
push_warning("Failed to send mail (%s/%s): %s" % [result_code, response_code, response_body])
|
||||
return
|
||||
|
||||
_mail_recipient_line_edit.text = ""
|
||||
_mail_subject_line_edit.text = ""
|
||||
_mail_compose_body.text = ""
|
||||
_mail_status_label.text = "Mail sent."
|
||||
_refresh_mailbox()
|
||||
|
||||
|
||||
func _on_mail_close_pressed() -> void:
|
||||
_close_mail_menu()
|
||||
|
||||
|
||||
func _ensure_selected_location_exists(coord: Vector2i) -> void:
|
||||
@@ -1047,7 +1355,7 @@ func _try_interact_current_tile() -> void:
|
||||
_interact_with_location_async(location_id, object_id)
|
||||
|
||||
|
||||
func _interact_with_location_async(location_id: String, object_id: String) -> void:
|
||||
func _interact_with_location_async(location_id: String, object_id: String) -> void:
|
||||
var request := HTTPRequest.new()
|
||||
add_child(request)
|
||||
|
||||
@@ -1079,12 +1387,16 @@ func _interact_with_location_async(location_id: String, object_id: String) -> vo
|
||||
return
|
||||
|
||||
var parsed: Variant = JSON.parse_string(response_body)
|
||||
if typeof(parsed) != TYPE_DICTIONARY:
|
||||
push_warning("Location interaction response was not an object.")
|
||||
_interact_in_flight = false
|
||||
return
|
||||
|
||||
if typeof(parsed) != TYPE_DICTIONARY:
|
||||
push_warning("Location interaction response was not an object.")
|
||||
_interact_in_flight = false
|
||||
return
|
||||
|
||||
var interaction := parsed as Dictionary
|
||||
if String(interaction.get("objectType", "")).strip_edges() == "mailbox":
|
||||
_open_mail_menu()
|
||||
_interact_in_flight = false
|
||||
return
|
||||
_apply_interaction_result(location_id, interaction)
|
||||
await _refresh_location_inventory(location_id)
|
||||
_interact_in_flight = false
|
||||
|
||||
@@ -234,6 +234,142 @@ text = "CLOSE"
|
||||
layout_mode = 2
|
||||
text = ""
|
||||
|
||||
[node name="MailMenu" type="CanvasLayer" parent="."]
|
||||
visible = false
|
||||
layer = 2
|
||||
|
||||
[node name="Overlay" type="ColorRect" parent="MailMenu"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
color = Color(0, 0, 0, 0.4)
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="MailMenu"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 48
|
||||
theme_override_constants/margin_top = 48
|
||||
theme_override_constants/margin_right = 48
|
||||
theme_override_constants/margin_bottom = 48
|
||||
|
||||
[node name="Panel" type="PanelContainer" parent="MailMenu/MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MailMenu/MarginContainer/Panel"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="TitleLabel" type="Label" parent="MailMenu/MarginContainer/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Mailbox"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="MailboxLocationLabel" type="Label" parent="MailMenu/MarginContainer/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Mailbox"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Columns" type="HBoxContainer" parent="MailMenu/MarginContainer/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/separation = 12
|
||||
|
||||
[node name="InboxPanel" type="PanelContainer" parent="MailMenu/MarginContainer/Panel/VBoxContainer/Columns"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MailMenu/MarginContainer/Panel/VBoxContainer/Columns/InboxPanel"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="InboxLabel" type="Label" parent="MailMenu/MarginContainer/Panel/VBoxContainer/Columns/InboxPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Inbox"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="InboxItems" type="ItemList" parent="MailMenu/MarginContainer/Panel/VBoxContainer/Columns/InboxPanel/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 220)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="SentPanel" type="PanelContainer" parent="MailMenu/MarginContainer/Panel/VBoxContainer/Columns"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MailMenu/MarginContainer/Panel/VBoxContainer/Columns/SentPanel"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="SentLabel" type="Label" parent="MailMenu/MarginContainer/Panel/VBoxContainer/Columns/SentPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Sent"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="SentItems" type="ItemList" parent="MailMenu/MarginContainer/Panel/VBoxContainer/Columns/SentPanel/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 220)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="DetailsComposePanel" type="PanelContainer" parent="MailMenu/MarginContainer/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="SelectedMailLabel" type="Label" parent="MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Selected Mail"
|
||||
|
||||
[node name="SelectedMailBody" type="TextEdit" parent="MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 120)
|
||||
layout_mode = 2
|
||||
editable = false
|
||||
|
||||
[node name="RecipientLineEdit" type="LineEdit" parent="MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
placeholder_text = "Recipient character name"
|
||||
|
||||
[node name="SubjectLineEdit" type="LineEdit" parent="MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
placeholder_text = "Subject"
|
||||
|
||||
[node name="ComposeBody" type="TextEdit" parent="MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 120)
|
||||
layout_mode = 2
|
||||
placeholder_text = "Write your mail here"
|
||||
|
||||
[node name="ActionRow" type="HBoxContainer" parent="MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="RefreshButton" type="Button" parent="MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer/ActionRow"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("4_button_theme")
|
||||
text = "REFRESH"
|
||||
|
||||
[node name="SendButton" type="Button" parent="MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer/ActionRow"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("4_button_theme")
|
||||
text = "SEND"
|
||||
|
||||
[node name="CloseButton" type="Button" parent="MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer/ActionRow"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("4_button_theme")
|
||||
text = "CLOSE"
|
||||
|
||||
[node name="StatusLabel" type="Label" parent="MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = ""
|
||||
|
||||
[connection signal="pressed" from="PauseMenu/CenterContainer/Panel/VBoxContainer/ContinueButton" to="." method="_on_pause_continue_pressed"]
|
||||
[connection signal="pressed" from="PauseMenu/CenterContainer/Panel/VBoxContainer/SettingsButton" to="." method="_on_pause_settings_pressed"]
|
||||
[connection signal="pressed" from="PauseMenu/CenterContainer/Panel/VBoxContainer/MainMenuButton" to="." method="_on_pause_main_menu_pressed"]
|
||||
@@ -244,3 +380,8 @@ text = ""
|
||||
[connection signal="pressed" from="InventoryMenu/MarginContainer/Panel/VBoxContainer/ControlsPanel/VBoxContainer/ActionRow/PickupButton" to="." method="_on_inventory_pickup_pressed"]
|
||||
[connection signal="pressed" from="InventoryMenu/MarginContainer/Panel/VBoxContainer/ControlsPanel/VBoxContainer/ActionRow/RefreshButton" to="." method="_on_inventory_refresh_pressed"]
|
||||
[connection signal="pressed" from="InventoryMenu/MarginContainer/Panel/VBoxContainer/ControlsPanel/VBoxContainer/ActionRow/CloseButton" to="." method="_on_inventory_close_pressed"]
|
||||
[connection signal="item_selected" from="MailMenu/MarginContainer/Panel/VBoxContainer/Columns/InboxPanel/VBoxContainer/InboxItems" to="." method="_on_mail_inbox_selected"]
|
||||
[connection signal="item_selected" from="MailMenu/MarginContainer/Panel/VBoxContainer/Columns/SentPanel/VBoxContainer/SentItems" to="." method="_on_mail_sent_selected"]
|
||||
[connection signal="pressed" from="MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer/ActionRow/RefreshButton" to="." method="_on_mail_refresh_pressed"]
|
||||
[connection signal="pressed" from="MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer/ActionRow/SendButton" to="." method="_on_mail_send_pressed"]
|
||||
[connection signal="pressed" from="MailMenu/MarginContainer/Panel/VBoxContainer/DetailsComposePanel/VBoxContainer/ActionRow/CloseButton" to="." method="_on_mail_close_pressed"]
|
||||
|
||||
Reference in New Issue
Block a user