gdharness 1.2.10 → 1.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/build/cli.js +23295 -23231
- package/build/godot/addons/gdharness_runtime/runtime_input.gd +12 -0
- package/build/index.js +23875 -23566
- package/build/keeper.js +46 -6731
- package/package.json +1 -1
|
@@ -517,6 +517,13 @@ func click(params: Dictionary) -> Dictionary:
|
|
|
517
517
|
var on_rich_text: bool = rich != null
|
|
518
518
|
if on_rich_text:
|
|
519
519
|
var _listening: int = rich.meta_clicked.connect(heard)
|
|
520
|
+
# A toggle's state either side of the press, since landing says nothing of it: a game clock's
|
|
521
|
+
# switch clicked three times answered clicked each time, and a wait for the clock to move then
|
|
522
|
+
# ran out on a clock left stopped. A click the game undid reads the same before and after.
|
|
523
|
+
var toggle: BaseButton = control as BaseButton
|
|
524
|
+
var was_pressed: Variant = null
|
|
525
|
+
if toggle != null and toggle.toggle_mode:
|
|
526
|
+
was_pressed = toggle.button_pressed
|
|
520
527
|
_press_button(viewport, _button(position, button, true, double))
|
|
521
528
|
await _host.get_tree().process_frame
|
|
522
529
|
_press_button(viewport, _button(position, button, false, false))
|
|
@@ -544,6 +551,11 @@ func click(params: Dictionary) -> Dictionary:
|
|
|
544
551
|
}
|
|
545
552
|
if found != null:
|
|
546
553
|
answer["found"] = found
|
|
554
|
+
if was_pressed != null:
|
|
555
|
+
var now_pressed: Variant = null
|
|
556
|
+
if is_instance_valid(toggle):
|
|
557
|
+
now_pressed = toggle.button_pressed
|
|
558
|
+
answer["pressed"] = {"before": was_pressed, "after": now_pressed}
|
|
547
559
|
# Whether a link was pressed apart from what it carries: a bare [url] reports an empty meta,
|
|
548
560
|
# and given as the meta alone that press read exactly like one that reached no link.
|
|
549
561
|
if on_rich_text:
|