#37: platform back button, no Quit on phones, flat labels, camera
- Android back: application/config/quit_on_go_back=false; Main.go_back() (from NOTIFICATION_WM_GO_BACK_REQUEST, phones only) closes the shop or pouch panel or leaves build mode, else pauses; paused it closes the question, then settings, then resumes (shared with the pause action); at the main menu it closes the question or settings, else quits. - Phones hide the main menu's Quit and the pause menu's Quit the game. - ScreenLabels.ensure() makes the one ScreenLabels (ToonLook's on desktop; Main's on phones, which watch()es the tree for Label3Ds). Label sizes grow with the window's content_scale_factor (1 on desktop). - FollowCamera starts at PHONE_DISTANCE (12 m) on phones. - MobilePort.forced for tests; game/tests/mobile/platform_test.gd. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f0291133fd
commit
c47e67891e
10 changed files with 368 additions and 23 deletions
|
|
@ -14,7 +14,7 @@ extends Node
|
|||
## * A full-screen quad (pixel_outline.gdshader) darkens depth edges and lightens creases for
|
||||
## whatever camera is current. It needs the Forward+ renderer.
|
||||
## * Label3Ds aren't rendered in 3D (they'd be pixelated): ScreenLabels draws them as sharp text
|
||||
## over the 3D view, under the HUD.
|
||||
## over the 3D view, under the HUD. (Phones have no ToonLook; Main adds the ScreenLabels.)
|
||||
## The pixel size (rendering the 3D view small and scaling it up with sharp pixels) is a display
|
||||
## setting: GameSettings.pixel_size.
|
||||
|
||||
|
|
@ -32,13 +32,7 @@ var _pending: Array = [] # untyped: a node may be freed before the flush
|
|||
func _ready() -> void:
|
||||
outline = make_outline()
|
||||
add_child(outline)
|
||||
var layer := CanvasLayer.new()
|
||||
layer.name = "Labels"
|
||||
layer.layer = -1 # over the 3D view, under the HUD (1) and the menus (10)
|
||||
add_child(layer)
|
||||
labels = ScreenLabels.new()
|
||||
labels.name = "ScreenLabels"
|
||||
layer.add_child(labels)
|
||||
labels = ScreenLabels.ensure(self) # its own Labels layer, under the HUD (or the one already there)
|
||||
get_tree().node_added.connect(_on_node_added)
|
||||
apply_to(get_tree().root)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue