feat: complete mobile UI implementation
This commit is contained in:
@@ -76,12 +76,15 @@ func _run() -> void:
|
||||
var cu = CubeUI.new()
|
||||
get_root().add_child(cu)
|
||||
cu.setup(fc, host, null)
|
||||
cu.set_mobile_mode(true)
|
||||
_ck(not cu.is_open(), "cube: hidden initially")
|
||||
fc.cube = {"open": true, "npc_vnum": 20383, "recipes": [], "results": [
|
||||
{"vnum": 72723, "count": 1}, {"vnum": 50001, "count": 5}]}
|
||||
fc.cube_opened.emit(20383)
|
||||
await process_frame
|
||||
_ck(cu.is_open(), "cube: opens on cube_opened")
|
||||
_ck(cu._root.size == Vector2(720, 380) and cu._material_scroll != null,
|
||||
"cube mobile mode uses landscape two-column layout")
|
||||
_ck(_has_call(fc, "cube_rlist", func(c): return c[1] == 20383), "cube: open → request result list")
|
||||
var recipe_btns: Array = cu._list.get_children().filter(func(n): return n is Button)
|
||||
_ck(recipe_btns.size() == 2, "cube: 2 result rows")
|
||||
|
||||
Reference in New Issue
Block a user