void CreateCompressModePause( void ) { MSYS_DefineRegion( &gMapPauseRegion, 487, 456, 522, 467, MSYS_PRIORITY_HIGH, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressModeClickCallback ); SetRegionFastHelpText( &gMapPauseRegion, pMapScreenBottomFastHelp[ 7 ] ); }
void AssignDisabilityHelpText( UINT8 ubNumber ) { CHAR16 apStr[ 2000 ]; swprintf( apStr, L"" ); swprintf( apStr, gzIMPDisabilitiesHelpTexts[ubNumber] ); // Set region help text SetRegionFastHelpText( &(gMR_DisabilityHelpTextRegions[ubNumber]), apStr ); SetRegionHelpEndCallback( &gMR_DisabilityHelpTextRegions[ubNumber], MSYS_NO_CALLBACK ); return; }
void DropDownBase::Display() { if( !mfMouseRegionsCreated ) return; HVOBJECT hArrowHandle; //Display the background for the drop down window ColorFillVideoSurfaceArea( FRAME_BUFFER, musStartX, musStartY, musStartX + musWidth + musArrowWidth, musStartY + DEF_SCROLL_ARROW_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) ); // top Display2Line2ShadowHorizontal( musStartX, musStartY, musStartX + musWidth + musArrowWidth - 1, mColorLine, mColorLineShadow ); // left Display2Line2ShadowVertical( musStartX, musStartY+2, musStartY + DEF_SCROLL_ARROW_HEIGHT - 1, mColorLine, mColorLineShadow ); // right between text and arrow Display2Line2ShadowVertical( musStartX + musWidth - 4, musStartY+2, musStartY + DEF_SCROLL_ARROW_HEIGHT - 1, mColorLine, mColorLineShadow ); // bottom Display2Line2ShadowHorizontal( musStartX, musStartY + DEF_SCROLL_ARROW_HEIGHT - 4, musStartX + musWidth + musArrowWidth - 1, mColorLine, mColorLineShadow ); // right Display2Line2ShadowVertical( musStartX + musWidth + musArrowWidth - 4, musStartY, musStartY + DEF_SCROLL_ARROW_HEIGHT - 3, mColorLine, mColorLineShadow ); DrawTopEntry(); //get and display the up and down arrows GetVideoObject(&hArrowHandle, muiGoldArrowImages); //top arrow BltVideoObject(FRAME_BUFFER, hArrowHandle, 0, musUpArrowX, musUpArrowY, VO_BLT_SRCTRANSPARENCY,NULL); // Set region help text if ( StringPixLength ( mHelpText, DEF_DROPDOWN_FONT ) > 0 ) { SetRegionFastHelpText( &mBubbleHelpRegion, mHelpText ); SetRegionHelpEndCallback( &mBubbleHelpRegion, MSYS_NO_CALLBACK ); } InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y); // display dropped region if necessary Display_Drop(); }
void CreateMouseRegionsForLevelMarkers( void ) { INT16 sCounter = 0; CHAR16 sString[ 64 ]; for( sCounter = 0; sCounter < 4 ; sCounter++ ) { MSYS_DefineRegion(&LevelMouseRegions[ sCounter ], MAP_LEVEL_MARKER_X, ( INT16 )( MAP_LEVEL_MARKER_Y + ( MAP_LEVEL_MARKER_DELTA * sCounter ) ), MAP_LEVEL_MARKER_X + MAP_LEVEL_MARKER_WIDTH, ( INT16 )( MAP_LEVEL_MARKER_Y + ( MAP_LEVEL_MARKER_DELTA * ( sCounter + 1 ) ) ), MSYS_PRIORITY_HIGH, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, LevelMarkerBtnCallback ); MSYS_SetRegionUserData(&LevelMouseRegions[sCounter],0,sCounter); swprintf( sString, L"%s %d", zMarksMapScreenText[ 0 ], sCounter + 1 ); SetRegionFastHelpText( &LevelMouseRegions[ sCounter ], sString ); } }
/////////////////////////////// Skill Selection //////////////////////////////////////////// void SkillSelection::Setup( UINT32 aVal ) { Destroy(); SOLDIERTYPE * pSoldier = NULL; GetSoldier( &pSoldier, gusSelectedSoldier ); if ( pSoldier == NULL ) return; if ( HAS_SKILL_TRAIT(pSoldier, aVal) ) { SetupPopup("SkillSelection"); POPUP_OPTION *pOption; CHAR16 pStr[300]; SetTraitToDisplay(aVal); SetGridNoForTraitDisplay(sTraitsMenuTargetGridNo); // this switch isn't really necessary. But dividing the skills into menus for each trait gives a better overview, and looks way better than a huge list switch ( aVal ) { case RADIO_OPERATOR_NT: { for(UINT32 uiCounter = SKILLS_RADIO_FIRST; uiCounter <= SKILLS_RADIO_LAST; ++uiCounter) { swprintf( pStr, pTraitSkillsMenuStrings[uiCounter] ); if ( uiCounter == SKILLS_RADIO_ARTILLERY) pOption = new POPUP_OPTION(&std::wstring( pStr ), new popupCallbackFunction<void,UINT32>( &Wrapper_Setup_ArtillerySector, uiCounter ) ); else if ( uiCounter == SKILLS_RADIO_CALLREINFORCEMENTS) pOption = new POPUP_OPTION(&std::wstring( pStr ), new popupCallbackFunction<void,UINT32>( &Wrapper_Setup_ReinforcementSector, uiCounter ) ); else pOption = new POPUP_OPTION(&std::wstring( pStr ), new popupCallbackFunction<void,UINT32>( &Wrapper_Function_SkillSelection, uiCounter ) ); // if we cannot perform this skill, grey it out if ( !(pSoldier->CanUseSkill(uiCounter, TRUE)) ) { // Set this option off. pOption->setAvail(new popupCallbackFunction<bool,void*>( &Popup_OptionOff, NULL )); } GetPopup()->addOption( *pOption ); } } break; case VARIOUSSKILLS: { for(UINT32 uiCounter = SKILLS_VARIOUS_FIRST; uiCounter <= SKILLS_VARIOUS_LAST; ++uiCounter) { swprintf( pStr, pTraitSkillsMenuStrings[uiCounter] ); pOption = new POPUP_OPTION(&std::wstring( pStr ), new popupCallbackFunction<void,UINT32>( &Wrapper_Function_SkillSelection, uiCounter ) ); // if we cannot perform this skill, grey it out if ( !(pSoldier->CanUseSkill(uiCounter, TRUE)) ) { // Set this option off. pOption->setAvail(new popupCallbackFunction<bool,void*>( &Popup_OptionOff, NULL )); } GetPopup()->addOption( *pOption ); } SetTraitToDisplay(VARIOUSSKILLS); SetGridNoForTraitDisplay(sTraitsMenuTargetGridNo); ToggleTraitRangeView(TRUE); } break; default: break; } // cancel option swprintf( pStr, pSkillMenuStrings[SKILLMENU_CANCEL] ); pOption = new POPUP_OPTION(&std::wstring( pStr ), new popupCallbackFunction<void,UINT32>( &Wrapper_Cancel_SkillSelection, 0 ) ); GetPopup()->addOption( *pOption ); } // same y, different x SetPos(gTraitSelection.GetMaxPosX(), usTraitMenuPosY); if ( HAS_SKILL_TRAIT(pSoldier, aVal) ) { UINT8 cnt = 0; switch ( aVal ) { case RADIO_OPERATOR_NT: { for(UINT32 uiCounter = SKILLS_RADIO_FIRST; uiCounter <= SKILLS_RADIO_LAST; ++uiCounter) { SetRegionFastHelpText( &(GetPopup()->MenuRegion[cnt++]), pSoldier->PrintSkillDesc(uiCounter) ); } } break; case VARIOUSSKILLS: { for(UINT32 uiCounter = SKILLS_VARIOUS_FIRST; uiCounter <= SKILLS_VARIOUS_LAST; ++uiCounter) { SetRegionFastHelpText( &(GetPopup()->MenuRegion[cnt++]), pSoldier->PrintSkillDesc(uiCounter) ); } } break; } } }
void AssignMinorTraitHelpText( UINT8 ubNumber ) { CHAR16 apStr[ 5000 ]; CHAR16 atStr[ 1500 ]; switch( ubNumber ) { case IMP_SKILL_TRAITS_NEW_AMBIDEXTROUS: { swprintf( apStr, L"" ); if( gSkillTraitValues.ubAMPenaltyDoubleReduction != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsAmbidextrous[0], gSkillTraitValues.ubAMPenaltyDoubleReduction, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubAMReloadSpeedMagazines != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsAmbidextrous[1], gSkillTraitValues.ubAMReloadSpeedMagazines, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubAMReloadSpeedLoose != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsAmbidextrous[2], gSkillTraitValues.ubAMReloadSpeedLoose, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubAMPickItemsAPsReduction != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsAmbidextrous[3], gSkillTraitValues.ubAMPickItemsAPsReduction, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubAMWorkBackpackAPsReduction != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsAmbidextrous[4], gSkillTraitValues.ubAMWorkBackpackAPsReduction, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubAMHandleDoorsAPsReduction != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsAmbidextrous[5], gSkillTraitValues.ubAMHandleDoorsAPsReduction, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubAMHandleBombsAPsReduction != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsAmbidextrous[6], gSkillTraitValues.ubAMHandleBombsAPsReduction, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubAMAttachingItemsAPsReduction != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsAmbidextrous[7], gSkillTraitValues.ubAMAttachingItemsAPsReduction, sSpecialCharacters[0]); wcscat( apStr, atStr ); } break; } case IMP_SKILL_TRAITS_NEW_MELEE: { swprintf( apStr, L"" ); if( gSkillTraitValues.ubMEBladesAPsReduction != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsMelee[0], gSkillTraitValues.ubMEBladesAPsReduction, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubMECtHBladesBonus != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsMelee[1], gSkillTraitValues.ubMECtHBladesBonus, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubMECtHBluntBonus != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsMelee[2], gSkillTraitValues.ubMECtHBluntBonus, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubMEDamageBonusBlades != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsMelee[3], gSkillTraitValues.ubMEDamageBonusBlades, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubMEDamageBonusBlunt != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsMelee[4], gSkillTraitValues.ubMEDamageBonusBlunt, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.usMEAimedMeleeAttackDamageBonus != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsMelee[5], gSkillTraitValues.usMEAimedMeleeAttackDamageBonus, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubMEDodgeBladesBonus != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsMelee[6], gSkillTraitValues.ubMEDodgeBladesBonus, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubMECtDBladesOnTopWithBladeInHands != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsMelee[7], gSkillTraitValues.ubMECtDBladesOnTopWithBladeInHands, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubMEDodgeBluntBonus != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsMelee[8], gSkillTraitValues.ubMEDodgeBluntBonus, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubMECtDBluntOnTopWithBladeInHands != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsMelee[9], gSkillTraitValues.ubMECtDBluntOnTopWithBladeInHands, sSpecialCharacters[0]); wcscat( apStr, atStr ); } break; } case IMP_SKILL_TRAITS_NEW_THROWING: { swprintf( apStr, L"" ); if( gSkillTraitValues.ubTHBladesAPsReduction != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsThrowing[0], gSkillTraitValues.ubTHBladesAPsReduction, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubTHBladesMaxRange != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsThrowing[1], gSkillTraitValues.ubTHBladesMaxRange, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubTHBladesCtHBonus != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsThrowing[2], gSkillTraitValues.ubTHBladesCtHBonus, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubTHBladesCtHBonusPerClick != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsThrowing[3], gSkillTraitValues.ubTHBladesCtHBonusPerClick, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubTHBladesDamageBonus != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsThrowing[4], gSkillTraitValues.ubTHBladesDamageBonus, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubTHBladesDamageBonusPerClick != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsThrowing[5], gSkillTraitValues.ubTHBladesDamageBonusPerClick, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubTHBladesSilentCriticalHitChance != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsThrowing[6], gSkillTraitValues.ubTHBladesSilentCriticalHitChance, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubTHBladesCriticalHitMultiplierBonus != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsThrowing[7], gSkillTraitValues.ubTHBladesCriticalHitMultiplierBonus); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubTHBladesAimClicksAdded != 0 ) { if( gSkillTraitValues.ubTHBladesAimClicksAdded == 1 ) swprintf( atStr, gzIMPMinorTraitsHelpTextsThrowing[8], gSkillTraitValues.ubTHBladesAimClicksAdded ); else swprintf( atStr, gzIMPMinorTraitsHelpTextsThrowing[9], gSkillTraitValues.ubTHBladesAimClicksAdded ); wcscat( apStr, atStr ); } break; } case IMP_SKILL_TRAITS_NEW_NIGHT_OPS: { swprintf( apStr, L"" ); if( gSkillTraitValues.ubNOeSightRangeBonusInDark != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsNightOps[0], gSkillTraitValues.ubNOeSightRangeBonusInDark, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubNOHearingRangeBonus != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsNightOps[1], gSkillTraitValues.ubNOHearingRangeBonus, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubNOHearingRangeBonusInDark != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsNightOps[2], gSkillTraitValues.ubNOHearingRangeBonusInDark, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubNOIterruptsBonusInDark != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsNightOps[3], gSkillTraitValues.ubNOIterruptsBonusInDark, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubNONeedForSleepReduction != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsNightOps[4], gSkillTraitValues.ubNONeedForSleepReduction); wcscat( apStr, atStr ); } break; } case IMP_SKILL_TRAITS_NEW_STEALTHY: { swprintf( apStr, L"" ); if( gSkillTraitValues.ubSTStealthModeSpeedBonus != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsStealthy[0], gSkillTraitValues.ubSTStealthModeSpeedBonus, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubSTBonusToMoveQuietly != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsStealthy[1], gSkillTraitValues.ubSTBonusToMoveQuietly, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubSTStealthBonus != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsStealthy[2], gSkillTraitValues.ubSTStealthBonus, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubSTReducedAPsRegistered != 0 && gGameOptions.fImprovedInterruptSystem ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsStealthy[4], gSkillTraitValues.ubSTReducedAPsRegistered, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubSTStealthPenaltyForMovingReduction != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsStealthy[3], gSkillTraitValues.ubSTStealthPenaltyForMovingReduction, sSpecialCharacters[0]); wcscat( apStr, atStr ); } break; } case IMP_SKILL_TRAITS_NEW_ATHLETICS: { swprintf( apStr, L"" ); if( gSkillTraitValues.ubATAPsMovementReduction != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsAthletics[0], gSkillTraitValues.ubATAPsMovementReduction, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubATBPsMovementReduction != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsAthletics[1], gSkillTraitValues.ubATBPsMovementReduction, sSpecialCharacters[0]); wcscat( apStr, atStr ); } break; } case IMP_SKILL_TRAITS_NEW_BODYBUILDING: { swprintf( apStr, L"" ); if( gSkillTraitValues.ubBBDamageResistance != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsBodybuilding[0], gSkillTraitValues.ubBBDamageResistance, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubBBCarryWeightBonus != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsBodybuilding[1], gSkillTraitValues.ubBBCarryWeightBonus, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubBBBreathLossForHtHImpactReduction != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsBodybuilding[2], gSkillTraitValues.ubBBBreathLossForHtHImpactReduction, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.usBBIncreasedNeededDamageToFallDown != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsBodybuilding[3], gSkillTraitValues.usBBIncreasedNeededDamageToFallDown, sSpecialCharacters[0]); wcscat( apStr, atStr ); } break; } case IMP_SKILL_TRAITS_NEW_DEMOLITIONS: { swprintf( apStr, L"" ); if( gSkillTraitValues.ubDEAPsNeededToThrowGrenadesReduction != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[0], gSkillTraitValues.ubDEAPsNeededToThrowGrenadesReduction, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubDEMaxRangeToThrowGrenades != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[1], gSkillTraitValues.ubDEMaxRangeToThrowGrenades, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubDECtHWhenThrowingGrenades != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[2], gSkillTraitValues.ubDECtHWhenThrowingGrenades, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubDEDamageOfBombsAndMines != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[3], gSkillTraitValues.ubDEDamageOfBombsAndMines, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubDEAttachDetonatorCheckBonus != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[4], gSkillTraitValues.ubDEAttachDetonatorCheckBonus, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubDEPlantAndRemoveBombCheckBonus != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[5], gSkillTraitValues.ubDEPlantAndRemoveBombCheckBonus, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubDEPlacedBombLevelBonus != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[6], gSkillTraitValues.ubDEPlacedBombLevelBonus); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubDEShapedChargeDamageMultiplier != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[7], gSkillTraitValues.ubDEShapedChargeDamageMultiplier); wcscat( apStr, atStr ); } break; } case IMP_SKILL_TRAITS_NEW_TEACHING: { swprintf( apStr, L"" ); if( gSkillTraitValues.ubTGBonusToTrainMilitia != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsTeaching[0], gSkillTraitValues.ubTGBonusToTrainMilitia, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubTGEffectiveLDRToTrainMilitia != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsTeaching[1], gSkillTraitValues.ubTGEffectiveLDRToTrainMilitia, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubTGBonusToTeachOtherMercs != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsTeaching[2], gSkillTraitValues.ubTGBonusToTeachOtherMercs, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubTGEffectiveSkillValueForTeaching != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsTeaching[3], gSkillTraitValues.ubTGEffectiveSkillValueForTeaching); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubTGBonusOnPractising != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsTeaching[4], gSkillTraitValues.ubTGBonusOnPractising, sSpecialCharacters[0]); wcscat( apStr, atStr ); } break; } case IMP_SKILL_TRAITS_NEW_SCOUTING: { swprintf( apStr, L"" ); if( gSkillTraitValues.ubSCSightRangebonusWithScopes != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsScouting[0], gSkillTraitValues.ubSCSightRangebonusWithScopes, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.usSCSightRangebonusWithBinoculars != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsScouting[1], gSkillTraitValues.usSCSightRangebonusWithBinoculars, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.ubSCTunnelVisionReducedWithBinoculars != 0 ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsScouting[2], gSkillTraitValues.ubSCTunnelVisionReducedWithBinoculars, sSpecialCharacters[0]); wcscat( apStr, atStr ); } if( gSkillTraitValues.fSCCanDetectEnemyPresenseAround ) { if( gSkillTraitValues.fSCCanDetermineEnemyNumbersAround ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsScouting[3]); wcscat( apStr, atStr ); } else { swprintf( atStr, gzIMPMinorTraitsHelpTextsScouting[4]); wcscat( apStr, atStr ); } } if( gSkillTraitValues.fSCPreventsTheEnemyToAmbushMercs ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsScouting[5]); wcscat( apStr, atStr ); } if( gSkillTraitValues.fSCPreventsBloodcatsAmbushes ) { swprintf( atStr, gzIMPMinorTraitsHelpTextsScouting[6]); wcscat( apStr, atStr ); } break; } case IMP_SKILL_TRAITS_NEW_RADIO_OPERATOR: { swprintf( apStr, L"" ); swprintf( atStr, gzIMPMajorTraitsHelpTextsRadioOperator[0]); wcscat( apStr, atStr ); swprintf( atStr, gzIMPMajorTraitsHelpTextsRadioOperator[1]); wcscat( apStr, atStr ); swprintf( atStr, gzIMPMajorTraitsHelpTextsRadioOperator[2]); wcscat( apStr, atStr ); swprintf( atStr, gzIMPMajorTraitsHelpTextsRadioOperator[3]); wcscat( apStr, atStr ); swprintf( atStr, gzIMPMajorTraitsHelpTextsRadioOperator[4]); wcscat( apStr, atStr ); swprintf( atStr, gzIMPMajorTraitsHelpTextsRadioOperator[5]); wcscat( apStr, atStr ); break; } case IMP_SKILL_TRAITS_NEW_MINOR_NONE: { swprintf( apStr, gzIMPMinorTraitsHelpTextsNone[0] ); break; } } // Set region help text SetRegionFastHelpText( &(gMR_MinorTraitHelpTextRegions[ubNumber]), apStr ); SetRegionHelpEndCallback( &gMR_MinorTraitHelpTextRegions[ubNumber], MSYS_NO_CALLBACK ); return; }
void BuildDemoMouseRegionsForHelpText( void ) { INT32 iCounter = 0; CHAR16 sString[ 128 ]; // for the laptop button MSYS_DefineRegion( &MapButtonScreenMasks[ 0 ], 456,410,487, 441, MSYS_PRIORITY_HIGHEST, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MapButtonMaskBtnCallback ); SetRegionFastHelpText( &MapButtonScreenMasks[ 0 ], pMapScreenBottomFastHelp[ 0 ] ); // for the time compress more MSYS_DefineRegion( &MapButtonScreenMasks[ 1 ], 465,455,481, 470, MSYS_PRIORITY_HIGHEST, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MapButtonMaskBtnCallback ); // for the time compress less MSYS_DefineRegion( &MapButtonScreenMasks[ 2 ], 526,455,544, 470, MSYS_PRIORITY_HIGHEST, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MapButtonMaskBtnCallback ); SetRegionFastHelpText( &MapButtonScreenMasks[ 2 ], pMapScreenBottomFastHelp[ 3 ] ); SetRegionFastHelpText( &MapButtonScreenMasks[ 1 ], pMapScreenBottomFastHelp[ 4 ] ); // the contract button MSYS_DefineRegion( &MapButtonScreenMasks[ 3 ], 191,48,250, 59, MSYS_PRIORITY_HIGHEST, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MapButtonMaskBtnCallback ); SetRegionFastHelpText( &MapButtonScreenMasks[ 3 ], pMapScreenMouseRegionHelpText[ 3 ] ); // the map border buttons // town MSYS_DefineRegion( &MapButtonScreenMasks[ 4 ], 272,323,307, 355, MSYS_PRIORITY_HIGHEST, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MapButtonMaskBtnCallback ); // mine MSYS_DefineRegion( &MapButtonScreenMasks[ 5 ], 315,323,350, 355, MSYS_PRIORITY_HIGHEST, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MapButtonMaskBtnCallback ); // team MSYS_DefineRegion( &MapButtonScreenMasks[ 6 ], 358,323,( 358 + 35 ), 355, MSYS_PRIORITY_HIGHEST, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MapButtonMaskBtnCallback ); // air MSYS_DefineRegion( &MapButtonScreenMasks[ 7 ], 444,323,( 444 + 35 ),355, MSYS_PRIORITY_HIGHEST, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MapButtonMaskBtnCallback ); // zoom MSYS_DefineRegion( &MapButtonScreenMasks[ 8 ], 547,323,( 547 + 35 ), 355, MSYS_PRIORITY_HIGHEST, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MapButtonMaskBtnCallback ); // militia MSYS_DefineRegion( &MapButtonScreenMasks[ 9 ], 402,323,( 402 + 35 ), 355, MSYS_PRIORITY_HIGHEST, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MapButtonMaskBtnCallback ); // set up fast help text SetRegionFastHelpText( &MapButtonScreenMasks[ 4 ], pMapScreenBorderButtonHelpText[ 0 ] ); SetRegionFastHelpText( &MapButtonScreenMasks[ 5 ], pMapScreenBorderButtonHelpText[ 1 ] ); SetRegionFastHelpText( &MapButtonScreenMasks[ 6 ], pMapScreenBorderButtonHelpText[ 2 ] ); SetRegionFastHelpText( &MapButtonScreenMasks[ 7 ], pMapScreenBorderButtonHelpText[ 3 ] ); SetRegionFastHelpText( &MapButtonScreenMasks[ 8 ], pMapScreenBorderButtonHelpText[ 4 ] ); SetRegionFastHelpText( &MapButtonScreenMasks[ 9 ], pMapScreenBorderButtonHelpText[ 5 ] ); // map mine levels for( iCounter = 0; iCounter < 4 ; iCounter++ ) { MSYS_DefineRegion(&MapButtonScreenMasks[ iCounter + 10 ] , MAP_LEVEL_MARKER_X, ( INT16 )( MAP_LEVEL_MARKER_Y + ( MAP_LEVEL_MARKER_DELTA * iCounter ) ), MAP_LEVEL_MARKER_X + MAP_LEVEL_MARKER_WIDTH, ( INT16 )( MAP_LEVEL_MARKER_Y + ( MAP_LEVEL_MARKER_DELTA * ( iCounter + 1 ) ) ), MSYS_PRIORITY_HIGHEST, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MapButtonMaskBtnCallback ); swprintf( sString, L"%s %d", zMarksMapScreenText[ 0 ], iCounter + 1 ); SetRegionFastHelpText( &MapButtonScreenMasks[ iCounter + 10 ], sString ); } return; }