feat(ui): 360dp redesign with patterns, room legend, and in-level settings

This commit is contained in:
Ratdoku Builder committed 2026-12-02 10:42:09 -06:00
1 parent 46b5764144
commit 089f5d6171
12 files changed
+115 -263

No files matched your search

+45 -14
View File
@@ -8,14 +8,14 @@ A cozy rat-hotel logic puzzle. Every guest gets a room, a floor, a corridor, and
2. Open this folder in Godot (`project.godot`).
3. Press **F5**.
The project uses a portrait 720×1280 canvas, scaled to a 540×960 desktop window.
The project uses a portrait **360×640 dp canvas**, scaled to a 540×960 desktop window. On a tall phone it expands vertically instead of stretching the UI.
## How to play
- **Tap / left-click** a cell to mark it with an X. Tap an X or a guest to clear it.
- **Press and hold** (mobile) or **right-click** (PC) to check a guest in. Hold or right-click a guest to check them out.
- A gold ring fills while you hold; at the hold threshold (default 0.35 s) the guest is placed.
- **Undo**, **Restart**, and **Hint** are at the bottom.
- **Undo** and **Hint** are at the bottom. **Restart room** and **Back to lobby** live in the in-level settings sheet.
- A **gold ring** around a guest means they are already checked in and cannot be moved.
- Win when every room, floor, and corridor has exactly one rat and no two rats touch — even diagonally.
- **No guessing is required.** Every room has exactly one solution.
@@ -26,12 +26,18 @@ Every level assigns **eight distinct guests** to its eight coloured rooms. The g
The board uses circular **head tokens** from `art/guests/heads/`. Crumb remains the host and appears on Home and in the win overlay.
### Pattern mode and the room legend
- **Pattern mode is on by default.** Each room carries a distinct motif — paw, cheese, key, bed, bell, leaf, fish, star — drawn over the colour. Turn it off in Settings for flat colours.
- A **room legend** above the board shows the eight guests for the level, one per region colour. Solved rooms get a gold ring.
- The **gear in the top-right opens settings over the puzzle**, so patterns, timer, motion, and hold time can change without leaving the room. **Resume** is the primary action; restarting is deliberately secondary.
## Screens
- **Home** — Crumb, Check in, Guest Book, House Rules, Settings.
- **Game** — board, timer, undo/restart/hint, win overlay.
- **Home** — top hub with Crumb avatar, guest progress, and settings; Continue/Check in; Guest Book; House Rules.
- **Game** — top bar, rule strip for the first three rooms, room legend, board, timer, undo/hint, in-level settings, win overlay.
- **The Guest Book** — 25 guests: five residents unlocked from the start, the other 20 unlocked one per room. Locked cards show a very faint portrait under `???` and their room number.
- **Settings** — region patterns, timer, reduce motion, hold-time slider, reset progress.
- **Settings** — a bottom sheet over Home or the board: room patterns, timer, reduce motion, hold time, how to play, restart/back, reset progress.
- **House Rules** — four illustrated rules, controls, tips, FAQ, and an interactive 5×5 practice board.
## Unlocks
@@ -55,24 +61,28 @@ scenes/
Game.tscn board screen + HUD + win overlay
Board.tscn custom-drawn board
GuestBook.tscn gallery
Settings.tscn settings
SettingsSheet.tscn bottom-sheet settings
Rulebook.tscn house rules + interactive tutorial
scripts/
Main.gd navigation/back stack
Home.gd home screen
Game.gd level flow, timer, unlock flow, win overlay
Board.gd drawing, input, undo, hints, per-room guests, settings
Main.gd navigation/back stack + sheet routing
Home.gd top hub + home screen
Game.gd level flow, legend, rule strip, timer, win overlay
Board.gd rounded tiles, motifs, input, undo, hints, per-room guests
Rules.gd pure win/conflict rules
Levels.gd JSON level loader
Guests.gd guest manifest loader
SaveGame.gd autoload: settings + progress
GuestBook.gd gallery, locked cards, detail sheet
Settings.gd settings toggles + reset
SettingsSheet.gd shared settings sheet
Rulebook.gd handbook content + 5×5 tutorial
MiniDiagram.gd rule illustrations
Palette.gd colours
UI.gd button/label/panel helpers
UI.gd 360dp tokens, fonts, buttons, icons
Version.gd version/build label
RatPortrait.gd fallback vector mascot
assets/
fonts/ Fredoka + Nunito (OFL)
icons/ Lucide SVG icon set
art/
crumb.png full mascot
crumb_head.png circular head token used on Home/win
@@ -132,11 +142,12 @@ build/Ratdoku.apk
It is a **debug-signed, arm64-v8a** APK:
- Package: `com.ratdoku.game`
- Version: `0.2` (version code 1)
- Version: `0.4.0` (version code 4)
- Min SDK: 24 (Android 7.0)
- Target SDK: 36
- Size: about 41 MB
- Portrait orientation
- Build label: `v0.4.0-alpha · build 2026-12-02`
To install, copy the APK to the phone, open it, and allow “Install unknown apps” for the file manager/browser. Or with a USB-connected phone and USB debugging:
@@ -175,12 +186,32 @@ If you want a Play Store build, switch `gradle_build/export_format` to AAB, use
`ui_test.gd` checks settings propagation, room-1 → Pepper unlock, gallery progress, and the interactive 5×5 tutorial. Both tests reset the save when they finish.
## Versioning and releases
The current development build is **v0.4.0-alpha** (“Lobby Redesign”) with the build label on Home and in Settings.
Gitea repository:
`https://gitea.nyxara.cc/Ahri-the-Vastaya/Ratdoku`
Alpha releases (all marked prerelease, each with a debug APK and source archive):
- **v0.1.0-alpha** — first playable 20-room prototype
- **v0.2.0-alpha** — Guest Book, Settings, House Rules, 25 guests
- **v0.3.0-alpha** — 30 rooms, unique guest per room, Android APK
- `redesign-360` — branch with the 360dp redesign work
The version is set in three places: `project.godot` (`config/version`), `scripts/Version.gd` (display label), and `export_presets.cfg` (`version/name`, `version/code`).
## Current scope
- 30 verified 8×8 rooms (20 guest rooms + 10 bonus)
- Unique guest per room per level
- 360dp layout, Fredoka/Nunito typography, Lucide icons
- Playful rounded tiles, 8 pattern motifs, room legend
- In-level settings sheet with patterns/timer/motion/hold/restart/lobby
- Interactive 5×5 tutorial
- 25 guest portraits + Crumb
- Settings, gallery, rulebook, unlock flow
- Installable Android debug APK
- No audio yet, no daily puzzle, no release keystore/AAB yet
- No audio yet, no profile/daily streak yet, no release keystore/AAB yet
-12
View File
@@ -1,12 +0,0 @@
[gd_scene load_steps=2 format=3]
[ext_resource type="Script" path="res://scripts/Settings.gd" id="1_settings"]
[node name="Settings" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_settings")
+5 -5
View File
@@ -173,9 +173,9 @@ func _draw() -> void:
if value == RAT:
_draw_rat(Vector2i(r, c))
elif value == X:
_draw_x(_cell_rect(r, c), Color(0.29, 0.20, 0.14, 0.60))
_draw_x(_cell_rect(r, c), Color(0.29, 0.20, 0.14, 0.52))
elif auto_x[r][c]:
_draw_x(_cell_rect(r, c), Color(0.29, 0.20, 0.14, 0.24))
_draw_x(_cell_rect(r, c), Color(0.29, 0.20, 0.14, 0.20))
# Soft red ring around any rat that breaks a rule.
for cell in conflict_cells:
@@ -279,13 +279,13 @@ func _draw_motif(center: Vector2, size: float, motif: int, tint: Color, base: Co
func _draw_x(rect: Rect2, color: Color) -> void:
var inset := rect.size.x * 0.30
var inset := rect.size.x * 0.32
var a := rect.position + Vector2(inset, inset)
var b := rect.position + Vector2(rect.size.x - inset, rect.size.y - inset)
var c := rect.position + Vector2(rect.size.x - inset, inset)
var d := rect.position + Vector2(inset, rect.size.y - inset)
draw_line(a, b, color, max(2.0, rect.size.x * 0.045), true)
draw_line(c, d, color, max(2.0, rect.size.x * 0.045), true)
draw_line(a, b, color, max(1.4, rect.size.x * 0.035), true)
draw_line(c, d, color, max(1.4, rect.size.x * 0.035), true)
func _assign_region_rats() -> void:
+11 -4
View File
@@ -52,18 +52,22 @@ func _build_ui() -> void:
# Top bar
var top := HBoxContainer.new()
top.add_theme_constant_override("separation", 8)
top.custom_minimum_size = Vector2(0, 44)
column.add_child(top)
var back := UI.round_button("res://assets/icons/arrow-left.svg", 44)
back.size_flags_vertical = Control.SIZE_SHRINK_CENTER
back.pressed.connect(_on_back)
top.add_child(back)
var center := VBoxContainer.new()
center.size_flags_horizontal = Control.SIZE_EXPAND_FILL
center.size_flags_vertical = Control.SIZE_SHRINK_CENTER
center.add_theme_constant_override("separation", 0)
top.add_child(center)
level_label = UI.label("Room 1", 18)
level_label.autowrap_mode = TextServer.AUTOWRAP_OFF
center.add_child(level_label)
var sub := HBoxContainer.new()
@@ -72,12 +76,15 @@ func _build_ui() -> void:
center.add_child(sub)
guest_label = UI.label("0 / 8", 11, Palette.MUTED)
guest_label.autowrap_mode = TextServer.AUTOWRAP_OFF
sub.add_child(guest_label)
timer_label = UI.label("00:00", 11, Palette.MUTED)
timer_label.autowrap_mode = TextServer.AUTOWRAP_OFF
sub.add_child(timer_label)
var gear := UI.round_button("res://assets/icons/settings.svg", 44)
gear.size_flags_vertical = Control.SIZE_SHRINK_CENTER
gear.pressed.connect(func() -> void: settings_pressed.emit())
top.add_child(gear)
@@ -87,7 +94,7 @@ func _build_ui() -> void:
rule_strip.add_theme_constant_override("separation", 4)
column.add_child(rule_strip)
rule_strip.add_child(_rule_chip("1 per room", "region"))
rule_strip.add_child(_rule_chip("1 per row/col", "row"))
rule_strip.add_child(_rule_chip("Row & col", "row"))
rule_strip.add_child(_rule_chip("No touching", "touch"))
# Room legend: one guest per colour
@@ -133,7 +140,7 @@ func _build_ui() -> void:
func _rule_chip(text: String, mode: String) -> PanelContainer:
var panel := UI.panel(Palette.PAPER, 12, 5)
panel.custom_minimum_size = Vector2(102, 42)
panel.custom_minimum_size = Vector2(104, 42)
var row := HBoxContainer.new()
row.add_theme_constant_override("separation", 3)
panel.add_child(row)
@@ -143,7 +150,7 @@ func _rule_chip(text: String, mode: String) -> PanelContainer:
diagram.custom_minimum_size = Vector2(30, 30)
row.add_child(diagram)
var label := UI.label(text, 9, Palette.MUTED)
var label := UI.label(text, 10, Palette.MUTED)
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
label.custom_minimum_size = Vector2(58, 0)
row.add_child(label)
@@ -284,7 +291,7 @@ func _refresh_legend() -> void:
func _update_legend() -> void:
for region in range(legend_chips.size()):
var chip := legend_chips[region]
var chip: Control = legend_chips[region]
var solved := false
for r in board.n:
for c in board.n:
-1
View File
@@ -16,7 +16,6 @@ var mode := "row"
func _ready() -> void:
mouse_filter = Control.MOUSE_FILTER_IGNORE
custom_minimum_size = Vector2(150, 150)
func _draw() -> void:
+37 -49
View File
@@ -11,27 +11,25 @@ var tutorial_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", 24)
margin.add_theme_constant_override("margin_right", 24)
margin.add_theme_constant_override("margin_top", 18)
margin.add_theme_constant_override("margin_bottom", 18)
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", 12)
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("House Rules", 30)
var title := UI.label("House Rules", 22)
title.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
title.size_flags_horizontal = Control.SIZE_EXPAND_FILL
top.add_child(title)
@@ -43,102 +41,92 @@ func _ready() -> void:
var content := VBoxContainer.new()
content.size_flags_horizontal = Control.SIZE_EXPAND_FILL
content.add_theme_constant_override("separation", 10)
content.add_theme_constant_override("separation", 6)
scroll.add_child(content)
content.add_child(_heading("Welcome to the Rat Hotel"))
content.add_child(UI.heading("Welcome to the Rat Hotel", 18))
content.add_child(_body("Crumb runs a small hotel for travelling rats. Every guest wants a room of their own — and a little space from the neighbours."))
content.add_child(_heading("The four house rules"))
content.add_child(UI.heading("The four house rules", 18))
content.add_child(_rule_row("One guest per room", "Each coloured room holds exactly one rat.", "region"))
content.add_child(_rule_row("One guest per floor", "Each row holds exactly one rat.", "row"))
content.add_child(_rule_row("One guest per corridor", "Each column holds exactly one rat.", "col"))
content.add_child(_rule_row("No shared walls or corners", "Rats cannot touch, not even diagonally.", "touch"))
content.add_child(_heading("Checking in"))
content.add_child(_body("Tap or left-click to mark a cell with an X. Tap an X or a guest to clear it. Press and hold on mobile, or right-click on PC, to check a guest in. A gold ring fills while you hold."))
content.add_child(_body("Gold-ringed guests are already checked in and cannot be moved. Undo is unlimited."))
content.add_child(UI.heading("Checking in", 18))
content.add_child(_body("Tap or left-click to mark X. Tap an X or a guest to clear it. Hold or right-click to check a guest in. Gold-ringed guests are already in."))
content.add_child(_body("Undo is unlimited. Hints are free and explain the next sensible move."))
content.add_child(_heading("Try a tiny room"))
content.add_child(_body("One guest is already checked in. Place the other four. No guessing required."))
content.add_child(UI.heading("Try a tiny room", 18))
content.add_child(_body("One guest is already checked in. Place the other four."))
var board_center := CenterContainer.new()
content.add_child(board_center)
tutorial_board = BoardScene.instantiate() as Board
tutorial_board.custom_minimum_size = Vector2(300, 300)
tutorial_board.size_flags_horizontal = Control.SIZE_SHRINK_CENTER
tutorial_board.custom_minimum_size = Vector2(240, 240)
tutorial_board.solved.connect(_on_tutorial_solved)
board_center.add_child(tutorial_board)
var controls := HBoxContainer.new()
controls.alignment = BoxContainer.ALIGNMENT_CENTER
controls.add_theme_constant_override("separation", 10)
controls.add_theme_constant_override("separation", 8)
content.add_child(controls)
var reset := UI.button("Reset", false, 48)
reset.custom_minimum_size = Vector2(120, 48)
var reset := UI.button("Reset", false, 44)
reset.custom_minimum_size = Vector2(100, 44)
reset.add_theme_font_size_override("font_size", 15)
reset.pressed.connect(_on_tutorial_reset)
controls.add_child(reset)
var hint := UI.button("Hint", true, 48)
hint.custom_minimum_size = Vector2(120, 48)
var hint := UI.button("Hint", true, 44)
hint.custom_minimum_size = Vector2(100, 44)
hint.add_theme_font_size_override("font_size", 15)
hint.pressed.connect(_on_tutorial_hint)
controls.add_child(hint)
tutorial_status = UI.label("Tap a cell to mark X. Hold or right-click to check in.", 14, Palette.MUTED)
tutorial_status = UI.label("Tap = X · Hold or right-click = check in", 10, Palette.MUTED)
content.add_child(tutorial_status)
content.add_child(_heading("Housekeeping tips"))
content.add_child(_body("Start with the smallest room. Mark Xs as you place guests — the board does it for you. If a room's open cells all sit in one row, that row's guest belongs to that room. Every room has exactly one solution, and it never requires guessing."))
content.add_child(_body("If you get stuck, the Hint button reveals one correct guest. In the real rooms, Crumb's hints are always free."))
content.add_child(UI.heading("Housekeeping tips", 18))
content.add_child(_body("Start with the smallest room. If a room's open cells all sit in one row, that row's guest belongs to that room. Every room has one solution and never requires guessing."))
content.add_child(_heading("Questions"))
content.add_child(UI.heading("Questions", 18))
content.add_child(_body("Why can't the rats touch? Every guest is a little grumpy after a long journey and wants their own space."))
content.add_child(_body("Why do some guests have gold rings? They checked in early. They are part of the puzzle, not a mistake."))
var gap := Control.new()
gap.custom_minimum_size = Vector2(0, 20)
content.add_child(gap)
var tutorial := _load_tutorial()
if not tutorial.is_empty():
tutorial_board.set_level(tutorial)
func _heading(text: String) -> Label:
var label := UI.label(text, 24)
func _body(text: String) -> Label:
var label := UI.label(text, 12, Palette.MUTED)
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
return label
func _body(text: String, font_size: int = 16) -> Label:
var label := UI.label(text, font_size, Palette.MUTED)
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
return label
func _rule_row(title: String, body: String, mode: String) -> PanelContainer:
var panel := UI.panel(Palette.PAPER, 20, 12)
var panel := UI.panel(Palette.PAPER, 14, 7)
var row := HBoxContainer.new()
row.add_theme_constant_override("separation", 12)
row.add_theme_constant_override("separation", 8)
panel.add_child(row)
var diagram := MiniDiagram.new()
diagram.mode = mode
diagram.custom_minimum_size = Vector2(130, 130)
diagram.custom_minimum_size = Vector2(72, 72)
row.add_child(diagram)
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 heading := UI.label(title, 19)
var heading := UI.label(title, 14)
heading.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
text.add_child(heading)
var detail := UI.label(body, 14, Palette.MUTED)
var detail := UI.label(body, 10, Palette.MUTED)
detail.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
text.add_child(detail)
@@ -160,7 +148,7 @@ func _load_tutorial() -> Dictionary:
func _on_tutorial_reset() -> void:
tutorial_board.restart()
tutorial_status.text = "Tap a cell to mark X. Hold or right-click to check in."
tutorial_status.text = "Tap = X · Hold or right-click = check in"
tutorial_status.add_theme_color_override("font_color", Palette.MUTED)
-169
View File
@@ -1,169 +0,0 @@
extends Control
signal back_pressed
signal rules_pressed
var toggles := {}
var hold_slider: HSlider
var hold_value: Label
var reset_status: Label
var reset_dialog: ConfirmationDialog
func _ready() -> void:
var margin := MarginContainer.new()
margin.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
margin.add_theme_constant_override("margin_left", 24)
margin.add_theme_constant_override("margin_right", 24)
margin.add_theme_constant_override("margin_top", 18)
margin.add_theme_constant_override("margin_bottom", 18)
add_child(margin)
var column := VBoxContainer.new()
column.add_theme_constant_override("separation", 14)
margin.add_child(column)
var top := HBoxContainer.new()
top.add_theme_constant_override("separation", 10)
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)
back.pressed.connect(func() -> void: back_pressed.emit())
top.add_child(back)
var title := UI.label("Settings", 30)
title.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
title.size_flags_horizontal = Control.SIZE_EXPAND_FILL
top.add_child(title)
var scroll := ScrollContainer.new()
scroll.size_flags_horizontal = Control.SIZE_EXPAND_FILL
scroll.size_flags_vertical = Control.SIZE_EXPAND_FILL
column.add_child(scroll)
var list := VBoxContainer.new()
list.size_flags_horizontal = Control.SIZE_EXPAND_FILL
list.add_theme_constant_override("separation", 10)
scroll.add_child(list)
_add_toggle(list, "Region patterns", "Dots and stripes on the coloured rooms. Helps with colour blindness.", "patterns")
_add_toggle(list, "Show timer", "Keep the clock visible while you solve.", "show_timer")
_add_toggle(list, "Reduce motion", "Stop the rat bob and placement pop. The hold ring still works.", "reduce_motion")
_add_hold_row(list)
list.add_child(UI.label("House Rules", 18, Palette.MUTED))
var rules := UI.button("Open the handbook", false, 52)
rules.pressed.connect(func() -> void: rules_pressed.emit())
list.add_child(rules)
list.add_child(UI.label("Progress", 18, Palette.MUTED))
var reset := UI.button("Reset progress", false, 52)
reset.add_theme_color_override("font_color", Palette.RED)
reset.add_theme_color_override("font_hover_color", Palette.RED)
reset.pressed.connect(_on_reset_pressed)
list.add_child(reset)
reset_status = UI.label("Completed rooms and unlocked guests will be cleared. Settings stay.", 15, Palette.MUTED)
list.add_child(reset_status)
list.add_child(UI.label("Ratdoku 0.2 · made with Godot · no ads, no tracking", 14, Palette.MUTED))
reset_dialog = ConfirmationDialog.new()
reset_dialog.title = "Reset progress?"
reset_dialog.dialog_text = "This clears completed rooms and unlocked guests. Your settings stay as they are."
reset_dialog.confirmed.connect(_on_reset_confirmed)
add_child(reset_dialog)
refresh()
func _add_toggle(parent: VBoxContainer, title: String, subtitle: String, key: String) -> void:
var panel := UI.panel(Palette.PAPER, 20, 14)
var row := HBoxContainer.new()
row.add_theme_constant_override("separation", 10)
panel.add_child(row)
var text := VBoxContainer.new()
text.size_flags_horizontal = Control.SIZE_EXPAND_FILL
text.add_theme_constant_override("separation", 2)
row.add_child(text)
var label := UI.label(title, 19)
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
text.add_child(label)
var detail := UI.label(subtitle, 14, Palette.MUTED)
detail.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
text.add_child(detail)
var check := CheckButton.new()
check.button_pressed = bool(SaveGame.get_setting(key))
check.add_theme_font_size_override("font_size", 18)
check.add_theme_color_override("font_color", Palette.INK)
check.toggled.connect(func(on: bool) -> void: SaveGame.set_setting(key, on))
row.add_child(check)
toggles[key] = check
parent.add_child(panel)
func _add_hold_row(parent: VBoxContainer) -> void:
var panel := UI.panel(Palette.PAPER, 20, 14)
var column := VBoxContainer.new()
column.add_theme_constant_override("separation", 6)
panel.add_child(column)
var title := UI.label("Hold time", 19)
title.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
column.add_child(title)
var detail := UI.label("How long to press before a guest checks in.", 14, Palette.MUTED)
detail.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
column.add_child(detail)
var row := HBoxContainer.new()
row.add_theme_constant_override("separation", 10)
column.add_child(row)
hold_slider = HSlider.new()
hold_slider.min_value = 0.20
hold_slider.max_value = 0.50
hold_slider.step = 0.05
hold_slider.value = float(SaveGame.get_setting("hold_seconds"))
hold_slider.size_flags_horizontal = Control.SIZE_EXPAND_FILL
hold_slider.custom_minimum_size = Vector2(180, 32)
hold_slider.value_changed.connect(_on_hold_changed)
row.add_child(hold_slider)
hold_value = UI.label("%.2f s" % hold_slider.value, 16, Palette.MUTED)
hold_value.custom_minimum_size = Vector2(64, 0)
row.add_child(hold_value)
parent.add_child(panel)
func refresh() -> void:
for key in toggles:
toggles[key].button_pressed = bool(SaveGame.get_setting(key))
if hold_slider != null:
hold_slider.set_value_no_signal(float(SaveGame.get_setting("hold_seconds")))
hold_value.text = "%.2f s" % hold_slider.value
func _on_hold_changed(value: float) -> void:
var snapped: float = snapped(value, 0.05)
hold_value.text = "%.2f s" % snapped
SaveGame.set_setting("hold_seconds", snapped)
func _on_reset_pressed() -> void:
reset_dialog.popup_centered()
func _on_reset_confirmed() -> void:
SaveGame.reset_progress()
reset_status.text = "Progress reset. Every guest is waiting to be met again."
reset_status.add_theme_color_override("font_color", Palette.INK)
-1
View File
@@ -1 +0,0 @@
uid://mtpyejbc4p2q
+5 -2
View File
@@ -12,6 +12,7 @@ var hold_value: Label
var restart_row: Control
var lobby_row: Control
var reset_row: Control
var resume_button: Button
var restart_dialog: ConfirmationDialog
var reset_dialog: ConfirmationDialog
var reset_status: Label
@@ -105,9 +106,10 @@ func _ready() -> void:
var resume := UI.button("Resume", true, 52)
resume.pressed.connect(_close)
list.add_child(resume)
resume_button = resume
column.add_child(resume)
list.add_child(UI.label(Version.BUILD_LABEL, 9, Palette.MUTED))
column.add_child(UI.label(Version.BUILD_LABEL, 9, Palette.MUTED))
restart_dialog = ConfirmationDialog.new()
restart_dialog.title = "Restart room?"
@@ -128,6 +130,7 @@ func open_sheet(mode: String) -> void:
lobby_row.visible = game_mode
reset_row.visible = not game_mode
reset_status.visible = not game_mode
resume_button.text = "Resume" if game_mode else "Close"
refresh()
visible = true
move_to_front()
+1 -1
View File
@@ -1 +1 @@
uid://bxvwesi0d3xkp
uid://csmjxuqhlpp0i
+10 -4
View File
@@ -24,14 +24,15 @@ func _run() -> void:
var main = current_scene
_reset_save()
main.open_settings("home")
await _settle()
_save("res://screenshots/settings.png")
main.close_settings()
main.show_screen("guest_book")
await _settle()
_save("res://screenshots/guest_book.png")
main.show_screen("settings")
await _settle()
_save("res://screenshots/settings.png")
main.show_screen("rules")
await _settle()
_save("res://screenshots/rules.png")
@@ -47,6 +48,11 @@ func _run() -> void:
await _settle()
_save("res://screenshots/game.png")
main.open_settings("game")
await _settle()
_save("res://screenshots/settings_game.png")
main.close_settings()
var game = main.game
for i in range(12):
if game.win_shown:
+1 -1
View File
@@ -63,7 +63,7 @@ func _run() -> void:
await process_frame
_check(main.guest_book != null, "Guest Book missing")
if main.guest_book != null and main.guest_book.progress_label != null:
_check(main.guest_book.progress_label.text.find("6 of 25") >= 0, "Guest Book progress should be 6 of 25")
_check(main.guest_book.progress_label.text.find("6/25") >= 0, "Guest Book progress should be 6/25")
main.show_screen("rules")
await process_frame