[Windows Mobile Apps and Games] Tirinoarim:
Add TMC Audio Announce to iGo8

For those wishing to get iGo8 to announce when theres a traffic jam ahead, heres how to do it. First of all, you need to extract the following files from your data.zip

ui_igo8\common\ui\model_variables.ui

ui_igo8\common\ui\tmc.ui

ui_igo8\[Resolution Folder]\tmc_[Resolution].ui

Next, edit the files as follows

model_variables.ui

Add a new vTMCVoiceWarning variable to the header section

<header>
<var vMapNorthUpOnAutoZoom>
<var vNorthUpAutoZoomValue>
<var vNorthUpAutoZoomDistance>
<var nBuildingDistance>
<var nTerrainDetail>
<var nDynamicVolumeType>
<var sGeoCodingStatus>
<var vOnBattery>
<var vShutdownInProgress>
<var vTMCVoiceWarning=0 permanent>
</header>

tmc.ui

Find the TMC Announcement section, the start should look something like this

;==============================
; TMC announcement (not used)
<script sc_TMC_Announce>

Theres a couple of changes that need to happen in this code. First, we need to add a call to a new "Audio Announce" script

runifnot vTmcReplanMode "ASK" 'runif vActiveState "st_navigatemap" sc_TMC_Audio_Announce'

Next we need to add the new "Audio Announce" script which announces the "traffic jam ahead" audio if our new vTMCVoiceWarning variable is set

<script sc_TMC_Audio_Announce>
runif vTMCVoiceWarning 1 '.sound.announcer.traffic_jam_ahead'
</script>

And finally add a call to the audio announce script in the initialisation (sc_TMC_Announce_Init) script

run sc_TMC_Audio_Announce

Your final code should now look something like this

;==============================
; TMC announcement (not used)
<script sc_TMC_Announce>
ui_TmcAnnounce.hide
termif %tmc.events.announced_events.isempty 1
termif %tmc.ignore_all_events 1
runifnot vTmcReplanMode "ASK" 'runif vActiveState "st_navigatemap" sc_TMC_Audio_Announce'
termifnot vTmcReplanMode "ASK"
runif vActiveState "st_navigatemap" 'term sc_TMC_Announce_Init, run sc_TMC_Announce_Init'
</script>

<script sc_TMC_Audio_Announce>
runif vTMCVoiceWarning 1 '.sound.announcer.traffic_jam_ahead'
</script>

<observer tmc_announce_obs boolmodel="tmc.events.announced_events.isempty" onselect='run sc_TMC_Announce'>

<script sc_TMC_Announce_Init>
ui_TmcAnnounce.show
run sc_TMC_Audio_Announce
500 run sc_TMC_Announce_Done
</script>

Note: There seems to be an extra "1" in the original script which has been removed (the line starting "runif vActiveState ..."

tmc_[Resolution].ui

This file is just a simple case of adding a checkbox option (to set/unset our variable) to the TMC setting screen. Find the TMC setting layer (ui_TmcSettings) and add a checkbox at the bottom. Note, the "y=400" may have to be modified according to the resolution of your phone.

<layer ui_TmcSettings z=35>
<SPRITE xxx template=spr_poti y=40>
<SLIDER sld_tmc_sortevents template=sld_5a y=124 z=10 var=vTmcSortMode value="Distance|0|Type|1|Road name|2" onselect='' align="CENTER">
<TEXT xxx template=txt_poti y=40 text="Sort events by:" >

<SPRITE xxx template=spr_poti y=208>
<SLIDER sld_tmc_eventlist template=sld_5a y=292 z=10 var=vTmcShowOnRoute value="All Events|0|On Route|1" align="CENTER">
<TEXT xxx template=txt_poti y=208 text="Event list:" color=#FFFFFF>
<CHECKBOX xxx template=chk_5a y=400 text="Voice warning" var=vTMCVoiceWarning>
<BUTTON xxx template=footer3_3a text="" iconspr="icof_help.bmp" onlongclick='run sc_show_btn_help "Help"' onrelease='NEXTSTATE st_HelpTmcSettings'>
</layer>

And thats it. Now re-open your data.zip (you have backed it up right?) and replace the files with your edited ones. !!DO NOT UNZIP AND REZIP YOUR DATA.ZIP FILE!!