fix(ui): safe areas, centered top hub, compact settings sheet
This commit is contained in:
1 parent
c6a86d74d9
commit
5402541f59
7 files changed
+95
-58
No files matched your search
+14
-8
@@ -13,8 +13,8 @@ func _ready() -> void:
|
||||
margin.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
|
||||
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)
|
||||
margin.add_theme_constant_override("margin_top", UI.safe_top())
|
||||
margin.add_theme_constant_override("margin_bottom", UI.safe_bottom())
|
||||
add_child(margin)
|
||||
|
||||
var column := VBoxContainer.new()
|
||||
@@ -44,20 +44,20 @@ func _ready() -> void:
|
||||
content.add_theme_constant_override("separation", 6)
|
||||
scroll.add_child(content)
|
||||
|
||||
content.add_child(UI.heading("Welcome to the Rat Hotel", 18))
|
||||
content.add_child(_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(UI.heading("The four house rules", 18))
|
||||
content.add_child(_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(UI.heading("Checking in", 18))
|
||||
content.add_child(_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(UI.heading("Try a tiny room", 18))
|
||||
content.add_child(_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()
|
||||
@@ -87,10 +87,10 @@ func _ready() -> void:
|
||||
tutorial_status = UI.label("Tap = X · Hold or right-click = check in", 10, Palette.MUTED)
|
||||
content.add_child(tutorial_status)
|
||||
|
||||
content.add_child(UI.heading("Housekeeping tips", 18))
|
||||
content.add_child(_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(UI.heading("Questions", 18))
|
||||
content.add_child(_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."))
|
||||
|
||||
@@ -105,6 +105,12 @@ func _body(text: String) -> Label:
|
||||
return label
|
||||
|
||||
|
||||
func _heading(text: String, font_size: int = 18) -> Label:
|
||||
var label := UI.heading(text, font_size)
|
||||
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||
return label
|
||||
|
||||
|
||||
func _rule_row(title: String, body: String, mode: String) -> PanelContainer:
|
||||
var panel := UI.panel(Palette.PAPER, 14, 7)
|
||||
var row := HBoxContainer.new()
|
||||
|
||||
Reference in new issue
Block a user