fix(profile): polish touch scroll, avatars and wallpaper picker
Local-only v0.8.1 build. Achievement rows pass touch drags, avatars use head crops and hide locked identities, difficulty cycles Zen/Easy/Normal, wallpaper setting opens a preview picker, Brie uses the approved render with a text-free sheet, and the app icon is regenerated in gouache style.
This commit is contained in:
1 parent
6d302f5cb9
commit
a54279ffd1
14 files changed
+221
-31
No files matched your search
+19
-1
@@ -6,6 +6,7 @@ extends SceneTree
|
||||
|
||||
var failures := 0
|
||||
var frames
|
||||
var avatars
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
@@ -39,6 +40,8 @@ func _run() -> void:
|
||||
# autoloads are registered when this script is launched with --script.
|
||||
frames = load("res://scripts/Frames.gd")
|
||||
_check(frames != null, "Frames script missing")
|
||||
avatars = load("res://scripts/Avatars.gd")
|
||||
_check(avatars != null, "Avatars script missing")
|
||||
|
||||
_test_screen_cycle(main)
|
||||
await _test_settings(main, save)
|
||||
@@ -114,9 +117,16 @@ func _test_settings(main, save) -> void:
|
||||
_check(main.settings_sheet.music_volume_slider != null, "music volume slider missing")
|
||||
_check(main.settings_sheet.difficulty_button.text.find("Difficulty") >= 0, "difficulty control missing")
|
||||
main.settings_sheet._cycle_difficulty()
|
||||
_check(str(save.get_setting("difficulty")) == "easy", "difficulty should cycle")
|
||||
_check(str(save.get_setting("difficulty")) == "zen", "difficulty should cycle to zen first")
|
||||
save.set_setting("difficulty", "normal")
|
||||
_check(main.background_rect.texture != null, "wallpaper texture should load")
|
||||
main.settings_sheet._open_wallpaper_picker()
|
||||
_check(main.settings_sheet.wallpaper_layer.visible, "wallpaper picker should open")
|
||||
_check(main.settings_sheet.wallpaper_grid.get_child_count() == 5, "wallpaper picker should show all themes")
|
||||
_check(main.settings_sheet.wallpaper_grid.get_child(0).mouse_filter == Control.MOUSE_FILTER_PASS, "wallpaper cards should pass swipes")
|
||||
main.settings_sheet._set_pending_theme("cream")
|
||||
main.settings_sheet._apply_wallpaper()
|
||||
_check(not main.settings_sheet.wallpaper_layer.visible, "wallpaper picker should close after apply")
|
||||
|
||||
# Changes made through SaveGame must be reflected after an explicit refresh.
|
||||
save.set_setting("patterns", false)
|
||||
@@ -254,6 +264,7 @@ func _test_profile(main, save) -> void:
|
||||
|
||||
_check(profile.player_id_label.text.begins_with("RAT-"), "profile should show player ID")
|
||||
_check(profile.achievements_box.get_child_count() == 8, "profile should list achievements")
|
||||
_check(profile.achievements_box.get_child(0).mouse_filter == Control.MOUSE_FILTER_PASS, "achievement rows should pass swipes")
|
||||
profile._show_rename()
|
||||
profile.name_input.text = "Ahri"
|
||||
profile._save_name()
|
||||
@@ -330,6 +341,13 @@ func _test_profile(main, save) -> void:
|
||||
profile._set_tab("avatar")
|
||||
await process_frame
|
||||
_check(profile.frame_grid.get_child_count() > 10, "avatar tab should list portraits")
|
||||
var locked_index := -1
|
||||
for i in avatars.all().size():
|
||||
if str(avatars.all()[i].get("id", "")) == "pepper":
|
||||
locked_index = i
|
||||
if locked_index >= 0 and locked_index < profile.frame_grid.get_child_count():
|
||||
var labels = profile.frame_grid.get_child(locked_index).find_children("*", "Label", true, false)
|
||||
_check(labels.size() > 0 and str(labels[0].text) == "???", "locked avatar should hide its name")
|
||||
for i in range(profile.frame_grid.get_child_count()):
|
||||
_check(
|
||||
profile.frame_grid.get_child(i).mouse_filter == Control.MOUSE_FILTER_PASS,
|
||||
|
||||
Reference in new issue
Block a user