ID:1004995
 
Keywords: bar, focus, interface, macro
(See the best response by Gunbuddy13.)


Problem description:
how do I focus on the volume bar from the interface and control it with my keyboard?


There is no way to move a bar slider with keys (as far as I know). You would have to change the player's EAST/WEST macros to be commands (instead of .EAST and .WEST respectively) while you have focus on the slider, then revert them back to their movement commands when you hide the slider again
I don't use the built in movements. I have my custom keys for north east west and south. I'll figure something out though.
Best response
The command you would want to use would look something like this:
mob/verb/volumeslideleft()
//Replace window.BAR with the path for your volume adjust bar
var/Value=text2num(winget(src,".window.BAR","value")) //Get the current value for the slider.
Value=max(0,Value-1) //Reduce the current value by one (without letting it go below 0)
winset(src,"window.BAR","value=[Value]") //Set the new value.


You would just have to macro whatever key you choose to execute the command "volumeslideleft" and this should work for you.
I got it working, should have thought of it before asking. but thanks. appreciate the help