Resolve pending gameplay tickets
This commit is contained in:
parent
ec20778215
commit
c2ebbfaa2d
28 changed files with 618 additions and 188 deletions
|
|
@ -15,6 +15,8 @@ extends SceneTree
|
|||
# 5. #169 - a second press while a load is running is ignored, or an
|
||||
# impatient double tap builds the world twice (on the web a button fires
|
||||
# on PRESS, so that tap costs nothing to make)
|
||||
# 6. #174 - the opaque loading cover fills the viewport and puts its
|
||||
# activity bar at the middle of the screen
|
||||
|
||||
var menu: Node
|
||||
var game_state: Node
|
||||
|
|
@ -61,7 +63,19 @@ func _process(delta: float) -> bool:
|
|||
return _fail("the press started a load with no loading screen up")
|
||||
if current_scene != menu:
|
||||
return _fail("the scene swapped inside the press, so nothing was ever shown")
|
||||
var viewport_size: Vector2 = menu.get_viewport().get_visible_rect().size
|
||||
if menu.loading_screen.size.distance_to(viewport_size) > 1.0:
|
||||
return _fail("loading cover is %s, viewport is %s" \
|
||||
% [menu.loading_screen.size, viewport_size])
|
||||
if menu.loading_screen.BACKDROP.a < 0.999:
|
||||
return _fail("loading cover is translucent (alpha %.2f)" \
|
||||
% menu.loading_screen.BACKDROP.a)
|
||||
var bar: Rect2 = menu.loading_screen._bar_rect()
|
||||
if absf(bar.get_center().y - viewport_size.y * 0.5) > 1.0:
|
||||
return _fail("loading bar centre %.1f is not screen centre %.1f" \
|
||||
% [bar.get_center().y, viewport_size.y * 0.5])
|
||||
print("pressing an entry raises the loading screen and leaves the menu up")
|
||||
print("loading cover fills %s and centres its bar" % viewport_size)
|
||||
|
||||
# --- 5. and a second press changes nothing --------------------
|
||||
var screen: Node = menu.loading_screen
|
||||
|
|
|
|||
Loading…
Reference in a new issue