From a6d58bb6052ac8cb01805a48c4ad2f129126116f Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 24 Feb 2010 02:13:59 +0000 Subject: Added KDE3 version of kvirc git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1095341 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- doc/scriptexamples/widget2.kvs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/scriptexamples/widget2.kvs (limited to 'doc/scriptexamples/widget2.kvs') diff --git a/doc/scriptexamples/widget2.kvs b/doc/scriptexamples/widget2.kvs new file mode 100644 index 00000000..8c9b5b7a --- /dev/null +++ b/doc/scriptexamples/widget2.kvs @@ -0,0 +1,23 @@ +# a stupid game :) (version 2) + +class(mystupidgame,widget) +{ + constructor + { + srand $unixTime; + $$->$setCaption(":)"); + $$->$setGeometry($rand(770),$rand(570),30,30); + } + mouseEnterEvent + { + $$->$move($rand(770),$rand(570)); + } + mousePressEvent + { + echo "You got me!" + delete $$ + } +} + +%w = $new(mystupidgame,0) +%w->$show() -- cgit v1.2.1