Truly awesome work. I think we can live with the rest of the HUD stretched for now. The map is the important part.
Thanks.
---------
Unfortunately I have bad news. Doesn't look like I can fix the rest of the hud. Technical explanation below:
KOTOR 1 uses absolute hud placement. Meaning if the X position for some hud element was 960, then that hud element was drawn at pixel 960. Because of this, fixing the hud for widescreen was a simple matter of adding the appropriate difference in resolution size to the X/Y coords of the hud elements. More importantly it meant only the starting X/Y coords needed to be changed - the height and width of the hud element itself didn't need to be changed. Something with a 50 pixel width was still 50 pixels in a widescreen resolution. So to fix the huds I bascially just had to add a constant amount to all the X coords of hud elements on the right side of the screen. Very easy and I could do all the edits in one shot without worrying that things wouldn't line up right.
KOTOR 2 uses relative positioning. All resolutions use the 800x600 hud and resize it accordingly. This means you need to work with a meager 800x600 coordinate space for all resolutions; worse, it also means that widths are relative are well - hence the stretching. In order to compensate for the stretching, I basically have to make everything thinner than it would normally be. So that when the hud is stretched they end up look correct. How much thinner depends on the aspect. For 16:9 I need to the make the elements 25% thinner or in other words 75% of their original width.
So let's say the normal width of something is set to 50; 50 * .75 = 37.5 Therein lies the problem; KOTOR's GUI system only accepts integers (whole numbers) for hud cooridinates. So I'd need to go with 37 or 38.
That slight inaccuracy doesn't sound like a big deal, but the problem is that each little hud piece is several elements. The action buttons on the bottom left for example are 4 parts each - the button itself, the up and down arrows, and the border. Because the adjusted widths are inaccurate - matched parts don't line up correctly. E.g. say the widths of two parts of the same hud element have a width of 50 and 53. That's 37.5 and 39.75 when adjusted accurately. However I'd have to make them 38 and 40. That means there's a .5 offset for one element and a .25 offset for another - hence they don't match up.
The end result of these mismatches are ugly little gaps or overlaps between parts. I did try fixing a couple and in my opinion, the stretching was vastly preferable to hud elements that are close to correct width, but don't line up correctly.
The one screenshot from my post above shows the problem. You can see I tried adjusting the width of both the map and the border, but there's a little gap between the two. This is why, in the fixed huds I posted, the map
window on the hud is still stretched (only the map itself is not). What I changed was the coordinate space used in the background to draw the map into - this is separate from the visible hud itself.