Resolve pending gameplay tickets
This commit is contained in:
parent
ec20778215
commit
c2ebbfaa2d
28 changed files with 618 additions and 188 deletions
|
|
@ -36,9 +36,9 @@ extends Control
|
|||
# lines never sees the second one at all, and the whole point of #127 was
|
||||
# that lines wait for the reader.
|
||||
#
|
||||
# #168 says the same rule out loud - still arriving, show it all; already
|
||||
# whole, move on - and extends it to the KEYBOARD, which had no way in at
|
||||
# all. See _is_advance_press.
|
||||
# A dialog is advanced deliberately with a tap or click. Keyboard presses are
|
||||
# ignored while it is open: movement keys are too easy to hold when a line
|
||||
# arrives, and must never turn into an accidental skip (#175).
|
||||
|
||||
signal dismissed
|
||||
|
||||
|
|
@ -139,7 +139,9 @@ func _ensure_label() -> void:
|
|||
label.add_theme_color_override("font_color", TEXT_COLOR)
|
||||
label.add_theme_color_override("font_outline_color", Color(0.01, 0.02, 0.06, 0.95))
|
||||
label.add_theme_constant_override("outline_size", 4)
|
||||
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
# #178: decoded text grows from a stable left edge. Centring a partially
|
||||
# revealed line made it appear in the middle and expand in both directions.
|
||||
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||
label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
||||
label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
add_child(label)
|
||||
|
|
@ -268,28 +270,18 @@ func _process(delta: float) -> void:
|
|||
queue_redraw()
|
||||
|
||||
|
||||
# #168: what counts as "go on". A tap, a left click, or a key.
|
||||
# What counts as "go on": a deliberate tap or left click.
|
||||
#
|
||||
# The rule the ticket asks for was already the rule for a click (#149) - a
|
||||
# press finishes a line still arriving, a press on a finished line moves to
|
||||
# the next - but the game is played on a desktop with WASD and a mouse, and
|
||||
# a keyboard press reached nothing at all. Sitting behind a dialog pressing
|
||||
# space is the most obvious thing a player can do, so the keyboard now goes
|
||||
# through the same one door every other press does (dismiss()).
|
||||
#
|
||||
# Modifiers alone are not a press: holding shift before typing must not eat
|
||||
# a line. Neither is an auto-repeat echo - a held key would otherwise run
|
||||
# the whole queue out in a second.
|
||||
# A press finishes a line still arriving; a press on a finished line moves to
|
||||
# the next (#149). #175 deliberately limits that gesture to pointer input: the
|
||||
# player may still be holding a
|
||||
# movement key when a transmission arrives, and that must leave the line
|
||||
# untouched rather than finishing or dismissing it.
|
||||
func _is_advance_press(event: InputEvent) -> bool:
|
||||
if event is InputEventScreenTouch:
|
||||
return event.pressed
|
||||
if event is InputEventMouseButton:
|
||||
return event.pressed and event.button_index == MOUSE_BUTTON_LEFT
|
||||
if event is InputEventKey:
|
||||
if not event.pressed or event.echo:
|
||||
return false
|
||||
return not (event.keycode in [KEY_SHIFT, KEY_CTRL, KEY_ALT, KEY_META,
|
||||
KEY_CAPSLOCK, KEY_NUMLOCK, KEY_SCROLLLOCK])
|
||||
return false
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue