本文整理汇总了C++中idWidgetAction::GetParms方法的典型用法代码示例。如果您正苦于以下问题:C++ idWidgetAction::GetParms方法的具体用法?C++ idWidgetAction::GetParms怎么用?C++ idWidgetAction::GetParms使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类idWidgetAction
的用法示例。
在下文中一共展示了idWidgetAction::GetParms方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StartWidgetActionRepeater
/*
========================
idMenuHandler::StartWidgetActionRepeater
========================
*/
void idMenuHandler::StartWidgetActionRepeater( idMenuWidget* widget, const idWidgetAction& action, const idWidgetEvent& event )
{
if( actionRepeater.isActive && actionRepeater.action == action )
{
return; // don't attempt to reactivate an already active repeater
}
actionRepeater.isActive = true;
actionRepeater.action = action;
actionRepeater.widget = widget;
actionRepeater.event = event;
actionRepeater.numRepetitions = 0;
actionRepeater.nextRepeatTime = 0;
actionRepeater.screenIndex = activeScreen; // repeaters are cleared between screens
if( action.GetParms().Num() == 2 )
{
actionRepeater.repeatDelay = action.GetParms()[ 1 ].ToInteger();
}
else
{
actionRepeater.repeatDelay = DEFAULT_REPEAT_TIME;
}
// do the first event immediately
PumpWidgetActionRepeater();
}
示例2: HandleAction
/*
========================
idMenuScreen_Shell_ModeSelect::HandleAction h
========================
*/
bool idMenuScreen_Shell_ModeSelect::HandleAction( idWidgetAction & action, const idWidgetEvent & event, idMenuWidget * widget, bool forceHandled ) {
if ( menuData == NULL ) {
return true;
}
if ( menuData->ActiveScreen() != SHELL_AREA_MODE_SELECT ) {
return false;
}
widgetAction_t actionType = action.GetType();
const idSWFParmList & parms = action.GetParms();
switch ( actionType ) {
case WIDGET_ACTION_GO_BACK: {
menuData->SetNextScreen( SHELL_AREA_PARTY_LOBBY, MENU_TRANSITION_SIMPLE );
return true;
}
case WIDGET_ACTION_PRESS_FOCUSED: {
if ( options == NULL ) {
return true;
}
int selectionIndex = options->GetViewIndex();
if ( parms.Num() == 1 ) {
selectionIndex = parms[0].ToInteger();
}
if ( options->GetFocusIndex() != selectionIndex ) {
options->SetFocusIndex( selectionIndex );
options->SetViewIndex( options->GetViewOffset() + selectionIndex );
}
idMatchParameters matchParameters = idMatchParameters( session->GetPartyLobbyBase().GetMatchParms() );
matchParameters.gameMap = GAME_MAP_RANDOM;
matchParameters.gameMode = selectionIndex;
// Always a public match.
matchParameters.matchFlags &= ~MATCH_INVITE_ONLY;
session->UpdatePartyParms( matchParameters );
// Update flags for game lobby.
matchParameters.matchFlags = DefaultPartyFlags | DefaultPublicGameFlags;
cvarSystem->MoveCVarsToDict( CVAR_SERVERINFO, matchParameters.serverInfo );
// Force a default value for the si_timelimit and si_fraglimit for quickmatch
matchParameters.serverInfo.SetInt( "si_timelimit", 15 );
matchParameters.serverInfo.SetInt( "si_fraglimit", 10 );
session->FindOrCreateMatch( matchParameters );
return true;
}
}
return idMenuWidget::HandleAction( action, event, widget, forceHandled );
}
示例3: HandleAction
/*
================================================
idMenuHandler::Update
================================================
*/
bool idMenuHandler::HandleAction( idWidgetAction & action, const idWidgetEvent & event, idMenuWidget * widget, bool forceHandled ) {
widgetAction_t actionType = action.GetType();
const idSWFParmList & parms = action.GetParms();
switch ( actionType ) {
case WIDGET_ACTION_ADJUST_FIELD: {
if ( widget != NULL && widget->GetDataSource() != NULL ) {
widget->GetDataSource()->AdjustField( widget->GetDataSourceFieldIndex(), parms[ 0 ].ToInteger() );
widget->Update();
}
return true;
}
case WIDGET_ACTION_FUNCTION: {
if ( verify( action.GetScriptFunction() != NULL ) ) {
action.GetScriptFunction()->Call( event.thisObject, event.parms );
}
return true;
}
case WIDGET_ACTION_PRESS_FOCUSED: {
idMenuScreen * const screen = menuScreens[ activeScreen ];
if ( screen != NULL ) {
idWidgetEvent pressEvent( WIDGET_EVENT_PRESS, 0, event.thisObject, idSWFParmList() );
screen->ReceiveEvent( pressEvent );
}
return true;
}
case WIDGET_ACTION_START_REPEATER: {
idWidgetAction repeatAction;
widgetAction_t repeatActionType = static_cast< widgetAction_t >( parms[ 0 ].ToInteger() );
assert( parms.Num() >= 2 );
int repeatDelay = DEFAULT_REPEAT_TIME;
if ( parms.Num() >= 3 ) {
repeatDelay = parms[2].ToInteger();
}
repeatAction.Set( repeatActionType, parms[ 1 ], repeatDelay );
StartWidgetActionRepeater( widget, repeatAction, event );
return true;
}
case WIDGET_ACTION_STOP_REPEATER: {
ClearWidgetActionRepeater();
return true;
}
}
if ( !widget->GetHandlerIsParent() ) {
for ( int index = 0; index < children.Num(); ++index ) {
if ( children[index] != NULL ) {
if ( children[index]->HandleAction( action, event, widget, forceHandled ) ) {
return true;
}
}
}
}
return false;
}
示例4: HandleAction
/*
========================
idMenuScreen_Shell_Playstation::HandleAction h
========================
*/
bool idMenuScreen_Shell_Playstation::HandleAction( idWidgetAction& action, const idWidgetEvent& event, idMenuWidget* widget, bool forceHandled )
{
if( menuData == NULL )
{
return true;
}
if( menuData->ActiveScreen() != SHELL_AREA_PLAYSTATION )
{
return false;
}
widgetAction_t actionType = action.GetType();
const idSWFParmList& parms = action.GetParms();
switch( actionType )
{
case WIDGET_ACTION_GO_BACK:
{
menuData->SetNextScreen( SHELL_AREA_ROOT, MENU_TRANSITION_SIMPLE );
return true;
}
case WIDGET_ACTION_PRESS_FOCUSED:
{
if( options == NULL )
{
return true;
}
int selectionIndex = options->GetViewIndex();
if( parms.Num() == 1 )
{
selectionIndex = parms[0].ToInteger();
}
if( options->GetFocusIndex() != selectionIndex )
{
options->SetFocusIndex( selectionIndex );
options->SetViewIndex( options->GetViewOffset() + selectionIndex );
}
if( selectionIndex == 0 )
{
}
else if( selectionIndex == 1 )
{
}
return true;
}
}
return idMenuWidget::HandleAction( action, event, widget, forceHandled );
}
示例5: HandleAction
/*
========================
idMenuScreen_Shell_GameBrowser::HandleAction h
========================
*/
bool idMenuScreen_Shell_GameBrowser::HandleAction( idWidgetAction & action, const idWidgetEvent & event, idMenuWidget * widget, bool forceHandle ) {
idMenuHandler_Shell * const mgr = dynamic_cast< idMenuHandler_Shell * >( menuData );
if ( mgr == NULL ) {
return false;
}
if ( mgr->ActiveScreen() != SHELL_AREA_BROWSER ) {
return false;
}
widgetAction_t actionType = action.GetType();
const idSWFParmList & parms = action.GetParms();
switch ( actionType ) {
case WIDGET_ACTION_GO_BACK: {
menuData->SetNextScreen( SHELL_AREA_PARTY_LOBBY, MENU_TRANSITION_SIMPLE );
return true;
}
case WIDGET_ACTION_COMMAND: {
switch ( parms[ 0 ].ToInteger() ) {
case BROWSER_COMMAND_REFRESH_SERVERS: {
UpdateServerList();
break;
}
case BROWSER_COMMAND_SHOW_GAMERTAG: {
int index = listWidget->GetServerIndex();
if ( index != -1 ) {
session->ShowServerGamerCardUI( index );
}
break;
}
}
return true;
}
case WIDGET_ACTION_PRESS_FOCUSED: {
int selectionIndex = listWidget->GetFocusIndex();
if ( parms.Num() > 0 ) {
selectionIndex = parms[0].ToInteger();
}
if ( selectionIndex != listWidget->GetFocusIndex() ) {
listWidget->SetViewIndex( listWidget->GetViewOffset() + selectionIndex );
listWidget->SetFocusIndex( selectionIndex );
return true;
}
int index = listWidget->GetServerIndex();
if ( index != -1 ) {
session->ConnectToServer( index );
}
return true;
}
}
return idMenuScreen::HandleAction( action, event, widget, forceHandle );
}
示例6: HandleAction
/*
========================
idMenuScreen_Shell_Settings::HandleAction h
========================
*/
bool idMenuScreen_Shell_Settings::HandleAction( idWidgetAction & action, const idWidgetEvent & event, idMenuWidget * widget, bool forceHandled ) {
if ( menuData == NULL ) {
return true;
}
if ( menuData->ActiveScreen() != SHELL_AREA_SETTINGS ) {
return false;
}
widgetAction_t actionType = action.GetType();
const idSWFParmList & parms = action.GetParms();
switch ( actionType ) {
case WIDGET_ACTION_GO_BACK: {
menuData->SetNextScreen( SHELL_AREA_ROOT, MENU_TRANSITION_SIMPLE );
return true;
}
case WIDGET_ACTION_COMMAND: {
switch ( parms[0].ToInteger() ) {
case SETTING_CMD_CONTROLS: {
menuData->SetNextScreen( SHELL_AREA_CONTROLS, MENU_TRANSITION_SIMPLE );
break;
}
case SETTING_CMD_GAMEPLAY: {
menuData->SetNextScreen( SHELL_AREA_GAME_OPTIONS, MENU_TRANSITION_SIMPLE );
break;
}
case SETTING_CMD_SYSTEM: {
menuData->SetNextScreen( SHELL_AREA_SYSTEM_OPTIONS, MENU_TRANSITION_SIMPLE );
break;
}
case SETTING_CMD_3D: {
menuData->SetNextScreen( SHELL_AREA_STEREOSCOPICS, MENU_TRANSITION_SIMPLE );
break;
}
}
if ( options != NULL ) {
int selectionIndex = options->GetViewIndex();
if ( parms.Num() == 1 ) {
selectionIndex = parms[0].ToInteger();
}
if ( options->GetFocusIndex() != selectionIndex ) {
options->SetFocusIndex( selectionIndex );
options->SetViewIndex( options->GetViewOffset() + selectionIndex );
}
}
return true;
}
}
return idMenuWidget::HandleAction( action, event, widget, forceHandled );
}
示例7: HandleAction
/*
========================
idMenuScreen_Shell_NewGame::HandleAction h
========================
*/
bool idMenuScreen_Shell_NewGame::HandleAction( idWidgetAction& action, const idWidgetEvent& event, idMenuWidget* widget, bool forceHandled )
{
if( menuData != NULL )
{
if( menuData->ActiveScreen() != SHELL_AREA_NEW_GAME )
{
return false;
}
}
widgetAction_t actionType = action.GetType();
const idSWFParmList& parms = action.GetParms();
switch( actionType )
{
case WIDGET_ACTION_GO_BACK:
{
if( menuData != NULL )
{
menuData->SetNextScreen( SHELL_AREA_CAMPAIGN, MENU_TRANSITION_SIMPLE );
}
return true;
}
case WIDGET_ACTION_PRESS_FOCUSED:
{
if( options == NULL )
{
return true;
}
int selectionIndex = options->GetViewIndex();
if( parms.Num() == 1 )
{
selectionIndex = parms[0].ToInteger();
}
if( selectionIndex != options->GetFocusIndex() )
{
options->SetViewIndex( selectionIndex );
options->SetFocusIndex( selectionIndex );
}
idMenuHandler_Shell* shell = dynamic_cast< idMenuHandler_Shell* >( menuData );
if( shell != NULL )
{
shell->SetNewGameType( selectionIndex );
menuData->SetNextScreen( SHELL_AREA_DIFFICULTY, MENU_TRANSITION_SIMPLE );
}
return true;
}
}
return idMenuWidget::HandleAction( action, event, widget, forceHandled );
}
示例8: HandleAction
/*
========================
idMenuScreen_Shell_Dev::HandleAction h
========================
*/
bool idMenuScreen_Shell_Dev::HandleAction( idWidgetAction& action, const idWidgetEvent& event, idMenuWidget* widget, bool forceHandled )
{
if( menuData == NULL )
{
return true;
}
if( menuData->ActiveScreen() != SHELL_AREA_DEV )
{
return false;
}
widgetAction_t actionType = action.GetType();
const idSWFParmList& parms = action.GetParms();
switch( actionType )
{
case WIDGET_ACTION_GO_BACK:
{
menuData->SetNextScreen( SHELL_AREA_ROOT, MENU_TRANSITION_SIMPLE );
return true;
}
case WIDGET_ACTION_PRESS_FOCUSED:
{
if( options == NULL )
{
return true;
}
int selectionIndex = options->GetViewIndex();
if( parms.Num() == 1 )
{
selectionIndex = parms[0].ToInteger();
}
if( options->GetFocusIndex() != selectionIndex - options->GetViewOffset() )
{
options->SetFocusIndex( selectionIndex );
options->SetViewIndex( options->GetViewOffset() + selectionIndex );
}
int mapIndex = options->GetViewIndex();
if( ( mapIndex < devOptions.Num() ) && ( devOptions[ mapIndex ].map != NULL ) )
{
cmdSystem->AppendCommandText( va( "devmap %s\n", devOptions[ mapIndex ].map ) );
}
return true;
}
}
return idMenuWidget::HandleAction( action, event, widget, forceHandled );
}
示例9: HandleAction
/*
========================
idMenuScreen_PDA_VideoDisks::HandleAction
========================
*/
bool idMenuScreen_PDA_VideoDisks::HandleAction( idWidgetAction& action, const idWidgetEvent& event, idMenuWidget* widget, bool forceHandled )
{
if( menuData == NULL )
{
return true;
}
if( menuData->ActiveScreen() != PDA_AREA_VIDEO_DISKS )
{
return false;
}
widgetAction_t actionType = action.GetType();
const idSWFParmList& parms = action.GetParms();
switch( actionType )
{
case WIDGET_ACTION_GO_BACK:
{
menuData->SetNextScreen( PDA_AREA_INVALID, MENU_TRANSITION_ADVANCE );
return true;
}
case WIDGET_ACTION_START_REPEATER:
{
idWidgetAction repeatAction;
widgetAction_t repeatActionType = static_cast< widgetAction_t >( parms[ 0 ].ToInteger() );
assert( parms.Num() == 2 );
repeatAction.Set( repeatActionType, parms[ 1 ] );
if( menuData != NULL )
{
menuData->StartWidgetActionRepeater( widget, repeatAction, event );
}
return true;
}
case WIDGET_ACTION_STOP_REPEATER:
{
if( menuData != NULL )
{
menuData->ClearWidgetActionRepeater();
}
return true;
}
case WIDGET_ACTION_PRESS_FOCUSED:
{
ToggleVideoDiskPlay();
Update();
return true;
}
}
return idMenuWidget::HandleAction( action, event, widget, forceHandled );
}
示例10: HandleAction
/*
========================
idMenuWidget_InfoBox::ObserveEvent
========================
*/
bool idMenuWidget_InfoBox::HandleAction( idWidgetAction & action, const idWidgetEvent & event, idMenuWidget * widget, bool forceHandled ) {
const idSWFParmList & parms = action.GetParms();
if ( action.GetType() == WIDGET_ACTION_SCROLL_VERTICAL ) {
const scrollType_t scrollType = static_cast< scrollType_t >( event.arg );
if ( scrollType == SCROLL_SINGLE ) {
Scroll( parms[ 0 ].ToInteger() );
}
return true;
}
return idMenuWidget::HandleAction( action, event, widget, forceHandled );
}
示例11: HandleAction
/*
========================
idMenuScreen_Shell_Bindings::HandleAction
========================
*/
bool idMenuScreen_Shell_Bindings::HandleAction( idWidgetAction& action, const idWidgetEvent& event, idMenuWidget* widget, bool forceHandled )
{
if( menuData == NULL )
{
return true;
}
if( menuData->ActiveScreen() != SHELL_AREA_KEYBOARD )
{
return false;
}
widgetAction_t actionType = action.GetType();
const idSWFParmList& parms = action.GetParms();
switch( actionType )
{
case WIDGET_ACTION_GO_BACK:
{
menuData->SetNextScreen( SHELL_AREA_CONTROLS, MENU_TRANSITION_SIMPLE );
return true;
}
case WIDGET_ACTION_JOY3_ON_PRESS:
{
HandleRestoreDefaults();
return true;
}
case WIDGET_ACTION_PRESS_FOCUSED:
{
int listIndex = 0;
if( parms.Num() > 0 )
{
listIndex = options->GetViewOffset() + parms[ 0 ].ToInteger();
}
else
{
listIndex = options->GetViewIndex();
}
if( listIndex < 0 || listIndex >= numBinds )
{
return true;
}
if( options->GetViewIndex() != listIndex )
{
if( idStr::Icmp( keyboardBinds[ listIndex ].bind, "" ) == 0 )
{
return true;
}
options->SetViewIndex( listIndex );
options->SetFocusIndex( listIndex - options->GetViewOffset() );
}
else
{
idMenuHandler_Shell* data = dynamic_cast< idMenuHandler_Shell* >( menuData );
if( data != NULL )
{
ToggleWait( true );
Update();
data->SetWaitForBinding( keyboardBinds[ listIndex ].bind );
}
}
return true;
}
case WIDGET_ACTION_SCROLL_VERTICAL_VARIABLE:
{
if( parms.Num() == 0 )
{
return true;
}
if( options != NULL )
{
int dir = parms[ 0 ].ToInteger();
int scroll = 0;
int curIndex = options->GetViewIndex();
if( dir != 0 )
{
if( curIndex + dir >= numBinds )
{
scroll = dir * 2;
}
else if( curIndex + dir < 1 )
{
//.........这里部分代码省略.........
示例12: HandleAction
/*
========================
idMenuScreen_Shell_Save::HandleAction
========================
*/
bool idMenuScreen_Shell_Save::HandleAction( idWidgetAction& action, const idWidgetEvent& event, idMenuWidget* widget, bool forceHandled )
{
if( menuData == NULL )
{
return true;
}
if( menuData->ActiveScreen() != SHELL_AREA_SAVE )
{
return false;
}
widgetAction_t actionType = action.GetType();
const idSWFParmList& parms = action.GetParms();
switch( actionType )
{
case WIDGET_ACTION_JOY4_ON_PRESS:
{
return true;
}
case WIDGET_ACTION_JOY3_ON_PRESS:
{
if( options == NULL )
{
return true;
}
DeleteGame( options->GetViewIndex() );
return true;
}
case WIDGET_ACTION_GO_BACK:
{
menuData->SetNextScreen( SHELL_AREA_ROOT, MENU_TRANSITION_SIMPLE );
return true;
}
case WIDGET_ACTION_PRESS_FOCUSED:
{
if( options == NULL )
{
return true;
}
if( session->GetSaveGameManager().IsWorking() )
{
return true;
}
if( parms.Num() == 1 )
{
int selectionIndex = parms[0].ToInteger();
if( selectionIndex != options->GetFocusIndex() )
{
options->SetViewIndex( options->GetViewOffset() + selectionIndex );
options->SetFocusIndex( selectionIndex );
return true;
}
}
SaveGame( options->GetViewIndex() );
return true;
}
case WIDGET_ACTION_SCROLL_VERTICAL:
{
return true;
}
}
return idMenuWidget::HandleAction( action, event, widget, forceHandled );
}
示例13: HandleAction
/*
========================
idMenuScreen_PDA_Inventory::HandleAction
========================
*/
bool idMenuScreen_PDA_Inventory::HandleAction( idWidgetAction & action, const idWidgetEvent & event, idMenuWidget * widget, bool forceHandled ) {
if ( menuData == NULL ) {
return true;
}
if ( menuData->ActiveScreen() != PDA_AREA_INVENTORY ) {
return false;
}
widgetAction_t actionType = action.GetType();
const idSWFParmList & parms = action.GetParms();
switch ( actionType ) {
case WIDGET_ACTION_JOY3_ON_PRESS: {
EquipWeapon();
return true;
}
case WIDGET_ACTION_GO_BACK: {
menuData->SetNextScreen( PDA_AREA_INVALID, MENU_TRANSITION_ADVANCE );
return true;
}
case WIDGET_ACTION_START_REPEATER: {
idWidgetAction repeatAction;
widgetAction_t repeatActionType = static_cast< widgetAction_t >( parms[ 0 ].ToInteger() );
assert( parms.Num() == 2 );
repeatAction.Set( repeatActionType, parms[ 1 ] );
menuData->StartWidgetActionRepeater( widget, repeatAction, event );
return true;
}
case WIDGET_ACTION_SELECT_PDA_ITEM: {
if ( itemList.GetMoveDiff() > 0 ) {
itemList.MoveToIndex( itemList.GetMoveToIndex(), true );
}
int index = parms[0].ToInteger();
if ( index != 0 ) {
itemList.MoveToIndex( index );
Update();
}
return true;
}
case WIDGET_ACTION_STOP_REPEATER: {
menuData->ClearWidgetActionRepeater();
return true;
}
case WIDGET_ACTION_SCROLL_HORIZONTAL: {
if ( itemList.GetTotalNumberOfOptions() <= 1 ) {
return true;
}
if ( itemList.GetMoveDiff() > 0 ) {
itemList.MoveToIndex( itemList.GetMoveToIndex(), true );
}
int direction = parms[0].ToInteger();
if ( direction == 1 ) {
if ( itemList.GetViewIndex() == itemList.GetTotalNumberOfOptions() - 1 ) {
return true;
} else {
itemList.MoveToIndex( 1 );
}
} else {
if ( itemList.GetViewIndex() == 0 ) {
return true;
} else {
itemList.MoveToIndex( ( itemList.GetNumVisibleOptions() / 2 ) + 1 );
}
}
Update();
return true;
}
}
return idMenuWidget::HandleAction( action, event, widget, forceHandled );
}
示例14: HandleAction
/*
========================
idMenuScreen_Shell_GameOptions::HandleAction h
========================
*/
bool idMenuScreen_Shell_GameOptions::HandleAction( idWidgetAction& action, const idWidgetEvent& event, idMenuWidget* widget, bool forceHandled )
{
if( menuData == NULL )
{
return true;
}
if( menuData->ActiveScreen() != SHELL_AREA_GAME_OPTIONS )
{
return false;
}
widgetAction_t actionType = action.GetType();
const idSWFParmList& parms = action.GetParms();
switch( actionType )
{
case WIDGET_ACTION_GO_BACK:
{
menuData->SetNextScreen( SHELL_AREA_SETTINGS, MENU_TRANSITION_SIMPLE );
return true;
}
case WIDGET_ACTION_PRESS_FOCUSED:
{
if( options == NULL )
{
return true;
}
int selectionIndex = options->GetFocusIndex();
if( parms.Num() > 0 )
{
selectionIndex = parms[0].ToInteger();
}
if( selectionIndex != options->GetFocusIndex() )
{
options->SetViewIndex( options->GetViewOffset() + selectionIndex );
options->SetFocusIndex( selectionIndex );
}
systemData.AdjustField( selectionIndex, 1 );
options->Update();
return true;
}
case WIDGET_ACTION_START_REPEATER:
{
if( parms.Num() == 4 )
{
int selectionIndex = parms[3].ToInteger();
if( selectionIndex != options->GetFocusIndex() )
{
options->SetViewIndex( options->GetViewOffset() + selectionIndex );
options->SetFocusIndex( selectionIndex );
}
}
break;
}
}
return idMenuWidget::HandleAction( action, event, widget, forceHandled );
}
示例15: HandleAction
/*
========================
idMenuScreen_Shell_Leaderboards::HandleAction
========================
*/
bool idMenuScreen_Shell_Leaderboards::HandleAction( idWidgetAction & action, const idWidgetEvent & event, idMenuWidget * widget, bool forceHandled ) {
if ( menuData == NULL ) {
return true;
}
if ( menuData->ActiveScreen() != SHELL_AREA_LEADERBOARDS ) {
return false;
}
widgetAction_t actionType = action.GetType();
const idSWFParmList & parms = action.GetParms();
switch ( actionType ) {
case WIDGET_ACTION_GO_BACK: {
menuData->SetNextScreen( SHELL_AREA_PARTY_LOBBY, MENU_TRANSITION_SIMPLE );
return true;
}
case WIDGET_ACTION_JOY3_ON_PRESS: {
lbCache->CycleFilter();
refreshLeaderboard = true;
return true;
}
case WIDGET_ACTION_PRESS_FOCUSED: {
if ( options == NULL ) {
return true;
}
int index = options->GetFocusIndex();
if ( parms.Num() != 0 ) {
index = parms[0].ToInteger();
}
if ( lbCache->GetEntryIndex() != index ) {
lbCache->SetEntryIndex( index );
refreshLeaderboard = true;
return true;
}
const idLeaderboardCallback::row_t * row = lbCache->GetLeaderboardRow( lbCache->GetRowOffset() + lbCache->GetEntryIndex() );
if ( row != NULL ) {
lbCache->DisplayGamerCardUI( row );
}
return true;
}
case WIDGET_ACTION_SCROLL_TAB: {
int delta = parms[0].ToInteger();
lbIndex += delta;
SetLeaderboardIndex();
return true;
}
case WIDGET_ACTION_SCROLL_VERTICAL_VARIABLE: {
if ( parms.Num() == 0 ) {
return true;
}
if ( options == NULL ) {
return true;
}
int dir = parms[ 0 ].ToInteger();
if ( lbCache->Scroll( dir ) ) {
// TODO_SPARTY: play scroll sound
refreshLeaderboard = true;
}
return true;
}
case WIDGET_ACTION_SCROLL_PAGE: {
if ( parms.Num() == 0 ) {
return true;
}
if ( options == NULL ) {
return true;
}
int dir = parms[ 0 ].ToInteger();
if ( lbCache->ScrollOffset( dir ) ) {
refreshLeaderboard = true;
}
return true;
}
}
return idMenuWidget::HandleAction( action, event, widget, forceHandled );
}