You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kvirc/doc/scriptexamples/widget1.kvs

21 lines
289 B

# a stupid game :)
srand $unixTime
%w = $new(widget,0,mywidget)
%w->$setCaption(":)");
%w->$setGeometry($rand(770),$rand(570),30,30);
privateimpl(%w,mouseEnterEvent)
{
$$->$move($rand(770),$rand(570));
}
privateimpl(%w,mousePressEvent)
{
echo "You got me!"
delete $$
}
%w->$show()