The player can set the master volume by clicking on full bar (looks like a healthbar). Wherever they click in the bar I subtract that X from the bar's origin (origin left).
i.e. full bar width is 109, if they click in the middle I get the value 54.5
Then I subtract 109 from 54.5 and get -54.5 then I divide that by 5 (why? trial and error) to get -10.9 (which I then set the volume to to make it half as loud)
Now I need to save the -10.9 to Localdata and init the volume to that the next time they load the game - and that part is easy. But when they look at the master volume bar I need it to reflect the current volume. I know the / 5 part of the calculation isn't exact, so I figure I should ask how to get the REAL value so I can reverse it for the correct bar width. Any ideas?