Boolean VectClick(DialogPtr d,VLISTPTR L,short itemHit,long *item,Boolean doubleClick) { #pragma unused (item) #pragma unused (doubleClick) switch(itemHit) { case CONT_CANCEL: MyDisposeHandle((Handle *)&gEditContourLevels); return(true); case CONT_OKAY: if (GetNumDoubleHdlItems(gEditContourLevels)==0) { printError("You must have at least one contour level"); return false; } CopyContourLevels(); // code goes here, should the dialog edit contours be deleted? //sharedCMover->bShowArrows = GetButton(dialog, M16SHOWARROWS); model->NewDirtNotification(); // need to refresh concentration scale on the map return(true); case CONT_ADD: MakeContourLevels(d,L); return false; case CONT_ADDONE: AddOneLevelValue(d,L); return false; case CONT_DEL: DeleteSelectedItem(d,L); return(false); case CONT_DELALL: DeleteAll(d,L); return(false); case CONT_LEVELVALUE: CheckNumberTextItem(d,CONT_LEVELVALUE,true); return(false); case CONT_INITVALUE: CheckNumberTextItem(d,CONT_INITVALUE,true); return(false); case CONT_FINALVALUE: CheckNumberTextItem(d,CONT_FINALVALUE,true); return(false); case CONT_INCR: CheckNumberTextItem(d,CONT_INCR,true); return(false); case CONT_DEFAULT: DeleteAll(d,L); SetDefaultContours(gEditContourLevels,gContourType); VLReset(L,GetNumDoubleHdlItems(gEditContourLevels)); VLSetSelect(GetNumDoubleHdlItems(gEditContourLevels)-1,L); VLAutoScroll(L); return(false); default: return(false); } }
void ExecuteItemStatsCmd( UINT8 ubAction ) { switch( ubAction ) { case ITEMSTATS_APPLY: if( gpItem && gpItem->usItem == ACTION_ITEM ) { ExtractAndUpdateActionItemsGUI(); } else if( gpItem && gpItem->usItem == SWITCH ) { ExtractAndUpdateTriggersGUI(); } else if( gpItem && gpItem->usItem == OWNERSHIP ) { ExtractAndUpdateOwnershipGUI(); } else switch( gbEditingMode ) { case EDITING_GUNS: ExtractAndUpdateGunGUI(); break; case EDITING_AMMO: ExtractAndUpdateAmmoGUI(); break; case EDITING_ARMOUR: ExtractAndUpdateArmourGUI(); break; case EDITING_EQUIPMENT: ExtractAndUpdateEquipGUI(); break; case EDITING_EXPLOSIVES: ExtractAndUpdateExplosivesGUI(); break; case EDITING_MONEY: ExtractAndUpdateMoneyGUI(); break; case EDITING_KEYS: ExtractAndUpdateKeysGUI(); break; } SetActiveField( 0 ); gfRenderTaskbar = TRUE; break; case ITEMSTATS_CANCEL: SpecifyItemToEdit( gpItem, gsItemGridNo ); SetActiveField( 0 ); break; case ITEMSTATS_DEFAULT: break; case ITEMSTATS_DELETE: DeleteSelectedItem(); break; case ITEMSTATS_SHOW: ShowSelectedItem(); break; case ITEMSTATS_HIDE: HideSelectedItem(); break; } }