This commit is contained in:
team3
2026-09-18 22:02:53 +02:00
commit 45a6ecf654
27 changed files with 2697 additions and 0 deletions

14
dev/click.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
# Simuliert einen Klick in der nested Shell: dev/click.sh x y
# Ermittelt den Actor an der Position wie bei einem echten Klick (Picking) und löst den
# nächstliegenden St.Button aus. Gibt den getroffenen Actor aus.
DIR=$(cd "$(dirname "$0")" && pwd)
"$DIR/eval.sh" "const Clutter = imports.gi.Clutter, St = imports.gi.St;
let actor = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, $1, $2);
const hit = actor ? actor.constructor.name + ' [' + (actor.style_class ?? '') + ']' : 'nichts';
while (actor && !(actor instanceof St.Button))
actor = actor.get_parent();
if (actor)
actor.emit('clicked', 1);
hit + (actor ? ' -> clicked ' + actor.constructor.name + ' [' + actor.style_class + ']' : ' -> kein Button');
"