Actually you dont even need a DLL. All you need is cscript.
This is a very limited rip-off. It expect a panel and the desired position (equivalent to pos_x and pos_y). The problem is for resolution free (short: RF) display is that you cannot modify the pos_x and pos_y parameter without changing the relative position on the RF screen. So we work with a reference resolution: it means that we expect that all HUD elements are designed for only that resolution. So, on this basis the routine calculate the position and the scaling for both axis (its not quadratic!, of course).
The lines for sclaing and positioning is filled with a factor calculation. This is just the percentage of the current screensize to reference resolution. This factor is important for everything which relates to the HUD. In our lib this is encapsuled as well. Its useful when you scale texts, too, or when you are moving 2D elements over the screen - you can do this easily on your own. We have here a dozen other functions to minimze coding inside the main gamescripts, so this isnt really complicated. For moving, you would not only correct the quants with time_step but also with this factor to compensate the difference from the current resolution to the reference resolution.
This technology works also for the mouse cursor, texts and all other HUD elements. I cannot post anymore but maybe its useful for you.
Code:
panel* pnl_temp;
var HUD_reference[2] = 1024, 768;
function panelRefresh (pPanel, &vPos)
{
pnl_temp = pPanel;
if (pnl_temp) {
//Position
pnl_temp.pos_x = (screen_size.x / HUD_reference.x) * vPos[0];
pnl_temp.pos_y = (screen_size.y / HUD_reference.y) * vPos[1];
//Scaling
pnl_temp.scale_x = (screen_size.x / HUD_reference.x);
pnl_temp.scale_y = (screen_size.y / HUD_reference.y);
//switch filtering (if we are in the reference res, we dont need it)
pnl_temp.filter = (screen_size.x != HUD_reference.x);
} else {
error("panelRefresh -> invalid (panel*)!");
}
}
Additionally, the filtering doesnt make it bad. We use it heavily and we are amazed by the results. Its fast and its good.
BTW: unfortunately, texts* arent supported. So you would have to do it on your own.