46
OXCE Suggestions Archive / Re: [Suggestion] Display missing health/mana in SoldierInfo screen.
« on: March 03, 2023, 05:54:02 pm »
Quick demo of this concept:
I'm not sure I love it though. To do this I sub-classed the Bar class into a BarR class that can handle drawing a reverse bar, which works but is kind of clunky. I could instead just modify the bar class to give all instances this functionality, or just do it manually (though getting the draw code mixed in with the other code is kind of gross). Will also need to find a way to specify the color for this "reverse" segment of the bar. Adding a color3 tag to the rules would work, but feels kind of clunky as well.
An alternative way of displaying this might be not to overlap the entire bar, and instead only cover maybe the bottom half.
I'm not sure I love it though. To do this I sub-classed the Bar class into a BarR class that can handle drawing a reverse bar, which works but is kind of clunky. I could instead just modify the bar class to give all instances this functionality, or just do it manually (though getting the draw code mixed in with the other code is kind of gross). Will also need to find a way to specify the color for this "reverse" segment of the bar. Adding a color3 tag to the rules would work, but feels kind of clunky as well.
An alternative way of displaying this might be not to overlap the entire bar, and instead only cover maybe the bottom half.