WeApOn Posted November 7, 2008 Report Share Posted November 7, 2008 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! Quote Link to post Share on other sites
BorisM Posted November 7, 2008 Report Share Posted November 7, 2008 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... Quote Link to post Share on other sites
WeApOn Posted November 7, 2008 Report Share Posted November 7, 2008 ; *** 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? Quote Link to post Share on other sites
BorisM Posted November 8, 2008 Report Share Posted November 8, 2008 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 Quote Link to post Share on other sites
WeApOn Posted November 8, 2008 Report Share Posted November 8, 2008 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. Quote Link to post Share on other sites
BorisM Posted November 8, 2008 Report Share Posted November 8, 2008 Hmmm... I'm not sure if you can touch an invisible button, but you certainly can use an invisible bitmap instead. You can either switch BMP when clicked, or use two buttons, one visible, one not. Quote Link to post Share on other sites
ShineOn Posted November 9, 2008 Report Share Posted November 9, 2008 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. Quote Link to post Share on other sites
mwortham Posted November 11, 2008 Report Share Posted November 11, 2008 First of all, thanks brink094 for sharing your work on this. Samantha was making me crazy... Now, has anyone figured out how to make it remember the mute setting when the unit is turned off then back on? Thanks, - Mark Quote Link to post Share on other sites
ShineOn Posted November 11, 2008 Report Share Posted November 11, 2008 how to make it remember the mute setting when the unit is turned off then back on? Try to declare permanent variable, it should be saved in save\system.ini: Quote Link to post Share on other sites
brink094 Posted November 11, 2008 Author Report Share Posted November 11, 2008 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 Quote Link to post Share on other sites
bob.and.dot@verizon.net Posted November 12, 2008 Report Share Posted November 12, 2008 Thanks it was firefox it doesn't work with the site well as soon as I loaded internet exporer it worked! Thanks again Quote Link to post Share on other sites
nivanov Posted November 18, 2008 Report Share Posted November 18, 2008 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. Quote Link to post Share on other sites
BorisM Posted November 18, 2008 Report Share Posted November 18, 2008 Yes, that should be it. This really should be a speed-independent control Quote Link to post Share on other sites
nivanov Posted November 22, 2008 Report Share Posted November 22, 2008 I confirmed today that if you are only using software bypass for the brake, you need to use USE_SEPARATED_SAFETY_MODE=0 attribute for both Button tags in order for the mute button to work while you are driving without parking brake engaged. Quote Link to post Share on other sites
brink094 Posted November 23, 2008 Author Report Share Posted November 23, 2008 Thanks for finding the separated_safety_mode bug, my Avic is hardware bypassed, so I've never had any problems First post is updated, the mute buttons now work without hardware bypass. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.