[ANN] TetrisPlugin 0.1 is available
http://www.intellij.org/twiki/bin/view/Main/TetrisPlugin
Initial release -- Comments welcome.
Please sign in to leave a comment.
http://www.intellij.org/twiki/bin/view/Main/TetrisPlugin
Initial release -- Comments welcome.
Please sign in to leave a comment.
Cute...
I think it should be paused when the panel is hidden.
Amnon
"Scott Sirovy" <ssirovy@deephavenfunds.com> wrote in message
news:6552073.1036530459691.JavaMail.jrun@is.intellij.net...
>
Very nice! :)
Is it possible to change to speed?
Also it would be be nice to pause the game.
With best wishes,
Vladimir Kondratyev
_____________________
JetBrains
Scott Sirovy wrote:
It's great, but it would be also very good to be able to change the
direction of the figure rotation.
Sergey.
Yes, I tried to do that. However, I couldn't find anything in the OpenAPI that would let me listen for toolWindow-is-now-hidden/unfocused/inactive events.
I also tried to check the toolWindow.isActive() and .isVisible() methods in the game thread but they didn't return true when the window was hidden. Is that a bug? (This is my first plugin so perhaps I am doing something wrong.)
I'd appreciate any insight you (or anyone) can offer!
-sms
Thanks! It was fun writing it.
Not currently, but that is an interesting option. I assume you mean that you'd like to be able to start a new game at a certain level? Another option I've seen in other implementations is to start with a user-defined number of lines clogging up the alley. Both are things I've added to the TODO list.
You can hit the 'P' key to pause the game (and un-pause later). However, I am unable to programatically pause the game when the toolwindow is hidden, as I mentioned in my post to Amnon. Perhaps you have some insight?
-sms
Good point. I'll add it to the TODO list.
-sms
hi,
"Scott Sirovy" <ssirovy@deephavenfunds.com> schrieb im Newsbeitrag
>
toolWindow-is-now-hidden/unfocused/inactive events.
>
You can add an AncestorListener to your toolWindowContentPanel:
toolWindowContentPanel.addAncestorListener(new AncestorListener()
{
public void ancestorAdded(AncestorEvent event){}
public void ancestorRemoved(AncestorEvent event)
{
//tetris.pause();
}
public void ancestorMoved(AncestorEvent event){}
});
HTH
Martin
Excellent! That did the trick. I'll post an updated version shortly.
Thanks for the tip,
-sms
I assume we need a way for some tool windows not to show the side buttons so
you will be able to press Escape and hide the window when the boss is
coming.
Eugene
"Scott Sirovy" <ssirovy@deephavenfunds.com> wrote in message
news:6552073.1036530459691.JavaMail.jrun@is.intellij.net...
>
Scott,
in next release we will open API to listen events from
ToolWindowManager. So it'll be possible to track visibility of tool
window. As ugly and temporary workaround I can suggest you to track
visibility by:
-tracking of addNotify/removeNotify
-tracking visibility of all parent components
Best regards,
Vladimir Kondratyev
-
JetBrains
Version 0.2 is great!
Pacman, anyone? :)
"Scott Sirovy" <ssirovy@deephavenfunds.com> wrote in message
news:6552073.1036530459691.JavaMail.jrun@is.intellij.net...
>