void idMenuWidget_ScrollBar::Initialize( idMenuHandler* data ) { idMenuWidget::Initialize( data ); AddEventAction( WIDGET_EVENT_DRAG_START ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_DRAG_START, WIDGET_EVENT_DRAG_START ) ); AddEventAction( WIDGET_EVENT_DRAG_STOP ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_DRAG_STOP, WIDGET_EVENT_DRAG_STOP ) ); }
/* ======================== idMenuWidget_DevList::Initialize ======================== */ void idMenuWidget_DevList::Initialize() { AddEventAction( WIDGET_EVENT_SCROLL_DOWN ).Set( WIDGET_ACTION_START_REPEATER, WIDGET_ACTION_SCROLL_VERTICAL, 1 ); AddEventAction( WIDGET_EVENT_SCROLL_UP ).Set( WIDGET_ACTION_START_REPEATER, WIDGET_ACTION_SCROLL_VERTICAL, -1 ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_RELEASE ).Set( WIDGET_ACTION_STOP_REPEATER ); AddEventAction( WIDGET_EVENT_SCROLL_UP_RELEASE ).Set( WIDGET_ACTION_STOP_REPEATER ); int optionIndex = 0; while ( GetChildren().Num() < GetNumVisibleOptions() ) { idMenuWidget_Button * const buttonWidget = new ( TAG_MENU ) idMenuWidget_Button(); buttonWidget->AddEventAction( WIDGET_EVENT_PRESS ).Set( new ( TAG_SWF ) DevList_NavigateForward( this, optionIndex++ ) ); AddChild( buttonWidget ); } }
/* ======================== idMenuScreen_Scoreboard::Initialize ======================== */ void idMenuScreen_Scoreboard::Initialize( idMenuHandler* data ) { idMenuScreen::Initialize( data ); if( data != NULL ) { menuGUI = data->GetGUI(); } SetSpritePath( "sbDefault" ); playerList = new( TAG_SWF ) idMenuWidget_ScoreboardList(); playerList->SetSpritePath( GetSpritePath(), "info", "playerList" ); playerList->SetNumVisibleOptions( MAX_SCOREBOARD_SLOTS ); playerList->SetWrappingAllowed( true ); while( playerList->GetChildren().Num() < MAX_SCOREBOARD_SLOTS ) { idMenuWidget_ScoreboardButton* const buttonWidget = new( TAG_SWF ) idMenuWidget_ScoreboardButton(); buttonWidget->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_PRESS_FOCUSED, playerList->GetChildren().Num() ); buttonWidget->AddEventAction( WIDGET_EVENT_COMMAND ).Set( WIDGET_ACTION_MUTE_PLAYER, playerList->GetChildren().Num() ); buttonWidget->Initialize( data ); playerList->AddChild( buttonWidget ); } playerList->Initialize( data ); AddChild( playerList ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_LSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER_VARIABLE, WIDGET_EVENT_SCROLL_DOWN_LSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_LSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER_VARIABLE, WIDGET_EVENT_SCROLL_UP_LSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_LSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_LSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_LSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_LSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER_VARIABLE, WIDGET_EVENT_SCROLL_DOWN ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER_VARIABLE, WIDGET_EVENT_SCROLL_UP ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_RELEASE ) ); }
/* ======================== idMenuScreen_PDA_VideoDisks::Initialize ======================== */ void idMenuScreen_PDA_VideoDisks::Initialize( idMenuHandler* data ) { if( data != NULL ) { menuGUI = data->GetGUI(); } SetSpritePath( "menuVideo" ); videoDetails.SetSpritePath( GetSpritePath(), "info", "details" ); videoDetails.Initialize( data ); videoDetails.SetNoAutoFree( true ); scrollbar.SetSpritePath( GetSpritePath(), "info", "videoList", "scrollbar" ); scrollbar.Initialize( data ); scrollbar.SetNoAutoFree( true ); pdaVideoList.SetSpritePath( GetSpritePath(), "info", "videoList", "options" ); pdaVideoList.SetNumVisibleOptions( MAX_VIDEO_ITEMS ); pdaVideoList.SetWrappingAllowed( true ); pdaVideoList.SetNoAutoFree( true ); while( pdaVideoList.GetChildren().Num() < MAX_VIDEO_ITEMS ) { idMenuWidget_Button* const buttonWidget = new( TAG_SWF ) idMenuWidget_Button(); buttonWidget->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_SELECT_PDA_VIDEO, pdaVideoList.GetChildren().Num() ); buttonWidget->RegisterEventObserver( &videoDetails ); buttonWidget->RegisterEventObserver( &scrollbar ); buttonWidget->Initialize( data ); pdaVideoList.AddChild( buttonWidget ); } pdaVideoList.Initialize( data ); pdaVideoList.AddChild( &scrollbar ); AddChild( &pdaVideoList ); AddChild( &videoDetails ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_LSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( &pdaVideoList, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER, WIDGET_EVENT_SCROLL_DOWN_LSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_LSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( &pdaVideoList, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER, WIDGET_EVENT_SCROLL_UP_LSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_LSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( &pdaVideoList, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_LSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_LSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( &pdaVideoList, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_LSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN ).Set( new( TAG_SWF ) idWidgetActionHandler( &pdaVideoList, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER, WIDGET_EVENT_SCROLL_DOWN ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP ).Set( new( TAG_SWF ) idWidgetActionHandler( &pdaVideoList, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER, WIDGET_EVENT_SCROLL_UP ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( &pdaVideoList, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( &pdaVideoList, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_RELEASE ) ); AddEventAction( WIDGET_EVENT_TAB_NEXT ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_TAB_NEXT, WIDGET_EVENT_TAB_NEXT ) ); AddEventAction( WIDGET_EVENT_TAB_PREV ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_TAB_PREV, WIDGET_EVENT_TAB_PREV ) ); idMenuScreen::Initialize( data ); }
/* ======================== idMenuScreen_Shell_Bindings::Initialize ======================== */ void idMenuScreen_Shell_Bindings::Initialize( idMenuHandler* data ) { idMenuScreen::Initialize( data ); if( data != NULL ) { menuGUI = data->GetGUI(); } SetSpritePath( "menuBindings" ); restoreDefault = new idMenuWidget_Button(); restoreDefault->Initialize( data ); restoreDefault->SetLabel( "" ); restoreDefault->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_JOY3_ON_PRESS ); restoreDefault->SetSpritePath( GetSpritePath(), "info", "btnRestore" ); AddChild( restoreDefault ); btnBack = new( TAG_SWF ) idMenuWidget_Button(); btnBack->Initialize( data ); idStr controls( idLocalization::GetString( "#str_04158" ) ); controls.ToUpper(); btnBack->SetLabel( controls ); btnBack->SetSpritePath( GetSpritePath(), "info", "btnBack" ); btnBack->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_GO_BACK ); AddChild( btnBack ); options = new idMenuWidget_DynamicList(); options->SetIgnoreColor( true ); options->SetNumVisibleOptions( NUM_BIND_LISTINGS ); options->SetSpritePath( GetSpritePath(), "info", "options" ); options->SetWrappingAllowed( true ); UpdateBindingDisplay(); while( options->GetChildren().Num() < NUM_BIND_LISTINGS ) { idMenuWidget_Button* const buttonWidget = new( TAG_SWF ) idMenuWidget_Button(); buttonWidget->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_PRESS_FOCUSED, options->GetChildren().Num() ); buttonWidget->Initialize( data ); options->AddChild( buttonWidget ); } options->Initialize( data ); AddChild( options ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_LSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER_VARIABLE, WIDGET_EVENT_SCROLL_DOWN_LSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_LSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER_VARIABLE, WIDGET_EVENT_SCROLL_UP_LSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_LSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_LSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_LSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_LSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER_VARIABLE, WIDGET_EVENT_SCROLL_DOWN ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER_VARIABLE, WIDGET_EVENT_SCROLL_UP ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_RELEASE ) ); }
/* ======================== idMenuScreen_Shell_Root::Initialize ======================== */ void idMenuScreen_Shell_Root::Initialize( idMenuHandler* data ) { idMenuScreen::Initialize( data ); if( data != NULL ) { menuGUI = data->GetGUI(); } SetSpritePath( "menuMain" ); options = new( TAG_SWF ) idMenuWidget_DynamicList(); options->SetNumVisibleOptions( NUM_MAIN_OPTIONS ); options->SetSpritePath( GetSpritePath(), "info", "options" ); options->Initialize( data ); options->SetWrappingAllowed( true ); AddChild( options ); helpWidget = new( TAG_SWF ) idMenuWidget_Help(); helpWidget->SetSpritePath( GetSpritePath(), "info", "helpTooltip" ); AddChild( helpWidget ); while( options->GetChildren().Num() < NUM_MAIN_OPTIONS ) { idMenuWidget_Button* const buttonWidget = new( TAG_SWF ) idMenuWidget_Button(); buttonWidget->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_PRESS_FOCUSED, options->GetChildren().Num() ); buttonWidget->Initialize( data ); buttonWidget->RegisterEventObserver( helpWidget ); options->AddChild( buttonWidget ); } options->AddEventAction( WIDGET_EVENT_SCROLL_DOWN ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER, WIDGET_EVENT_SCROLL_DOWN ) ); options->AddEventAction( WIDGET_EVENT_SCROLL_UP ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER, WIDGET_EVENT_SCROLL_UP ) ); options->AddEventAction( WIDGET_EVENT_SCROLL_DOWN_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_RELEASE ) ); options->AddEventAction( WIDGET_EVENT_SCROLL_UP_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_RELEASE ) ); options->AddEventAction( WIDGET_EVENT_SCROLL_DOWN_LSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER, WIDGET_EVENT_SCROLL_DOWN_LSTICK ) ); options->AddEventAction( WIDGET_EVENT_SCROLL_UP_LSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER, WIDGET_EVENT_SCROLL_UP_LSTICK ) ); options->AddEventAction( WIDGET_EVENT_SCROLL_DOWN_LSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_LSTICK_RELEASE ) ); options->AddEventAction( WIDGET_EVENT_SCROLL_UP_LSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_LSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_RIGHT ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_RIGHT_START_REPEATER, WIDGET_EVENT_SCROLL_RIGHT ) ); AddEventAction( WIDGET_EVENT_SCROLL_RIGHT_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_RIGHT_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_LEFT ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_LEFT_START_REPEATER, WIDGET_EVENT_SCROLL_LEFT ) ); AddEventAction( WIDGET_EVENT_SCROLL_LEFT_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_LEFT_RELEASE ) ); AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_PRESS_FOCUSED, 0 ); }
/* ======================== idMenuScreen_PDA_Inventory::Initialize ======================== */ void idMenuScreen_PDA_Inventory::Initialize( idMenuHandler * data ) { AddEventAction( WIDGET_EVENT_TAB_NEXT ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_TAB_NEXT, WIDGET_EVENT_TAB_NEXT ) ); AddEventAction( WIDGET_EVENT_TAB_PREV ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_TAB_PREV, WIDGET_EVENT_TAB_PREV ) ); if ( data != NULL ) { menuGUI = data->GetGUI(); } SetSpritePath( "menuItems" ); if ( menuGUI != NULL ) { idSWFScriptObject & root = menuGUI->GetRootObject(); BindSprite( root ); } infoBox.SetSpritePath( GetSpritePath(), "info", "details" ); infoBox.Initialize( data ); infoBox.SetNoAutoFree( true ); itemList.SetSpritePath( GetSpritePath(), "info", "options" ); itemList.SetNumVisibleOptions( NUM_INVENTORY_ITEMS_VISIBLE ); itemList.SetNoAutoFree( true ); while ( itemList.GetChildren().Num() < NUM_INVENTORY_ITEMS_VISIBLE ) { idMenuWidget_Button * const buttonWidget = new (TAG_SWF) idMenuWidget_Button(); buttonWidget->Initialize( data ); buttonWidget->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_SELECT_PDA_ITEM, itemList.GetChildren().Num() ); itemList.AddChild( buttonWidget ); } itemList.Initialize( data ); AddChild( &itemList ); AddChild( &infoBox ); //AddChild( assignment ); AddEventAction( WIDGET_EVENT_SCROLL_LEFT ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_LEFT_START_REPEATER, WIDGET_EVENT_SCROLL_LEFT ) ); AddEventAction( WIDGET_EVENT_SCROLL_RIGHT ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_RIGHT_START_REPEATER, WIDGET_EVENT_SCROLL_RIGHT ) ); AddEventAction( WIDGET_EVENT_SCROLL_LEFT_RELEASE ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_LEFT_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_RIGHT_RELEASE ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_RIGHT_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_LEFT_LSTICK ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_LEFT_START_REPEATER, WIDGET_EVENT_SCROLL_LEFT_LSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_RIGHT_LSTICK ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_RIGHT_START_REPEATER, WIDGET_EVENT_SCROLL_RIGHT_LSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_LEFT_LSTICK_RELEASE ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_LEFT_LSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_RIGHT_LSTICK_RELEASE ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_RIGHT_LSTICK_RELEASE ) ); idMenuScreen::Initialize( data ); }
/* ======================== idMenuScreen_Shell_PartyLobby::Initialize ======================== */ void idMenuScreen_Shell_PartyLobby::Initialize( idMenuHandler* data ) { idMenuScreen::Initialize( data ); if( data != NULL ) { menuGUI = data->GetGUI(); } SetSpritePath( "menuPartyLobby" ); options = new( TAG_SWF ) idMenuWidget_DynamicList(); options->SetNumVisibleOptions( NUM_LOBBY_OPTIONS ); options->SetSpritePath( GetSpritePath(), "info", "options" ); options->SetWrappingAllowed( true ); AddChild( options ); idMenuWidget_Help* const helpWidget = new( TAG_SWF ) idMenuWidget_Help(); helpWidget->SetSpritePath( GetSpritePath(), "info", "helpTooltip" ); AddChild( helpWidget ); while( options->GetChildren().Num() < NUM_LOBBY_OPTIONS ) { idMenuWidget_Button* const buttonWidget = new( TAG_SWF ) idMenuWidget_Button(); buttonWidget->Initialize( data ); buttonWidget->RegisterEventObserver( helpWidget ); options->AddChild( buttonWidget ); } options->Initialize( data ); btnBack = new( TAG_SWF ) idMenuWidget_Button(); btnBack->Initialize( data ); btnBack->SetLabel( "#str_02305" ); btnBack->SetSpritePath( GetSpritePath(), "info", "btnBack" ); btnBack->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_GO_BACK ); AddChild( btnBack ); lobby = new( TAG_SWF ) idMenuWidget_LobbyList(); lobby->SetNumVisibleOptions( 8 ); lobby->SetSpritePath( GetSpritePath(), "options" ); lobby->SetWrappingAllowed( true ); lobby->Initialize( data ); while( lobby->GetChildren().Num() < 8 ) { idMenuWidget_LobbyButton* const buttonWidget = new idMenuWidget_LobbyButton(); buttonWidget->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_SELECT_GAMERTAG, lobby->GetChildren().Num() ); buttonWidget->AddEventAction( WIDGET_EVENT_COMMAND ).Set( WIDGET_ACTION_MUTE_PLAYER, lobby->GetChildren().Num() ); buttonWidget->Initialize( data ); lobby->AddChild( buttonWidget ); } AddChild( lobby ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER, WIDGET_EVENT_SCROLL_DOWN ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER, WIDGET_EVENT_SCROLL_UP ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_LSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER, WIDGET_EVENT_SCROLL_DOWN_LSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_LSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER, WIDGET_EVENT_SCROLL_UP_LSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_LSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_LSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_LSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_LSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_RSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( lobby, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER, WIDGET_EVENT_SCROLL_DOWN_RSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_RSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( lobby, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER, WIDGET_EVENT_SCROLL_UP_RSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_RSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( lobby, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_RSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_RSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( lobby, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_RSTICK_RELEASE ) ); }
void CBaseEntityOutput::ParseEventAction( const char *EventData ) { AddEventAction( new CEventAction( EventData ) ); }
/* ======================== idMenuScreen_Shell_Leaderboards::Initialize ======================== */ void idMenuScreen_Shell_Leaderboards::Initialize( idMenuHandler * data ) { idMenuScreen::Initialize( data ); if ( data != NULL ) { menuGUI = data->GetGUI(); } lbCache = new idLBCache(); lbCache->Reset(); SetSpritePath( "menuLeaderboards" ); options = new (TAG_SWF) idMenuWidget_DynamicList(); options->SetNumVisibleOptions( NUM_LEADERBOARD_ITEMS ); options->SetSpritePath( GetSpritePath(), "info", "options" ); options->SetWrappingAllowed( true ); while ( options->GetChildren().Num() < NUM_LEADERBOARD_ITEMS ) { idMenuWidget_Button * const buttonWidget = new (TAG_SWF) idMenuWidget_Button(); buttonWidget->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_PRESS_FOCUSED, options->GetChildren().Num() ); buttonWidget->Initialize( data ); options->AddChild( buttonWidget ); } options->Initialize( data ); AddChild( options ); btnBack = new (TAG_SWF) idMenuWidget_Button(); btnBack->Initialize( data ); btnBack->SetLabel( "#str_swf_party_lobby" ); btnBack->SetSpritePath( GetSpritePath(), "info", "btnBack" ); btnBack->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_GO_BACK ); AddChild( btnBack ); btnNext = new (TAG_SWF) idMenuWidget_Button(); btnNext->Initialize( data ); btnNext->SetLabel( "#str_swf_next" ); btnNext->SetSpritePath( GetSpritePath(), "info", "btnNext" ); btnNext->AddEventAction( WIDGET_EVENT_PRESS ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_TAB_NEXT, WIDGET_EVENT_TAB_NEXT ) ); AddChild( btnNext ); btnPrev = new (TAG_SWF) idMenuWidget_Button(); btnPrev->Initialize( data ); btnPrev->SetLabel( "#str_swf_prev" ); btnPrev->SetSpritePath( GetSpritePath(), "info", "btnPrevious" ); btnPrev->AddEventAction( WIDGET_EVENT_PRESS ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_TAB_PREV, WIDGET_EVENT_TAB_PREV ) ); AddChild( btnPrev ); btnPageDwn = new (TAG_SWF) idMenuWidget_Button(); btnPageDwn->Initialize( data ); btnPageDwn->SetLabel( "#str_swf_next_page" ); btnPageDwn->SetSpritePath( GetSpritePath(), "info", "btnPageDwn" ); idSWFParmList parms; parms.Append( MAX_STAT_LISTINGS - 1 ); btnPageDwn->AddEventAction( WIDGET_EVENT_PRESS ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_PAGE_DOWN_START_REPEATER, WIDGET_EVENT_SCROLL_PAGEDWN ) ); btnPageDwn->AddEventAction( WIDGET_EVENT_RELEASE ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_PAGEDWN_RELEASE ) ); AddChild( btnPageDwn ); btnPageUp = new (TAG_SWF) idMenuWidget_Button(); btnPageUp->Initialize( data ); btnPageUp->SetLabel( "#str_swf_prev_page" ); btnPageUp->SetSpritePath( GetSpritePath(), "info", "btnPageUp" ); parms.Clear(); parms.Append( MAX_STAT_LISTINGS - 1 ); btnPageUp->AddEventAction( WIDGET_EVENT_PRESS ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_PAGE_UP_START_REPEATER, WIDGET_EVENT_SCROLL_PAGEUP ) ); btnPageUp->AddEventAction( WIDGET_EVENT_RELEASE ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_PAGEUP_RELEASE ) ); AddChild( btnPageUp ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_LSTICK ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER_VARIABLE, WIDGET_EVENT_SCROLL_DOWN_LSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_LSTICK ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER_VARIABLE, WIDGET_EVENT_SCROLL_UP_LSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_LSTICK_RELEASE ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_LSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_LSTICK_RELEASE ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_LSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER_VARIABLE, WIDGET_EVENT_SCROLL_DOWN ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER_VARIABLE, WIDGET_EVENT_SCROLL_UP ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_RELEASE ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_RELEASE ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_PAGEDWN ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_PAGE_DOWN_START_REPEATER, WIDGET_EVENT_SCROLL_PAGEDWN ) ); AddEventAction( WIDGET_EVENT_SCROLL_PAGEUP ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_PAGE_UP_START_REPEATER, WIDGET_EVENT_SCROLL_PAGEUP ) ); AddEventAction( WIDGET_EVENT_SCROLL_PAGEDWN_RELEASE ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_PAGEDWN_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_PAGEUP_RELEASE ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_PAGEUP_RELEASE ) ); AddEventAction( WIDGET_EVENT_TAB_NEXT ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_TAB_NEXT, WIDGET_EVENT_TAB_NEXT ) ); AddEventAction( WIDGET_EVENT_TAB_PREV ).Set( new (TAG_SWF) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_TAB_PREV, WIDGET_EVENT_TAB_PREV ) ); leaderboards.Clear(); const idList< mpMap_t > maps = common->GetMapList(); const char ** gameModes = NULL; const char ** gameModesDisplay = NULL; int numModes = game->GetMPGameModes( &gameModes, &gameModesDisplay ); for ( int mapIndex = 0; mapIndex < maps.Num(); ++mapIndex ) { for ( int modeIndex = 0; modeIndex < numModes; ++modeIndex ) { // Check the supported modes on the map. if( maps[ mapIndex ].supportedModes & BIT( modeIndex ) ) { int boardID = LeaderboardLocal_GetID( mapIndex, modeIndex ); const leaderboardDefinition_t * lbDef = Sys_FindLeaderboardDef( boardID ); if ( lbDef != NULL ) { doomLeaderboard_t lb = doomLeaderboard_t( lbDef, lbDef->boardName ); leaderboards.Append( lb ); } } } } }
/* ======================== idMenuScreen_Shell_PressStart::Initialize ======================== */ void idMenuScreen_Shell_PressStart::Initialize( idMenuHandler* data ) { idMenuScreen::Initialize( data ); if( data != NULL ) { menuGUI = data->GetGUI(); } SetSpritePath( "menuStart" ); itemList = new( TAG_SWF ) idMenuWidget_Carousel(); itemList->SetSpritePath( GetSpritePath(), "info", "options" ); itemList->SetNumVisibleOptions( NUM_GAME_SELECTIONS_VISIBLE ); while( itemList->GetChildren().Num() < NUM_GAME_SELECTIONS_VISIBLE ) { idMenuWidget_Button* const buttonWidget = new( TAG_SWF ) idMenuWidget_Button(); buttonWidget->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_PRESS_FOCUSED, itemList->GetChildren().Num() ); buttonWidget->Initialize( data ); itemList->AddChild( buttonWidget ); } itemList->Initialize( data ); AddChild( itemList ); AddEventAction( WIDGET_EVENT_SCROLL_LEFT ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_LEFT_START_REPEATER, WIDGET_EVENT_SCROLL_LEFT ) ); AddEventAction( WIDGET_EVENT_SCROLL_RIGHT ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_RIGHT_START_REPEATER, WIDGET_EVENT_SCROLL_RIGHT ) ); AddEventAction( WIDGET_EVENT_SCROLL_LEFT_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_LEFT_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_RIGHT_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_RIGHT_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER, WIDGET_EVENT_SCROLL_UP ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER, WIDGET_EVENT_SCROLL_DOWN ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_LEFT_LSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_LEFT_START_REPEATER, WIDGET_EVENT_SCROLL_LEFT_LSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_RIGHT_LSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_RIGHT_START_REPEATER, WIDGET_EVENT_SCROLL_RIGHT_LSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_LEFT_LSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_LEFT_LSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_RIGHT_LSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_RIGHT_LSTICK_RELEASE ) ); doomCover = declManager->FindMaterial( "guis/assets/mainmenu/doom_cover.tga" ); doom2Cover = declManager->FindMaterial( "guis/assets/mainmenu/doom2_cover.tga" ); doom3Cover = declManager->FindMaterial( "guis/assets/mainmenu/doom3_cover.tga" ); startButton = new idMenuWidget_Button(); startButton->SetSpritePath( GetSpritePath(), "info", "btnStart" ); AddChild( startButton ); }
/* ======================== idMenuScreen_PDA_UserEmails::Initialize ======================== */ void idMenuScreen_PDA_UserEmails::Initialize( idMenuHandler* data ) { idMenuScreen::Initialize( data ); if( data != NULL ) { menuGUI = data->GetGUI(); } SetSpritePath( "menuEmail" ); pdaInbox.SetSpritePath( GetSpritePath(), "info", "inbox" ); pdaInbox.Initialize( data ); pdaInbox.SetNoAutoFree( true ); emailScrollbar.SetSpritePath( GetSpritePath(), "info", "email", "info", "scrollbar" ); emailScrollbar.Initialize( data ); emailScrollbar.SetNoAutoFree( true ); emailInfo.SetSpritePath( GetSpritePath(), "info", "email" ); emailInfo.Initialize( data ); emailInfo.SetScrollbar( &emailScrollbar ); emailInfo.AddChild( &emailScrollbar ); emailInfo.RegisterEventObserver( this ); emailInfo.AddEventAction( WIDGET_EVENT_ROLL_OVER ).Set( WIDGET_ACTION_EMAIL_HOVER, 1 ); emailInfo.AddEventAction( WIDGET_EVENT_ROLL_OUT ).Set( WIDGET_ACTION_EMAIL_HOVER, 0 ); emailInfo.SetNoAutoFree( true ); AddChild( &pdaInbox ); AddChild( &emailInfo ); if( pdaInbox.GetEmailList() != NULL ) { pdaInbox.GetEmailList()->RegisterEventObserver( &emailInfo ); pdaInbox.GetEmailList()->RegisterEventObserver( &emailScrollbar ); for( int i = 0; i < pdaInbox.GetEmailList()->GetChildren().Num(); ++i ) { idMenuWidget& child = pdaInbox.GetEmailList()->GetChildByIndex( i ); idMenuWidget_Button* const button = dynamic_cast< idMenuWidget_Button* >( &child ); if( button != NULL ) { button->RegisterEventObserver( &emailInfo ); } } } AddEventAction( WIDGET_EVENT_SCROLL_DOWN_RSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER, WIDGET_EVENT_SCROLL_DOWN_RSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_RSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER, WIDGET_EVENT_SCROLL_UP_RSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_RSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_RSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_RSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_RSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER, WIDGET_EVENT_SCROLL_DOWN ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER, WIDGET_EVENT_SCROLL_UP ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_LSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER, WIDGET_EVENT_SCROLL_DOWN_LSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_LSTICK ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER, WIDGET_EVENT_SCROLL_UP_LSTICK ) ); AddEventAction( WIDGET_EVENT_SCROLL_DOWN_LSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_LSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_SCROLL_UP_LSTICK_RELEASE ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_LSTICK_RELEASE ) ); AddEventAction( WIDGET_EVENT_TAB_NEXT ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_TAB_NEXT, WIDGET_EVENT_TAB_NEXT ) ); AddEventAction( WIDGET_EVENT_TAB_PREV ).Set( new( TAG_SWF ) idWidgetActionHandler( this, WIDGET_ACTION_EVENT_TAB_PREV, WIDGET_EVENT_TAB_PREV ) ); class idInfoBoxRefresh : public idSWFScriptFunction_RefCounted { public: idInfoBoxRefresh( idMenuWidget_InfoBox* _widget ) : widget( _widget ) { } idSWFScriptVar Call( idSWFScriptObject* thisObject, const idSWFParmList& parms ) { if( widget == NULL ) { return idSWFScriptVar(); } widget->Update(); return idSWFScriptVar(); } private: idMenuWidget_InfoBox* widget; }; if( GetSWFObject() != NULL ) { GetSWFObject()->SetGlobal( "refreshInfoBox", new( TAG_SWF ) idInfoBoxRefresh( &emailInfo ) ); } }