Jump to content
AVIC411.com

HOWTO: add voice guidance mute button


Recommended Posts

Beautiful job, love it.

 

One personal tweak, and the creator of this might be able to help me out-- Is there a way I could hide that button(like it is when there is no route), when the volume is -not- muted. But be able to still touch that same area and then the button appears.

 

What I'm trying to do is avoid screen clutter, but I'm not sure if a button has a variable like isVisible or something. Though I'd like to have it on the screen when the volume is muted.

 

Either way, great job!

Link to post
Share on other sites
  • Replies 88
  • Created
  • Last Reply

Top Posters In This Topic

With existing code, since the button follows the actual system mute status in its visiblemodel, it will hide/unhide itself automatically even if you do call button.HIDE or button.SHOW methods (this is what you use to control visibility...).

 

What you probably could do is register a variable that is set to current mute status and use _that_ in visiblemodel of the button. Then when you click on it, change the variable value in the script that is called to control button's appearance...

Link to post
Share on other sites

; *** Voice guidance mute mod by Gert-Jan ***

; *** End Voice guidance mute mod ***

 

 

I believe this is all the needed code... So if I add another variable and check it against .has_route and .mute_status, both being on I would pass .SHOW and the first being on and the later being off I would pass .HIDE?

Link to post
Share on other sites

If I understand you correctly, you want the button initially hiodden regardless of mute status, and show it when you press it. And you also want it hidden if it is not routing at all. SO I think you would have a variable that is set to 1 (true) somewhere in initialization script.

 

SET bHideMyButton 0

 

Then, set button original visibility with

 

Link to post
Share on other sites

Yes-- pretty much. To put it in most simple terms, I ONLY want the button to be shown when there IS a route and when mute IS on.

 

The question that I was unsure about was, if the button is not set to visible, can I still touch where it would have been?

 

So maybe I wouldn't want to HIDE the button, but switch to an empty button that is still pressable when there is a route.

 

 

Pretty much, the only time I want to see the button is if the mute IS on, which also requires there to be a route. Then, unmuting the voice would hide the button.

Link to post
Share on other sites
So maybe I wouldn't want to HIDE the button, but switch to an empty button that is still pressable when there is a route.

You can use semi-transparent button instead. I use alpha=10 for all semi-transparent buttons on my skins. Moreover, you can change ALPHA setting of your button at any time you need by different way:

 

1. permanent aplha setting of each button:

 

 

2. controlled ALPHA by different conditions depend on your needs:

 

...

runif bHideMyButton 'btnNMB_Mute.alpha 10, btnNMB_Mute.bmp "button_volume.bmp", bHideMyButton 0, run sc_unmute_guidance'

else_run 'btnNMB_Mute.alpha 32, btnNMB_Mute.bmp "button_volume_mute.bmp", bHideMyButton 1, run sc_mute_guidance_immediately'

 

I didn'check this code yet, but the similar code for other buttons already working on my old Mio C520 skin.

Link to post
Share on other sites

Now, has anyone figured out how to make it remember the mute setting when the unit is turned off then back on?

 

I haven't put a lot of time in this, the mute button as it is works good enough for my needs. You would indeed need to declare some variable and have it track the sound.announcer.muted status, then read that variable when the software initializes and mute/unmute the voice depending on the saved value. Not too difficult, just need some time to do it. Right now I'm working on replacing the dull blue boxes with some nice glossy black ones, maybe I'll look into this when I'm done.

 

You could just set the voice volume at 0 in the settings, that way she is always muted ;)

Link to post
Share on other sites

It looks like this hack only works when the unit is bypassed. I did the software bypass but did not ground the parking break wire and I could only press it when i pulled my handbrake up a little bit. I wonder if adding the USE_SEPARATED_SAFETY_MODE attribute and setting it to 0 to either of the buttons would allow me to press those buttons regardless of the parking brake state.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...



×
×
  • Create New...