WIP: 360dp lobby redesign

Port the project to a 360x640 canvas with the redesigned lobby, settings sheet, and refreshed UI.
This commit is contained in:
Ratdoku Builder committed 2026-12-02 10:34:26 -06:00
1 parent f6fd807e9a
commit 46b5764144
34 files changed
+1299 -261

No files matched your search

+43 -47
View File
@@ -18,43 +18,39 @@ var detail_status: Label
func _ready() -> void:
var margin := MarginContainer.new()
margin.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
margin.add_theme_constant_override("margin_left", 20)
margin.add_theme_constant_override("margin_right", 20)
margin.add_theme_constant_override("margin_top", 16)
margin.add_theme_constant_override("margin_bottom", 16)
margin.add_theme_constant_override("margin_left", 12)
margin.add_theme_constant_override("margin_right", 12)
margin.add_theme_constant_override("margin_top", 8)
margin.add_theme_constant_override("margin_bottom", 10)
add_child(margin)
var column := VBoxContainer.new()
column.add_theme_constant_override("separation", 10)
column.add_theme_constant_override("separation", 6)
margin.add_child(column)
var top := HBoxContainer.new()
top.add_theme_constant_override("separation", 10)
top.add_theme_constant_override("separation", 6)
column.add_child(top)
var back := UI.button("‹", false, 44)
back.custom_minimum_size = Vector2(48, 44)
back.add_theme_font_size_override("font_size", 30)
var back := UI.round_button("res://assets/icons/arrow-left.svg", 40)
back.pressed.connect(func() -> void: back_pressed.emit())
top.add_child(back)
var title := UI.label("The Guest Book", 30)
var title := UI.label("The Guest Book", 22)
title.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
title.size_flags_horizontal = Control.SIZE_EXPAND_FILL
top.add_child(title)
progress_label = UI.label("5 of 25 checked in", 15, Palette.MUTED)
progress_label = UI.label("5 of 25", 10, Palette.MUTED)
progress_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT
progress_label.autowrap_mode = TextServer.AUTOWRAP_OFF
progress_label.custom_minimum_size = Vector2(150, 0)
progress_label.size_flags_horizontal = Control.SIZE_SHRINK_END
progress_label.custom_minimum_size = Vector2(70, 0)
top.add_child(progress_label)
var crumb := _make_crumb_card()
column.add_child(crumb)
column.add_child(_make_crumb_card())
status_label = UI.label("Tap a guest to read their card.", 14, Palette.MUTED)
status_label.custom_minimum_size = Vector2(0, 28)
status_label = UI.label("Tap a guest to read their card.", 10, Palette.MUTED)
status_label.custom_minimum_size = Vector2(0, 20)
column.add_child(status_label)
var scroll := ScrollContainer.new()
@@ -66,8 +62,8 @@ func _ready() -> void:
grid = GridContainer.new()
grid.columns = 3
grid.size_flags_horizontal = Control.SIZE_EXPAND_FILL
grid.add_theme_constant_override("h_separation", 8)
grid.add_theme_constant_override("v_separation", 8)
grid.add_theme_constant_override("h_separation", 5)
grid.add_theme_constant_override("v_separation", 5)
scroll.add_child(grid)
_build_detail()
@@ -77,31 +73,30 @@ func _ready() -> void:
func _make_crumb_card() -> PanelContainer:
var panel := UI.panel(Palette.PAPER, 20, 12)
var panel := UI.panel(Palette.PAPER, 14, 8)
var row := HBoxContainer.new()
row.add_theme_constant_override("separation", 12)
row.add_theme_constant_override("separation", 8)
panel.add_child(row)
var portrait := TextureRect.new()
portrait.custom_minimum_size = Vector2(86, 86)
portrait.custom_minimum_size = Vector2(50, 50)
portrait.expand_mode = TextureRect.EXPAND_IGNORE_SIZE
portrait.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
if ResourceLoader.exists("res://art/crumb_head.png"):
portrait.texture = load("res://art/crumb_head.png")
elif ResourceLoader.exists("res://art/crumb.png"):
portrait.texture = load("res://art/crumb.png")
row.add_child(portrait)
var text := VBoxContainer.new()
text.size_flags_horizontal = Control.SIZE_EXPAND_FILL
text.alignment = BoxContainer.ALIGNMENT_CENTER
text.add_theme_constant_override("separation", 0)
row.add_child(text)
var name := UI.label("Crumb", 22)
var name := UI.label("Crumb", 16)
name.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
text.add_child(name)
var role := UI.label("Innkeeper · always in", 14, Palette.MUTED)
var role := UI.label("Innkeeper · always in", 10, Palette.MUTED)
role.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
text.add_child(role)
@@ -116,7 +111,7 @@ func refresh() -> void:
var guests := Guests.all()
var unlocked := SaveGame.unlocked_count(guests)
progress_label.text = "%d of %d checked in" % [unlocked, guests.size()]
progress_label.text = "%d/%d" % [unlocked, guests.size()]
for guest in guests:
grid.add_child(_make_card(guest))
@@ -127,20 +122,20 @@ func _make_card(guest: Dictionary) -> PanelContainer:
var locked := not SaveGame.is_guest_unlocked(id)
var accent := Color(str(guest.get("accent", "#8c7460")))
var panel := UI.panel(Palette.PAPER, 18, 8)
panel.custom_minimum_size = Vector2(188, 224)
var panel := UI.panel(Palette.PAPER, 12, 5)
panel.custom_minimum_size = Vector2(105, 148)
panel.size_flags_horizontal = Control.SIZE_EXPAND_FILL
panel.mouse_filter = Control.MOUSE_FILTER_STOP
panel.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND
panel.gui_input.connect(_on_card_input.bind(guest, locked))
var box := VBoxContainer.new()
box.add_theme_constant_override("separation", 2)
box.add_theme_constant_override("separation", 1)
box.mouse_filter = Control.MOUSE_FILTER_IGNORE
panel.add_child(box)
var portrait := Control.new()
portrait.custom_minimum_size = Vector2(170, 170)
portrait.custom_minimum_size = Vector2(94, 96)
portrait.mouse_filter = Control.MOUSE_FILTER_IGNORE
box.add_child(portrait)
@@ -153,25 +148,25 @@ func _make_card(guest: Dictionary) -> PanelContainer:
portrait.add_child(texture)
if locked:
texture.modulate = Color(1.0, 1.0, 1.0, 0.18)
texture.modulate = Color(1, 1, 1, 0.18)
var veil := ColorRect.new()
veil.color = Color(0.98, 0.93, 0.84, 0.78)
veil.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
veil.mouse_filter = Control.MOUSE_FILTER_IGNORE
portrait.add_child(veil)
var mystery := UI.label("???", 34, Palette.INK)
var mystery := UI.label("???", 22, Palette.INK)
mystery.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
mystery.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
mystery.mouse_filter = Control.MOUSE_FILTER_IGNORE
portrait.add_child(mystery)
var name_label := UI.label("???" if locked else str(guest["name"]), 17)
var name_label := UI.label("???" if locked else str(guest["name"]), 12)
name_label.mouse_filter = Control.MOUSE_FILTER_IGNORE
box.add_child(name_label)
var role_text := "Room %d" % int(guest.get("unlock_room", 0)) if locked else str(guest["role"])
var role_label := UI.label(role_text, 13, Palette.MUTED if locked else accent)
var role_label := UI.label(role_text, 9, Palette.MUTED if locked else accent)
role_label.mouse_filter = Control.MOUSE_FILTER_IGNORE
box.add_child(role_label)
@@ -203,37 +198,38 @@ func _build_detail() -> void:
center.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
detail_layer.add_child(center)
var panel := UI.panel(Palette.CREAM, 32, 24)
panel.custom_minimum_size = Vector2(420, 0)
var panel := UI.panel(Palette.CREAM, 24, 16)
panel.custom_minimum_size = Vector2(320, 0)
center.add_child(panel)
var box := VBoxContainer.new()
box.add_theme_constant_override("separation", 8)
box.add_theme_constant_override("separation", 4)
panel.add_child(box)
detail_portrait = TextureRect.new()
detail_portrait.custom_minimum_size = Vector2(300, 300)
detail_portrait.custom_minimum_size = Vector2(180, 180)
detail_portrait.expand_mode = TextureRect.EXPAND_IGNORE_SIZE
detail_portrait.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
box.add_child(detail_portrait)
detail_name = UI.label("Name", 30)
detail_name = UI.heading("Name", 22)
box.add_child(detail_name)
detail_role = UI.label("Role", 18, Palette.MUTED)
detail_role = UI.label("Role", 13, Palette.MUTED)
box.add_child(detail_role)
detail_meta = UI.label("Variety", 15, Palette.MUTED)
detail_meta = UI.label("Variety", 11, Palette.MUTED)
box.add_child(detail_meta)
detail_bio = UI.label("", 17)
detail_bio.custom_minimum_size = Vector2(0, 52)
detail_bio = UI.label("", 12)
detail_bio.custom_minimum_size = Vector2(0, 38)
box.add_child(detail_bio)
detail_snack = UI.label("", 15, Palette.MUTED)
detail_snack = UI.label("", 11, Palette.MUTED)
box.add_child(detail_snack)
detail_status = UI.label("", 14, Palette.MUTED)
detail_status = UI.label("", 10, Palette.MUTED)
box.add_child(detail_status)
var close := UI.button("Close", false, 50)
var close := UI.button("Close", false, 44)
close.add_theme_font_size_override("font_size", 16)
close.pressed.connect(func() -> void: detail_layer.visible = false)
box.add_child(close)