You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Author: Blaizer
Time: 1279890852
Field: comment
Value: I would like this. Good idea.
Here's an idea, Win32::GUI does it like this:
my $main = Win32::GUI::Window->new(
-name => 'Main',
-width => 200,
-height => 200
);
sub Main_Terminate {
return -1;
}
sub Main_Minimize {
$main->Disable();
$main->Hide();
return 1;
}
It's neat, but probably not needed because SDL can't have multiple windows. Still, it would be good to have a quick look at how Win32::GUI does stuff, it's all pretty neat.
Create an dispatcher which polls the Events.
If it finds a sub e.g. called on_key_down() or on_quit() it will call this function with the params...
So you can easily write something like this:
on_key_down
{
$key = shift;
print "heureka, we've got an 'a'!\n" if 'a' == $key;
}
The text was updated successfully, but these errors were encountered: