avoiding menu id = 0 , adding rotating through direction each time an effect is called

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2007-11-26 07:39:53 +00:00
parent 14e8069831
commit fb81ee2103

View File

@@ -47,7 +47,7 @@
// menu ids // menu ids
enum enum
{ {
Show_Shaped, Show_Shaped = 100,
Show_Transparent, Show_Transparent,
// must be consecutive and in the same order as wxShowEffect enum elements // must be consecutive and in the same order as wxShowEffect enum elements
@@ -273,7 +273,11 @@ void MainFrame::OnShowTransparent(wxCommandEvent& WXUNUSED(event))
void MainFrame::OnShowEffect(wxCommandEvent& event) void MainFrame::OnShowEffect(wxCommandEvent& event)
{ {
int effect = wxSHOW_EFFECT_ROLL + event.GetId() - Show_Effect_Roll; int effect = wxSHOW_EFFECT_ROLL + event.GetId() - Show_Effect_Roll;
new EffectFrame(this, wx_static_cast(wxShowEffect, effect)); static wxDirection direction = wxLEFT;
direction = (wxDirection)(((int)direction)<< 1);
if ( direction > wxDOWN )
direction = wxLEFT ;
new EffectFrame(this, wx_static_cast(wxShowEffect, effect),1000,direction);
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------